mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-06-19 00:08:43 +00:00
Fix query appearing twice in chat history
The initial query appears twice in the prompt, this is ignored by OpenAI models, however it breaks with Gemini models are they fail with an error stating that AI and User prompts need to alternate. Tested all search modes with both OpenAI GTP3 turbo and Vertex Gemini 1.0 and this changes appears to now function correctly with both.
This commit is contained in:
@ -165,7 +165,6 @@ const createBasicWolframAlphaSearchAnsweringChain = (llm: BaseChatModel) => {
|
||||
ChatPromptTemplate.fromMessages([
|
||||
['system', basicWolframAlphaSearchResponsePrompt],
|
||||
new MessagesPlaceholder('chat_history'),
|
||||
['user', '{query}'],
|
||||
]),
|
||||
llm,
|
||||
strParser,
|
||||
|
Reference in New Issue
Block a user