summaryrefslogtreecommitdiffstats
path: root/g4f/Provider
diff options
context:
space:
mode:
authorzengrr <47846202+zeng-rr@users.noreply.github.com>2023-08-23 09:34:38 +0200
committerzengrr <47846202+zeng-rr@users.noreply.github.com>2023-08-23 09:34:38 +0200
commit6a4463889eab6cfa4d73efd2aff7c2904640444c (patch)
treec0b83aab75d5d68876d3c553ab7cecd55a9dd6ff /g4f/Provider
parent"You" unicode decode and fix prompt just is last message (diff)
downloadgpt4free-6a4463889eab6cfa4d73efd2aff7c2904640444c.tar
gpt4free-6a4463889eab6cfa4d73efd2aff7c2904640444c.tar.gz
gpt4free-6a4463889eab6cfa4d73efd2aff7c2904640444c.tar.bz2
gpt4free-6a4463889eab6cfa4d73efd2aff7c2904640444c.tar.lz
gpt4free-6a4463889eab6cfa4d73efd2aff7c2904640444c.tar.xz
gpt4free-6a4463889eab6cfa4d73efd2aff7c2904640444c.tar.zst
gpt4free-6a4463889eab6cfa4d73efd2aff7c2904640444c.zip
Diffstat (limited to 'g4f/Provider')
-rw-r--r--g4f/Provider/Yqcloud.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/g4f/Provider/Yqcloud.py b/g4f/Provider/Yqcloud.py
index a3147c2d..82ece2d5 100644
--- a/g4f/Provider/Yqcloud.py
+++ b/g4f/Provider/Yqcloud.py
@@ -35,7 +35,10 @@ def _create_header():
def _create_payload(messages: list[dict[str, str]]):
- prompt = messages[-1]["content"]
+ prompt = ""
+ for message in messages:
+ prompt += "%s: %s\n" % (message["role"], message["content"])
+ prompt += "assistant:"
return {
"prompt": prompt,
"network": True,