mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-11-02 20:34:02 +08:00
Add WhiteRabbitNeo Provider, Many tiny improvments in the gui
This commit is contained in:
@@ -80,13 +80,12 @@ class Api():
|
||||
Returns:
|
||||
dict: Arguments prepared for chat completion.
|
||||
"""
|
||||
provider = json_data.get('provider', None)
|
||||
if "image" in kwargs and provider is None:
|
||||
provider = "Bing"
|
||||
if provider == 'OpenaiChat':
|
||||
kwargs['auto_continue'] = True
|
||||
|
||||
model = json_data.get('model') or models.default
|
||||
provider = json_data.get('provider')
|
||||
messages = json_data['messages']
|
||||
api_key = json_data.get("api_key")
|
||||
if api_key is not None:
|
||||
kwargs["api_key"] = api_key
|
||||
if json_data.get('web_search'):
|
||||
if provider == "Bing":
|
||||
kwargs['web_search'] = True
|
||||
@@ -98,8 +97,6 @@ class Api():
|
||||
if conversation_id and provider in conversations and conversation_id in conversations[provider]:
|
||||
kwargs["conversation"] = conversations[provider][conversation_id]
|
||||
|
||||
model = json_data.get('model') or models.default
|
||||
|
||||
return {
|
||||
"model": model,
|
||||
"provider": provider,
|
||||
|
||||
Reference in New Issue
Block a user