mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-09-12 08:29:30 -04:00
fix Yqcloud's prompter using only the last message
This commit is contained in:
parent
7222d9b7ce
commit
6a4463889e
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user