captain-awesome commited on
Commit
e9c18cf
1 Parent(s): 91f1b8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -100,7 +100,8 @@ def get_conversational_rag_chain(retriever_chain,llm):
100
 
101
  def safe_llm(input_str: str) -> str:
102
  if isinstance(input_str, langchain_core.prompts.chat.ChatPromptValue):
103
- input_str = str(input_str)
 
104
 
105
  # Call the original llm, which should now work correctly
106
  return llm(input_str)
 
100
 
101
  def safe_llm(input_str: str) -> str:
102
  if isinstance(input_str, langchain_core.prompts.chat.ChatPromptValue):
103
+ # input_str = str(input_str)
104
+ input_str = input_str.to_messages()
105
 
106
  # Call the original llm, which should now work correctly
107
  return llm(input_str)