-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Allow tracking with bcc tools via openai function call. #8
Conversation
Problems that need to be solvedHere are some issues that I will fix later:
|
For the first problem, it is done in two steps:
For the third problem, I created a dictionary of positional parameters to determine which parameters of a given command are positional parameters, see https://github.com/try-agaaain/GPTtrace/blob/8b7c3eecdfeec04f0eb3eedba2e3526465374023/bcc_tools.py#L90 |
why not generate the function call dynamically at runtime? the advantages and disadvantages? And,maybe you can try combined this with agents in langchain later? |
If I need to generate a function call dynamically, I first need to know which command to generate the function call, how should I determine this? Dynamic generation has some drawbacks, as the function calls generated by LLM may not always be accurate. If we can predefine these function calls more accurately, it can reduce the occurrence of errors. It doesn't seem to be more convenient to use Function Call in LangChain, but it's okay to change to LangChain. |
Does it possible to merge this PR first? It already includes a lot of updates (might be a bit messy). @yunwei37 @Officeyutong I have added a ```console
$./GPTtrace.py -c memleak-bpfcc "Trace allocations and display each individual allocator function call"
Run: sudo memleak-bpfcc --trace
Attaching to kernel allocators, Ctrl+C to quit.
(b'Relay(35)', 402, 6, b'd...1', 20299.252425, b'alloc exited, size = 4096, result = ffff8881009cc000')
(b'Relay(35)', 402, 6, b'd...1', 20299.252425, b'free entered, address = ffff8881009cc000, size = 4096')
(b'Relay(35)', 402, 6, b'd...1', 20299.252426, b'free entered, address = 588a6f, size = 4096')
(b'Relay(35)', 402, 6, b'd...1', 20299.252427, b'alloc entered, size = 4096')
(b'Relay(35)', 402, 6, b'd...1', 20299.252427, b'alloc exited, size = 4096, result = ffff8881009cc000')
(b'Relay(35)', 402, 6, b'd...1', 20299.252428, b'free entered, address = ffff8881009cc000, size = 4096')
(b'sudo', 6938, 10, b'd...1', 20299.252437, b'alloc entered, size = 2048')
(b'sudo', 6938, 10, b'd...1', 20299.252439, b'alloc exited, size = 2048, result = ffff88822e845800')
(b'node', 410, 18, b'd...1', 20299.252455, b'alloc entered, size = 256')
(b'node', 410, 18, b'd...1', 20299.252457, b'alloc exited, size = 256, result = ffff8882e9b66400')
(b'node', 410, 18, b'd...1', 20299.252458, b'alloc entered, size = 2048') For bcc tools, it looks up the corresponding function call from In the next PR, I will attempt to accomplish the tracing task using a method similar to autogpt. #10 |
Some suggestions:
|
Great suggestion! In the last submission, I added documentation for each function. The descriptions in the documentation may not be detailed enough, but it will be improved in the future. |
Description
This PR adds a command-line parameter
-b(--bcc)
, when the user uses this parameter, GPTtrace will select the appropriate command tool from bcc-bpftools and set the appropriate parameters to complete the tracking task, like this: