diff options
author | RasyiidWho <rasyiidwho@gmail.com> | 2024-01-21 19:33:41 +0100 |
---|---|---|
committer | RasyiidWho <rasyiidwho@gmail.com> | 2024-01-21 19:33:41 +0100 |
commit | bab62e43454391f60a2f4a4e5a23d4c494a73019 (patch) | |
tree | 3af6a02ccaf3d71c46a03d3d32007eb74cd41585 /g4f/Provider/Phind.py | |
parent | Merge pull request #1494 from hlohaus/neww (diff) | |
download | gpt4free-bab62e43454391f60a2f4a4e5a23d4c494a73019.tar gpt4free-bab62e43454391f60a2f4a4e5a23d4c494a73019.tar.gz gpt4free-bab62e43454391f60a2f4a4e5a23d4c494a73019.tar.bz2 gpt4free-bab62e43454391f60a2f4a4e5a23d4c494a73019.tar.lz gpt4free-bab62e43454391f60a2f4a4e5a23d4c494a73019.tar.xz gpt4free-bab62e43454391f60a2f4a4e5a23d4c494a73019.tar.zst gpt4free-bab62e43454391f60a2f4a4e5a23d4c494a73019.zip |
Diffstat (limited to 'g4f/Provider/Phind.py')
-rw-r--r-- | g4f/Provider/Phind.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/g4f/Provider/Phind.py b/g4f/Provider/Phind.py index 9e80baa9..b0df3edc 100644 --- a/g4f/Provider/Phind.py +++ b/g4f/Provider/Phind.py @@ -39,10 +39,10 @@ class Phind(AsyncGeneratorProvider): prompt = messages[-1]["content"] data = { "question": prompt, - "questionHistory": [ + "question_history": [ message["content"] for message in messages[:-1] if message["role"] == "user" ], - "answerHistory": [ + "answer_history": [ message["content"] for message in messages if message["role"] == "assistant" ], "webResults": [], @@ -55,7 +55,7 @@ class Phind(AsyncGeneratorProvider): "creativeMode": creative_mode, "customLinks": [] }, - "context": "", + "context": ([message["content"] for message in messages if message["role"] == "system"])[0] if ([message["content"] for message in messages if message["role"] == "system"]) else "", "rewrittenQuestion": prompt, "challenge": 0.21132115912208504 } |