Open alexmanner opened 3 weeks ago
Thanks for bringing this to my attention. Please try this using a different model within the def _handle_chat_interaction function. By default it is set to gpt-4o, but in this case try, chatgpt-4o-latest and retest. I am still unable to reproduce on my end but I try my best to resolve this and find out why this is occurring on your end.
The issues appear to result from lines 297 and 298. I changed the code from:
cached_tokens = usage.prompt_tokens_details.get('cached_tokens', 0) reasoning_tokens = usage.completion_tokens_details.get('reasoning_tokens', 0)
to
cached_tokens = usage.prompt_tokens_details.cached_tokens reasoning_tokens = usage.completion_tokens_details.reasoning_tokens
With this changes the agents work.
Before that, I switched to different models but had not postive results and got the same initial errors.
I get another error when selecting "2. use reasoning logic".
"
"
This error appears to be due the lines 226 and 227 in the code.
Many thanks for updating the repo. Swarm base reasoning works with the new repo. When trying to talk to one of the agents, I get the same error.
. Enhance Leadership Skills:
Develop a Strategic Vision:
Build Strong Networks:
Clearly Communicate Ambitions:
Showcase Achievements:
Prepare for Transition:
Stay informed about industry trends, be open to feedback, and remain adaptable and resilient. Each step aligns your growth with the company’s needs, paving a personalized path to the CEO role. If you need further tailored advice or details, seeking insights from industry experts or engaging in specialized leadership programs can be beneficial.
Swarm-based reasoning completed.
Swarm reasoning completed in 156.76 seconds. ════════════════════════════════════════════════════════════════════════════════════════════════════ ╔══════════════════════════════════════════════════════════╗ ║ Multi-Agent Reasoning Chatbot ║ ╚══════════════════════════════════════════════════════════╝ Please select an option:
Background I am using a freshly cloned repository and have followed the README setup instructions precisely. Please let me know if you need further details.
Description: I'm encountering an issue when attempting to chat with an agent in the "Multi-Agent Reasoning Chatbot" system. After selecting Agent 47, I receive the following error repeatedly: AttributeError: 'PromptTokensDetails' object has no attribute 'get'
The system then retries the chat, but the same error occurs until it reaches the maximum retry limit.
Steps to Reproduce: Freshly installed the repository and followed the instructions in the README.
Executed the following commands:
Error log: 2024-10-14 12:30:33,239 ERROR:Error in chat with agent 'Agent 47': AttributeError: 'PromptTokensDetails' object has no attribute 'get' ... 2024-10-14 12:30:38,318 ERROR:Error in chat with agent 'Agent 47': AttributeError: 'PromptTokensDetails' object has no attribute 'get' 2024-10-14 12:30:38,319 ERROR:Agent 'Agent 47' reached maximum retry limit in chat.
Environment: macOS 15.1 python 3.11.10