community[patch]: GigaChat model selection fix (#20988)

Fixed the error that the model name is never actually put into GigaChat
request payload, always defaulting to `GigaChat-Lite`.

With this fix, model selection through
```python
import os
from langchain.chat_models.gigachat import GigaChat

chat = GigaChat(
    name="GigaChat-Pro", # <- HERE!!!!!
    ...
)
```
should actually work, as intended in
[here](804390ba4b/libs/community/langchain_community/llms/gigachat.py (L36)).

---------

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
pull/21033/head
Andrei Panferov 2 months ago committed by GitHub
parent 3331865f6b
commit b3efa38cc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -133,6 +133,7 @@ class GigaChat(_BaseGigaChat, BaseChatModel):
)
payload.functions = kwargs.get("functions", None)
payload.model = self.model
if self.profanity_check is not None:
payload.profanity_check = self.profanity_check

Loading…
Cancel
Save