summaryrefslogtreecommitdiffstats
path: root/g4f/Provider
diff options
context:
space:
mode:
authorTekky <98614666+xtekky@users.noreply.github.com>2023-11-20 19:27:30 +0100
committerGitHub <noreply@github.com>2023-11-20 19:27:30 +0100
commit4f7ebdab730af43bc2072cd415ca60ec6c32ac98 (patch)
tree6d1ad2636abfd7ad0b4f5a59aa4630cf2a29723e /g4f/Provider
parentUpdate README-DE.md (diff)
parentMerge pull request #1275 from egcash/patch-1 (diff)
downloadgpt4free-4f7ebdab730af43bc2072cd415ca60ec6c32ac98.tar
gpt4free-4f7ebdab730af43bc2072cd415ca60ec6c32ac98.tar.gz
gpt4free-4f7ebdab730af43bc2072cd415ca60ec6c32ac98.tar.bz2
gpt4free-4f7ebdab730af43bc2072cd415ca60ec6c32ac98.tar.lz
gpt4free-4f7ebdab730af43bc2072cd415ca60ec6c32ac98.tar.xz
gpt4free-4f7ebdab730af43bc2072cd415ca60ec6c32ac98.tar.zst
gpt4free-4f7ebdab730af43bc2072cd415ca60ec6c32ac98.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/GptGo.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/g4f/Provider/GptGo.py b/g4f/Provider/GptGo.py
index 442aa90d..726c7a99 100644
--- a/g4f/Provider/GptGo.py
+++ b/g4f/Provider/GptGo.py
@@ -62,6 +62,21 @@ class GptGo(AsyncGeneratorProvider):
line = json.loads(line[len(start):-1])
if line["choices"][0]["finish_reason"] == "stop":
break
+
content = line["choices"][0]["delta"].get("content")
if content:
yield content
+
+
+ @classmethod
+ @property
+ def params(cls):
+ params = [
+ ("model", "str"),
+ ("messages", "list[dict[str, str]]"),
+ ("stream", "bool"),
+ ("proxy", "str"),
+ ("temperature", "float"),
+ ]
+ param = ", ".join([": ".join(p) for p in params])
+ return f"g4f.provider.{cls.__name__} supports: ({param})"