-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow conversations to have "previous messages"
This commit modifies the `Chat` method (in a backwards compatible way) to allow users to start the conversation with previously exchanged messages, i.e. messages that had already been exchanged between the user and the assistant. This practically allows "loading" previous conversations in order to continue them. To support this, the `Chat` method now takes `types.Message` values in a variadic way. The messages field of the `Conversation` type is also exposed now, so that users may save it.
- Loading branch information
Showing
4 changed files
with
81 additions
and
29 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
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