summaryrefslogtreecommitdiffstats
path: root/g4f/Provider
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-02-24 21:06:46 +0100
committerGitHub <noreply@github.com>2024-02-24 21:06:46 +0100
commit369ea621143b870626c2b5d7e1abb1a5007785db (patch)
treed2dffb31047dc2e12ee70e51f6ebe8f2afa69131 /g4f/Provider
parentMerge pull request #1622 from hlohaus/gem (diff)
parentDeepInfra: Add max_tokens and stop (diff)
downloadgpt4free-369ea621143b870626c2b5d7e1abb1a5007785db.tar
gpt4free-369ea621143b870626c2b5d7e1abb1a5007785db.tar.gz
gpt4free-369ea621143b870626c2b5d7e1abb1a5007785db.tar.bz2
gpt4free-369ea621143b870626c2b5d7e1abb1a5007785db.tar.lz
gpt4free-369ea621143b870626c2b5d7e1abb1a5007785db.tar.xz
gpt4free-369ea621143b870626c2b5d7e1abb1a5007785db.tar.zst
gpt4free-369ea621143b870626c2b5d7e1abb1a5007785db.zip
Diffstat (limited to 'g4f/Provider')
-rw-r--r--g4f/Provider/DeepInfra.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/g4f/Provider/DeepInfra.py b/g4f/Provider/DeepInfra.py
index 183f00ea..f44679ff 100644
--- a/g4f/Provider/DeepInfra.py
+++ b/g4f/Provider/DeepInfra.py
@@ -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',