From 0e07ae77cf190f90962e1f2032f94e2923d72941 Mon Sep 17 00:00:00 2001 From: "grandsonneo@gmail.com" Date: Fri, 21 Jul 2023 22:17:53 -0400 Subject: Use the temperature parameter --- g4f/Provider/Providers/DfeHub.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'g4f/Provider/Providers/DfeHub.py') diff --git a/g4f/Provider/Providers/DfeHub.py b/g4f/Provider/Providers/DfeHub.py index afc9861a..e3ff8045 100644 --- a/g4f/Provider/Providers/DfeHub.py +++ b/g4f/Provider/Providers/DfeHub.py @@ -32,10 +32,10 @@ def _create_completion(model: str, messages: list, stream: bool, **kwargs): json_data = { 'messages': messages, 'model': 'gpt-3.5-turbo', - 'temperature': 0.5, - 'presence_penalty': 0, - 'frequency_penalty': 0, - 'top_p': 1, + 'temperature': kwargs.get('temperature', 0.5), + 'presence_penalty': kwargs.get('presence_penalty', 0), + 'frequency_penalty': kwargs.get('frequency_penalty', 0), + 'top_p': kwargs.get('top_p', 1), "stream": True, } response = requests.post('https://chat.dfehub.com/api/openai/v1/chat/completions', -- cgit v1.2.3