diff --git a/g4f/Provider/Phind.py b/g4f/Provider/Phind.py index 9e80baa970..b0df3edc46 100644 --- a/g4f/Provider/Phind.py +++ b/g4f/Provider/Phind.py @@ -39,10 +39,10 @@ async def create_async_generator( 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 @@ async def create_async_generator( "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 }