79340992

Date: 2025-01-08 23:31:30
Score: 0.5
Natty:
Report link

'messages' have to be a list of message of type HumanMessage/AIMessage/SystemMessage/ToolMessage. You can prepend the context (assuming it's a string) as a SystemMessage to your existing message list and then invoke.

llm.invoke([SystemMessage(content=context)] + existing_messages)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: biplob biswas