XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Use the temperature parameter

0e07ae77
grandsonneo@gmail.com <grandsonneo@gmail.com>
提交于

代码差异

6 个文件 +13 -13
Modified g4f/Provider/Providers/AItianhu.py +2 -2
@@ -22,8 +22,8 @@ def _create_completion(model: str, messages: list, stream: bool, **kwargs):
22 22 "prompt": base,
23 23 "options": {},
24 24 "systemMessage": "You are ChatGPT, a large language model trained by OpenAI. Follow the user's instructions carefully. Respond using markdown.",
25 "temperature": 0.8,
26 "top_p": 1
25 "temperature": kwargs.get("temperature", 0.8),
26 "top_p": kwargs.get("top_p", 1)
27 27 }
28 28 response = requests.post(url, headers=headers, json=data)
29 29 if response.status_code == 200:
Modified g4f/Provider/Providers/Ails.py +1 -1
@@ -75,7 +75,7 @@ def _create_completion(model: str, messages: list, temperature: float = 0.6, str
75 75
76 76 json_data = json.dumps(separators=(',', ':'), obj={
77 77 'model': 'gpt-3.5-turbo',
78 'temperature': 0.6,
78 'temperature': temperature,
79 79 'stream': True,
80 80 'messages': messages} | sig)
81 81
Modified g4f/Provider/Providers/ChatgptLogin.py +1 -1
@@ -75,7 +75,7 @@ def _create_completion(model: str, messages: list, stream: bool, **kwargs):
75 75 'userName': '<div class="mwai-name-text">User:</div>',
76 76 'aiName': '<div class="mwai-name-text">AI:</div>',
77 77 'model': 'gpt-3.5-turbo',
78 'temperature': 0.8,
78 'temperature': kwargs.get('temperature', 0.8),
79 79 'maxTokens': 1024,
80 80 'maxResults': 1,
81 81 'apiKey': '',
Modified g4f/Provider/Providers/DfeHub.py +4 -4
@@ -32,10 +32,10 @@ def _create_completion(model: str, messages: list, stream: bool, **kwargs):
32 32 json_data = {
33 33 'messages': messages,
34 34 'model': 'gpt-3.5-turbo',
35 'temperature': 0.5,
36 'presence_penalty': 0,
37 'frequency_penalty': 0,
38 'top_p': 1,
35 'temperature': kwargs.get('temperature', 0.5),
36 'presence_penalty': kwargs.get('presence_penalty', 0),
37 'frequency_penalty': kwargs.get('frequency_penalty', 0),
38 'top_p': kwargs.get('top_p', 1),
39 39 "stream": True,
40 40 }
41 41 response = requests.post('https://chat.dfehub.com/api/openai/v1/chat/completions',
Modified g4f/Provider/Providers/EasyChat.py +4 -4
@@ -34,10 +34,10 @@ def _create_completion(model: str, messages: list, stream: bool, **kwargs):
34 34 'messages': messages,
35 35 'stream': True,
36 36 'model': model,
37 'temperature': 0.5,
38 'presence_penalty': 0,
39 'frequency_penalty': 0,
40 'top_p': 1,
37 'temperature': kwargs.get('temperature', 0.5),
38 'presence_penalty': kwargs.get('presence_penalty', 0),
39 'frequency_penalty': kwargs.get('frequency_penalty', 0),
40 'top_p': kwargs.get('top_p', 1),
41 41 }
42 42
43 43 response = requests.post('https://free.easychat.work/api/openai/v1/chat/completions',
Modified g4f/Provider/Providers/Lockchat.py +1 -1
@@ -11,7 +11,7 @@ working = False
11 11 def _create_completion(model: str, messages: list, stream: bool, temperature: float = 0.7, **kwargs):
12 12
13 13 payload = {
14 "temperature": 0.7,
14 "temperature": temperature,
15 15 "messages": messages,
16 16 "model": model,
17 17 "stream": True,