-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(llms)!: Add default and call options in VertexAI and ChatVertexAI (
#155) Before if you wanted to change any model options (e.g. temperature) you needed to create a new instance of the model wrapper. Now, we have a `defaultOptions` parameter that allows to configure the default options but you can always override them when calling the model with the `options` parameter. Example: ```dart final chatModel = ChatVertexAI( authHttpClient: authClient, project: 'your-project-id', defaultOptions: ChatVertexAIOptions( temperature: 0.9, ), ); final result = await chatModel( [ChatMessage.human('Hello')], options: ChatVertexAIOptions( temperature: 0.5, ), ); ``` This PR also adds support for two new options: - `stopSequences`: Specifies a list of strings that tells the model to stop generating text if one of the strings is encountered in the response. If a string appears multiple times in the response, then the response truncates where it's first encountered. The strings are case-sensitive. - `candidateCount`: The number of response variations to return.
- Loading branch information
1 parent
2d21c16
commit fe1b12e
Showing
7 changed files
with
379 additions
and
150 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
Oops, something went wrong.