summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/V50.py
diff options
context:
space:
mode:
authorhs_junxiang <jimmy871117@gmail.com>2023-09-04 07:34:31 +0200
committerhs_junxiang <jimmy871117@gmail.com>2023-09-04 07:41:22 +0200
commit17c9adf4852a0ca0d1a5cfa448478fa195a9c368 (patch)
tree070475a0003dde9f0815e7fe98f907f029f3c916 /g4f/Provider/V50.py
parent~ |  Merge pull request #872 (diff)
downloadgpt4free-17c9adf4852a0ca0d1a5cfa448478fa195a9c368.tar
gpt4free-17c9adf4852a0ca0d1a5cfa448478fa195a9c368.tar.gz
gpt4free-17c9adf4852a0ca0d1a5cfa448478fa195a9c368.tar.bz2
gpt4free-17c9adf4852a0ca0d1a5cfa448478fa195a9c368.tar.lz
gpt4free-17c9adf4852a0ca0d1a5cfa448478fa195a9c368.tar.xz
gpt4free-17c9adf4852a0ca0d1a5cfa448478fa195a9c368.tar.zst
gpt4free-17c9adf4852a0ca0d1a5cfa448478fa195a9c368.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/V50.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/g4f/Provider/V50.py b/g4f/Provider/V50.py
index 1dc7651d..ad3fd9e4 100644
--- a/g4f/Provider/V50.py
+++ b/g4f/Provider/V50.py
@@ -16,11 +16,9 @@ class V50(BaseProvider):
messages: list[dict[str, str]],
stream: bool, **kwargs: Any) -> CreateResult:
- conversation = ''
- for message in messages:
- conversation += '%s: %s\n' % (message['role'], message['content'])
-
- conversation += 'assistant: '
+ conversation = "\n".join(f"{message['role']}: {message['content']}" for message in messages)
+ conversation += "\nassistant: "
+
payload = {
"prompt" : conversation,
"options" : {},