Merge pull request #3115 from elisalimli/litellm_fix/missing-spaces-between-prompts-cohere-chat

Fix new line issue in cohere_message_pt
This commit is contained in:
Krish Dholakia 2024-04-20 13:15:20 -07:00 • committed by GitHub
commit 9f91f9919f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1052,7 +1052,8 @@ def cohere_message_pt(messages: list):
tool_result = convert_openai_message_to_cohere_tool_result(message)
tool_results.append(tool_result)
else:
prompt += message["content"]
prompt += message["content"] + "\n\n"
prompt = prompt.rstrip()
return prompt, tool_results