Skip to content

Commit

Permalink
Merge pull request #1627 from nullstreak/deepinfra
Browse files Browse the repository at this point in the history
DeepInfra: Add max_tokens and stop
  • Loading branch information
hlohaus authored Feb 24, 2024
2 parents 6d3ad27 + 0d4f637 commit 369ea62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions g4f/Provider/DeepInfra.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ async def create_async_generator(
'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',
Expand Down

0 comments on commit 369ea62

Please sign in to comment.