-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
[Add] Logging for each message of GPTAssistant #2677
Conversation
Added Fix to resolve #2697 |
@ekzhu @WaelKarkoub this check is failing "ContribTests / RetrieveChatTest-Ubuntu (3.9) (pull_request)" any idea why ? and how do we fix it ? |
@@ -213,6 +217,12 @@ def _invoke_assistant( | |||
role=message["role"], | |||
) | |||
|
|||
self.client.create( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand the log related implement, but I would like to know if it will call openai completion function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.create() calls the log_chat_completion() which is responsible only for logging data into sqlite DB.
its the self._get_run_response() which makes openai chat completions call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the GPTAssistantAgent
we use the run
to get the responses from the assistant. i think calling the openai completion doesn't add up to the actual assistant logs.
See if adding |
@sonichi @ekzhu @WaelKarkoub i ran the |
@@ -213,6 +217,12 @@ def _invoke_assistant( | |||
role=message["role"], | |||
) | |||
|
|||
self.client.create( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the GPTAssistantAgent
we use the run
to get the responses from the assistant. i think calling the openai completion doesn't add up to the actual assistant logs.
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
Looks like this is dormant, if you want to pick this up again please feel free to reopen. Thanks! |
@IANTHEREAL @ekzhu
Why are these changes needed?
It solves the logging issue with GPTAssistant Sequential chats, where only the last message of a sequential step was being logged, rather than logging each GPTAssistant Agent interaction.
Related issue number
Closes #2644
Checks