Skip to content

Commit

Permalink
fix: more hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
dvilelaf committed May 29, 2024
1 parent 72adedc commit 5673461
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"custom/napthaai/prediction_request_reasoning_claude/0.1.0": "bafybeihtx2cejxoy42jwk2i5m4evfzz537aic5njuawxnzdzwlo63kdduq",
"custom/napthaai/prediction_request_rag_claude/0.1.0": "bafybeickr32t7nmapuoymjyo3cf5rr2v2zapksxcivuqsgjr2gn6zo6y7y",
"custom/napthaai/prediction_request_rag_cohere/0.1.0": "bafybeihh26kwgqkzojd4zastto5mgod7o7esll4f4icurvwumvwuzmosrm",
"custom/valory/prediction_langchain/0.1.0": "bafybeiaep6frkvxxbhfc4f7fy3q4zi5hhks72xelkpkuqdes3rjwjyrlve",
"custom/valory/prediction_langchain/0.1.0": "bafybeihhii7veepp6ovkmqjnkp6euhkwm52obabgdltdj34ikisfd7yvqi",
"protocol/valory/acn_data_share/0.1.0": "bafybeih5ydonnvrwvy2ygfqgfabkr47s4yw3uqxztmwyfprulwfsoe7ipq",
"protocol/valory/websocket_client/0.1.0": "bafybeifjk254sy65rna2k32kynzenutujwqndap2r222afvr3zezi27mx4",
"contract/valory/agent_mech/0.1.0": "bafybeiah6b5epo2hlvzg5rr2cydgpp2waausoyrpnoarf7oa7bw33rex34",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeid2llyk4lr55nmq3aubhnjy4pwskzb3dmvcn5z57geyy3lmua6fue
prediction_langchain.py: bafybeidrcoltwi7vb2hitknmoh36ct5d4jdro7w26xcpmwjemznu7r63ja
prediction_langchain.py: bafybeibg6giebyxjpqch2jvtvrwufp3n75n55xmqjgu3rlc4rfopnfcxlm
fingerprint_ignore_patterns: []
entry_point: prediction_langchain.py
callable: run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,11 @@ def run_langgraph(topic: str, timeframe: str, question: str) -> Tuple[str, str]:
event_list = [e for e in events]

# Response is the last message from the last event
last_event = event_list[-1]
last_sender = list(last_event.keys())[0]
last_message = last_event[last_sender]["messages"][-1]
response = (
event_list[-1]["researcher"]["messages"][-1]
last_message
.content.replace("FINAL ANSWER:", "")
.replace("FINAL ANSWER", "")
.strip()
Expand Down

0 comments on commit 5673461

Please sign in to comment.