summaryrefslogtreecommitdiffstats
path: root/g4f
diff options
context:
space:
mode:
authorabc <98614666+xtekky@users.noreply.github.com>2024-04-12 18:06:54 +0200
committerabc <98614666+xtekky@users.noreply.github.com>2024-04-12 18:06:54 +0200
commita107d3f2ff0cd9ed61fb6a62aa0252d8f976e62e (patch)
tree3806af7a8046a49b99c2aaa9a65732e114dd41ee /g4f
parentAdd unittests for async client (#1830) (diff)
downloadgpt4free-a107d3f2ff0cd9ed61fb6a62aa0252d8f976e62e.tar
gpt4free-a107d3f2ff0cd9ed61fb6a62aa0252d8f976e62e.tar.gz
gpt4free-a107d3f2ff0cd9ed61fb6a62aa0252d8f976e62e.tar.bz2
gpt4free-a107d3f2ff0cd9ed61fb6a62aa0252d8f976e62e.tar.lz
gpt4free-a107d3f2ff0cd9ed61fb6a62aa0252d8f976e62e.tar.xz
gpt4free-a107d3f2ff0cd9ed61fb6a62aa0252d8f976e62e.tar.zst
gpt4free-a107d3f2ff0cd9ed61fb6a62aa0252d8f976e62e.zip
Diffstat (limited to '')
-rw-r--r--g4f/client/client.py1
-rw-r--r--g4f/models.py10
2 files changed, 9 insertions, 2 deletions
diff --git a/g4f/client/client.py b/g4f/client/client.py
index bc0bae6f..1b090981 100644
--- a/g4f/client/client.py
+++ b/g4f/client/client.py
@@ -96,6 +96,7 @@ class Completions():
ignore_working,
ignore_stream,
)
+
stop = [stop] if isinstance(stop, str) else stop
response = provider.create_completion(
model, messages,
diff --git a/g4f/models.py b/g4f/models.py
index 875f900a..4480dc10 100644
--- a/g4f/models.py
+++ b/g4f/models.py
@@ -3,7 +3,7 @@ from __future__ import annotations
from dataclasses import dataclass
from .Provider import RetryProvider, ProviderType
-from .Provider import (
+from .Provider import (
Chatgpt4Online,
PerplexityLabs,
GeminiProChat,
@@ -19,6 +19,7 @@ from .Provider import (
Llama2,
Vercel,
Gemini,
+ Koala,
Bing,
You,
Pi,
@@ -71,7 +72,12 @@ gpt_35_long = Model(
gpt_35_turbo = Model(
name = 'gpt-3.5-turbo',
base_provider = 'openai',
- best_provider = OpenaiChat
+ best_provider = RetryProvider([
+ FreeGpt,
+ You,
+ ChatgptNext,
+ Koala,
+ ])
)
gpt_4 = Model(