Merge pull request #1627 from nullstreak/deepinfra

DeepInfra: Add max_tokens and stop
This commit is contained in:
H Lohaus 2024-02-24 21:06:46 +01:00 committed by GitHub
commit 369ea62114
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -61,6 +61,8 @@ class DeepInfra(AsyncGeneratorProvider, ProviderModelMixin):
'model' : cls.get_model(model),
'messages': messages,
'temperature': kwargs.get("temperature", 0.7),
'max_tokens': kwargs.get("max_tokens", 512),
'stop': kwargs.get("stop", []),
'stream' : True
}
async with session.post('https://api.deepinfra.com/v1/openai/chat/completions',