Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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)
|