-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
base: main
Are you sure you want to change the base?
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.
@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