File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 253
253
" \n " ,
254
254
" if is_vanilla_llm:\n " ,
255
255
" llm = agent\n " ,
256
- " answer = llm([{\" role\" : \" user\" , \" content\" : question}])\n " ,
257
- " token_count = llm.last_input_token_count + llm.last_output_token_count\n " ,
258
- " intermediate_steps = [] \n " ,
256
+ " answer = str( llm([{\" role\" : \" user\" , \" content\" : question}]) )\n " ,
257
+ " token_count = { \" input \" : llm.last_input_token_count, \" output \" : llm.last_output_token_count} \n " ,
258
+ " intermediate_steps = str([]) \n " ,
259
259
" else:\n " ,
260
- " answer = agent.run(question)\n " ,
260
+ " answer = str( agent.run(question) )\n " ,
261
261
" token_count = agent.monitor.get_total_token_counts()\n " ,
262
262
" intermediate_steps = str(agent.logs)\n " ,
263
263
" # Remove memory from logs to make them more compact.\n " ,
You can’t perform that action at this time.
0 commit comments