Skip to content

Commit

Permalink
remove sending 2 messages with file content
Browse files Browse the repository at this point in the history
  • Loading branch information
nagkumar91 committed Apr 29, 2024
1 parent 3770661 commit d5292da
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,6 @@ def _to_chat_protocol(self, template, conversation_history, template_parameters)
for _, m in enumerate(conversation_history):
messages.append({"content": m.message, "role": m.role.value})

if template_parameters.get("file_content", None) and any(
"File contents:" not in message["content"] for message in messages
):
messages.append({"content": f"File contents: {template_parameters['file_content']}", "role": "user"})

return {
"template_parameters": template_parameters,
"messages": messages,
Expand Down

0 comments on commit d5292da

Please sign in to comment.