Align data types in example benchmark (#205)

This commit is contained in:
Albert Villanova del Moral 2025-01-16 09:54:47 +01:00 committed by GitHub
parent 98c6688c3d
commit 4449c51cad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -253,11 +253,11 @@
"\n", "\n",
" if is_vanilla_llm:\n", " if is_vanilla_llm:\n",
" llm = agent\n", " llm = agent\n",
" answer = llm([{\"role\": \"user\", \"content\": question}])\n", " answer = str(llm([{\"role\": \"user\", \"content\": question}]))\n",
" token_count = llm.last_input_token_count + llm.last_output_token_count\n", " token_count = {\"input\": llm.last_input_token_count, \"output\": llm.last_output_token_count}\n",
" intermediate_steps = []\n", " intermediate_steps = str([])\n",
" else:\n", " else:\n",
" answer = agent.run(question)\n", " answer = str(agent.run(question))\n",
" token_count = agent.monitor.get_total_token_counts()\n", " token_count = agent.monitor.get_total_token_counts()\n",
" intermediate_steps = str(agent.logs)\n", " intermediate_steps = str(agent.logs)\n",
" # Remove memory from logs to make them more compact.\n", " # Remove memory from logs to make them more compact.\n",