From 12f7a895172ac536d9c523ff74aaf9d474364de5 Mon Sep 17 00:00:00 2001 From: nullstreak <139914347+nullstreak@users.noreply.github.com> Date: Wed, 14 Feb 2024 03:27:16 +0100 Subject: Basic support for the temperature parameter --- g4f/api/__init__.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'g4f/api/__init__.py') diff --git a/g4f/api/__init__.py b/g4f/api/__init__.py index 15e8b3a5..3f0778a1 100644 --- a/g4f/api/__init__.py +++ b/g4f/api/__init__.py @@ -90,12 +90,14 @@ class Api: messages = item_data.get('messages') provider = item_data.get('provider', '').replace('g4f.Provider.', '') provider = provider if provider and provider != "Auto" else None + temperature = item_data.get('temperature') try: response = g4f.ChatCompletion.create( model=model, stream=stream, messages=messages, + temperature = temperature, provider = provider, ignored=self.list_ignored_providers ) -- cgit v1.2.3