Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is an update for #1996 .
This PR adds the GigaChat models API. GigaChat models are proprietary, so the log-likelihood methods are not available.
Two authorization methods are available: using an access token or API credentials.
If you have an access token, set the GIGACHAT_CREDENTIALS environmental variable with its value and use
base_url
for your token.For authorization through API credentials, set the following environmental variables:
([0-9a-fA-F-]{36})
.You also need to set
base_url
andauth_url
in themodel_args
parameter.Choose a model from the available options: GigaChat, GigaChat-Plus, GigaChat-Pro, GigaChat-Max.
Here is a usage example for the GSM8K benchmark with API authorization:
Example for access_token authorization:
Some technical details:
cached_property
) for theapi_key
andheader
methods because we need to issue a newaccess_token
every 30 minutes.top_p
parameter instead.