-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance Assistant and OpenAIChat classes for better response handling
- Import 'time' module in 'assistant.py' for timestamp generation. - Modify 'stream_response' method in 'assistant.py' to generate unique chunk IDs and set finish reasons. - Convert chunk dictionary to JSON before appending it to the prompt in 'stream_response' method. - Update 'OpenAIChat' class in 'openai_chat.py' to handle 'gpt-' models using OpenAI API. - Use existing 'completion' function for non 'gpt-' models in 'OpenAIChat' class.
- Loading branch information
1 parent
617b2ee
commit 64f4ba4
Showing
2 changed files
with
31 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters