Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -109,7 +109,7 @@ def state_modifier(state) -> list[BaseMessage]:
|
|
109 |
"collection_files": collection_files,
|
110 |
"messages": state["messages"]
|
111 |
})
|
112 |
-
|
113 |
return trim_messages(
|
114 |
formatted_prompt,
|
115 |
token_counter=len,
|
@@ -119,7 +119,7 @@ def state_modifier(state) -> list[BaseMessage]:
|
|
119 |
include_system=True,
|
120 |
allow_partial=False,
|
121 |
)
|
122 |
-
|
123 |
except Exception as e:
|
124 |
print(f"Error in state modifier: {str(e)}")
|
125 |
return state["messages"]
|
|
|
109 |
"collection_files": collection_files,
|
110 |
"messages": state["messages"]
|
111 |
})
|
112 |
+
print(state["messages"])
|
113 |
return trim_messages(
|
114 |
formatted_prompt,
|
115 |
token_counter=len,
|
|
|
119 |
include_system=True,
|
120 |
allow_partial=False,
|
121 |
)
|
122 |
+
|
123 |
except Exception as e:
|
124 |
print(f"Error in state modifier: {str(e)}")
|
125 |
return state["messages"]
|