summaryrefslogtreecommitdiffstats
path: root/g4f
diff options
context:
space:
mode:
Diffstat (limited to 'g4f')
-rw-r--r--g4f/Provider/Phind.py6
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
}