RCaz commited on
Commit
6cd6614
·
verified ·
1 Parent(s): 2fc1f43

quick fix AIMessage

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -148,7 +148,7 @@ def predict(message, history, request: gr.Request):
148
 
149
  # Create the prompt with system message, context, and conversation history
150
  messages = [SystemMessage(content=RAG_PROMPT_TEMPLATE)]
151
- messages.extend[AIMessage(content="This bot allows you finding informations related to Rémi Cazelles's projects, work and education")]
152
  messages.extend(history_langchain_format)
153
  combined_message = f"Context: {context}\n\nQuestion: {message}"
154
  messages.append(HumanMessage(content=combined_message))
 
148
 
149
  # Create the prompt with system message, context, and conversation history
150
  messages = [SystemMessage(content=RAG_PROMPT_TEMPLATE)]
151
+ messages.extend([AIMessage(content="This bot allows you finding informations related to Rémi Cazelles's projects, work and education")])
152
  messages.extend(history_langchain_format)
153
  combined_message = f"Context: {context}\n\nQuestion: {message}"
154
  messages.append(HumanMessage(content=combined_message))