Closed zac-thee-mac closed 4 months ago
Having this same issue. Any fix on this?
I have the same issue. My understanding is that the openai interface is not answering in the JSON format autogpt is expecting. Here is what is specified in the prompt by autogpt.
_---------------- SYSTEM -----------------
Respond with pure JSON. The JSON object should be compatible with the TypeScript type Response
from the following:
interface Response {
thoughts: {
// Relevant observations from your last action (if any)
observations: string;
// Thoughts
text: string;
reasoning: string;
// Constructive self-criticism
selfcriticism: string;
// Short markdown-style bullet list that conveys the long-term plan
plan: string;
// Summary of thoughts, to say to user
speak: string;
};
command: {
name: string;
args: Record<string, any>;
};
}
_And here is a sample of the answer from openai. 2023-12-26 14:48:47,342 DEBUG Parsing failed on response: '''{'role': 'assistant', 'content': '{"thoughts": {\n"observations": "The user agreed to pursue \'AWS Certified Solutions Architect – Associate\' certification and he/she can dedicate ~10 hours per week for studying. A basic outline for the training plan has been created.",\n"text": "The user is receptive to the AWS Certified Solutions Architect – Associate certification and has a certain amount of time each week they can dedicate to it. We\'ve started off with a basic structure for the study plan, but it still needs to be fleshed out with the remaining topics and subtopics.",\n"reasoning": "Now that I have a rough duration per week (i.e., 10 hours), I can break down the syllabus and distribute it over multiple weeks to create a detailed training plan. Given the nature of AWS Certified Solutions Architect – Associate certification, the study materials should cover a blend of theoretical concepts, hands-on lab exercise, recommended reading materials and finally, mock tests for thorough exam preparation.",\n"self_criticism": "The initial study plan lacks sufficient details; It\'s much too generic. It needs to be enhanced with further necessary topics, their sub topics, suitable resources, and a well-distributed time table.",\n"plan": "- Analyze the syllabus of AWS Certified Solutions Architect – Associate certification.\n- Break down the syllabus into manageable parts based on the user\'s study hours.\n- Include an appropriate mix of study materials like theoretical content, practical lab exercises and mock tests into the study plan.\n- Create an equally distributed time table for the effective study across the weeks.",\n"speak": "I have drafted an initial outline for the study plan. I am now going to analyze the syllabus of the AWS Certified Solutions Architect – Associate certification in detail and finalize the training plan including necessary topics, time distribution, and resources. Please wait." },\n\n"command": {\n"name": "websearch",\n"args": { "query": "AWS Certified Solutions Architect – Associate syllabus"}\n}}'}'''
I check the request and the response for a few examples. The answer from openai matches the JSON requirements in the prompt. Does not help to solve the issue, but the fault is not with openAI.
running on the same, consistent issue. On MacOS.
Anybody found a fix ?
Same issue on Windows.
2024-02-22 07:54:11,380 INFO HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK" 2024-02-22 07:54:11,383 WARNING Parsing attempt #1 failed: Action for current cycle already set 2024-02-22 07:54:43,062 INFO HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK" 2024-02-22 07:54:43,064 WARNING Parsing attempt #2 failed: Action for current cycle already set 2024-02-22 07:55:07,185 INFO HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK" 2024-02-22 07:55:07,190 WARNING Parsing attempt #3 failed: Action for current cycle already set Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\major\AppData\Local\pypoetry\Cache\virtualenvs\agpt-IGpLPcbj-py3.11\Lib\site-packages\click\core.py", line 1157, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\major\AppData\Local\pypoetry\Cache\virtualenvs\agpt-IGpLPcbj-py3.11\Lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "C:\Users\major\AppData\Local\pypoetry\Cache\virtualenvs\agpt-IGpLPcbj-py3.11\Lib\site-packages\click\core.py", line 1666, in invoke rv = super().invoke(ctx) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\major\AppData\Local\pypoetry\Cache\virtualenvs\agpt-IGpLPcbj-py3.11\Lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\major\AppData\Local\pypoetry\Cache\virtualenvs\agpt-IGpLPcbj-py3.11\Lib\site-packages\click\core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\major\AppData\Local\pypoetry\Cache\virtualenvs\agpt-IGpLPcbj-py3.11\Lib\site-packages\click\decorators.py", line 33, in new_func return f(get_current_context(), *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "L:\ai\AutoGPT\autogpts\autogpt\autogpt\app\cli.py", line 20, in cli ctx.invoke(run) File "C:\Users\major\AppData\Local\pypoetry\Cache\virtualenvs\agpt-IGpLPcbj-py3.11\Lib\site-packages\click\core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "L:\ai\AutoGPT\autogpts\autogpt\autogpt\app\cli.py", line 181, in run run_auto_gpt( File "L:\ai\AutoGPT\autogpts\autogpt\autogpt\core\runner\client_lib\utils.py", line 60, in wrapper return asyncio.run(f(*args, **kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\major\anaconda3\Lib\asyncio\runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Users\major\anaconda3\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\major\anaconda3\Lib\asyncio\base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "L:\ai\AutoGPT\autogpts\autogpt\autogpt\app\main.py", line 292, in run_auto_gpt await run_interaction_loop(agent) File "L:\ai\AutoGPT\autogpts\autogpt\autogpt\app\main.py", line 495, in run_interaction_loop ) = await agent.propose_action() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "L:\ai\AutoGPT\autogpts\autogpt\autogpt\agents\features\watchdog.py", line 36, in propose_action command_name, command_args, thoughts = await super( ^^^^^^^^^^^^ File "L:\ai\AutoGPT\autogpts\autogpt\autogpt\agents\base.py", line 251, in propose_action response = await self.llm_provider.create_chat_completion( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "L:\ai\AutoGPT\autogpts\autogpt\autogpt\core\resource\model_providers\openai.py", line 460, in create_chat_completion response.parsed_result = completion_parser(assistant_msg) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "L:\ai\AutoGPT\autogpts\autogpt\autogpt\agents\base.py", line 260, in <lambda> completion_parser=lambda r: self.parse_and_process_response( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "L:\ai\AutoGPT\autogpts\autogpt\autogpt\agents\agent.py", line 198, in parse_and_process_response self.event_history.register_action( File "L:\ai\AutoGPT\autogpts\autogpt\autogpt\models\action_history.py", line 151, in register_action raise ValueError("Action for current cycle already set") ValueError: Action for current cycle already set Press any key to continue . . .
Same issue here
Same here :(
This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days.
This issue was closed automatically because it has been stale for 10 days with no activity.
⚠️ Search for existing issues first ⚠️
Which Operating System are you using?
Linux
Which version of AutoGPT are you using?
Master (branch)
Do you use OpenAI GPT-3 or GPT-4?
GPT-4
Which area covers your issue best?
Commands
Describe your issue.
I approved my agent's plan and was met with these errors. I have replaced the specific question it was asking me with 'QUESTION_BEING_ASKED.'
Upload Activity Log Content
No response
Upload Error Log Content
No response