diff options
author | zengrr <47846202+zeng-rr@users.noreply.github.com> | 2023-08-23 09:34:38 +0200 |
---|---|---|
committer | zengrr <47846202+zeng-rr@users.noreply.github.com> | 2023-08-23 09:34:38 +0200 |
commit | 6a4463889eab6cfa4d73efd2aff7c2904640444c (patch) | |
tree | c0b83aab75d5d68876d3c553ab7cecd55a9dd6ff /g4f/Provider/Yqcloud.py | |
parent | "You" unicode decode and fix prompt just is last message (diff) | |
download | gpt4free-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 '')
-rw-r--r-- | g4f/Provider/Yqcloud.py | 5 |
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, |