SuperAGI
SuperAGI copied to clipboard
"Stopped: Maximum iterations exceeded!"
⚠️ Check for existing issues before proceeding. ⚠️
- [X] I have searched the existing issues, and there is no existing issue for my problem
Where are you using SuperAGI?
Windows
Which branch of SuperAGI are you using?
Main
Do you use OpenAI GPT-3.5 or GPT-4?
GPT-3.5
Which area covers your issue best?
Prompt
Describe your issue.
"Stopped: Maximum iterations exceeded!" What is the cause of this error??
How to replicate your Issue?
No response
Upload Error Log Content
celery_1 | [2023-07-09 23:11:37,551: INFO/ForkPoolWorker-8] ITERATION_LIMIT_CROSSED
Hey, you can increase the maximum iterations when you're creating an agent in the advanced settings.
You configure it upto 100.
Even if I set it to 100, it still doesn't work. Could this problem be because I am not a gpt plus subscriber?
Can you let me know what do you mean by not working? It is stuck or it stops after a few iterations not going till 100?
Can you let me know what do you mean by not working? It is stuck or it stops after a few iterations not going till 100?
it gave the warning in the image I gave above, then it stopped. so it gave me no result. i tried everything; gpt-3.5, gpt-4, different tools... it still gives the same error. I think this might be because I didn't get an OpenAI subscription and upgrade to gpt 4.
I think the above error is linked to 2 things they system is hard coded to use 1 steps, the reason for this I believe is to keep it focused on results rather than just making list, 2nd if there isn't enough information in the instructions it runs out of information and just say it finished, 3 when you have given it lots of information and you reach the limit you just re run the system and it picks up from were it left if (I believe) I still change the first line to say pick up from were you finished to prime it to search for the last work it did.
I think the above error is linked to 2 things they system is hard coded to use 1 steps, the reason for this I believe is to keep it focused on results rather than just making list, 2nd if there isn't enough information in the instructions it runs out of information and just say it finished, 3 when you have given it lots of information and you reach the limit you just re run the system and it picks up from were it left if (I believe) I still change the first line to say pick up from were you finished to prime it to search for the last work it did.
I think you are wrong, what I am trying to get AI to do is not a complex project. Let me prove it to you like this: I run the program without using "Windows" or "codespaces", I run it with "SuperAGI Cloud" by logging in from the application's web address. I log in with my Github account and enter the OpenAI API Key. So, until this stage, there cannot be any error in the "config" file or any inadequacy in my computer. Let's create an "agent". I use the "SuperCode" template that I downloaded from the "Marketplace". As an example, I run the program without changing any input previously entered (I tried all "gpt" models.) BUT again the same error: "Stopped: Maximum iterations exceeded!"
I have ran that code and had to keep telling it to run again until it finished its code, im ising github codespace but i dint use templete i lounched it by connecting to code space in vs code at bottom left and onve in i used docker-compose up --build
From: Ulaş @.> Sent: 10 July 2023 13:30 To: TransformerOptimus/SuperAGI @.> Cc: Darren Tarmey @.>; Comment @.> Subject: Re: [TransformerOptimus/SuperAGI] "Stopped: Maximum iterations exceeded!" (Issue #705)
I think the above error is linked to 2 things they system is hard coded to use 1 steps, the reason for this I believe is to keep it focused on results rather than just making list, 2nd if there isn't enough information in the instructions it runs out of information and just say it finished, 3 when you have given it lots of information and you reach the limit you just re run the system and it picks up from were it left if (I believe) I still change the first line to say pick up from were you finished to prime it to search for the last work it did.
I think you are wrong, what I am trying to get AI to do is not a complex project. Let me prove it to you like this: I run the program without using "Windows" or "codespaces", I run it with "SuperAGI Cloud" by logging in from the application's web address. I log in with my Github account and enter the OpenAI API Key. So, until this stage, there cannot be any error in the "config" file or any inadequacy in my computer. Let's create an "agent". I use the "SuperCode" template that I downloaded from the "Marketplace". As an example, I run the program without changing any input previously entered (I tried all "gpt" models.) BUT again the same error: "Stopped: Maximum iterations exceeded!"
— Reply to this email directly, view it on GitHubhttps://github.com/TransformerOptimus/SuperAGI/issues/705#issuecomment-1628863143, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAEQFCSPDPM3733TZBVJUQTXPPYW3ANCNFSM6AAAAAA2DZDZDU. You are receiving this because you commented.Message ID: @.***>
I have ran that code and had to keep telling it to run again until it finished its code, im ising github codespace but i dint use templete i lounched it by connecting to code space in vs code at bottom left and onve in i used docker-compose up --build … ________________________________ From: Ulaş @.> Sent: 10 July 2023 13:30 To: TransformerOptimus/SuperAGI @.> Cc: Darren Tarmey @.>; Comment @.> Subject: Re: [TransformerOptimus/SuperAGI] "Stopped: Maximum iterations exceeded!" (Issue #705) I think the above error is linked to 2 things they system is hard coded to use 1 steps, the reason for this I believe is to keep it focused on results rather than just making list, 2nd if there isn't enough information in the instructions it runs out of information and just say it finished, 3 when you have given it lots of information and you reach the limit you just re run the system and it picks up from were it left if (I believe) I still change the first line to say pick up from were you finished to prime it to search for the last work it did. I think you are wrong, what I am trying to get AI to do is not a complex project. Let me prove it to you like this: I run the program without using "Windows" or "codespaces", I run it with "SuperAGI Cloud" by logging in from the application's web address. I log in with my Github account and enter the OpenAI API Key. So, until this stage, there cannot be any error in the "config" file or any inadequacy in my computer. Let's create an "agent". I use the "SuperCode" template that I downloaded from the "Marketplace". As an example, I run the program without changing any input previously entered (I tried all "gpt" models.) BUT again the same error: "Stopped: Maximum iterations exceeded!" [image]https://user-images.githubusercontent.com/96961115/252339111-c816a942-5251-489b-84a8-db39302c4ec7.png — Reply to this email directly, view it on GitHub<#705 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAEQFCSPDPM3733TZBVJUQTXPPYW3ANCNFSM6AAAAAA2DZDZDU. You are receiving this because you commented.Message ID: @.***>
i have already run this code in "codespace". after making sure that everything is working properly, i connected to the port and tried again. none of these steps worked sorry. if you ask me, the problem will be solved when i buy OpenAI plus subscription.
Because in the "OpenAI API" key I have only default "gpt-3" is available. The SuperAGI program requires at least "gpt-3.5" (or "gpt-4"). Do you think I have the right idea? Am I right?
I too am having this issue recently. This is a curl test to test both the model, and my key.
┌─[siraj@white] - [~/ai/controllers/SuperAGI] - [2023-07-10 11:59:45]
└─[0] <git:(main 2b1ae8aa) > curl https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Say this is a test!"}],
"temperature": 0.7
}'
{
"id": "chatcmpl-7anaqDhyHXflA61FNCN6X9m9wVJFw",
"object": "chat.completion",
"created": 1689004800,
"model": "gpt-3.5-turbo-0613",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "This is a test!"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 13,
"completion_tokens": 5,
"total_tokens": 18
}
}
However, when I launch SuperAGI and start the task agent I get the following in the error log after attempting to connect several times: celery_1 | Ensure the response can be parsed by Python json.loads. celery_1 | [2023-07-10 16:03:20,315: INFO/ForkPoolWorker-8] error_code=invalid_api_key error_message='Incorrect API key provided: 5545454. You can find your API key at https://platform.openai.com/account/api-keys.' error_param=None error_type=invalid_request_error message='OpenAI API error received' stream_error=False celery_1 | 2023-07-10 16:03:20 UTC - Super AGI - INFO - [/app/superagi/llms/openai.py:79] - Exception: celery_1 | [2023-07-10 16:03:20,315: INFO/ForkPoolWorker-8] Exception: celery_1 | 2023-07-10 16:03:20 UTC - Super AGI - INFO - [/app/superagi/llms/openai.py:79] - Incorrect API key provided: 5545454. You can find your API key at https://platform.openai.com/account/api-keys.
The API key is working as shown in the curl test. Maybe I'll look through recent merges to see if something could have created this problem during a merge.
Hi there,
I have tried several times and gotten “Stopped: Maximum iterations exceeded!” That halted all testing.
Just wanted to reflect the problem and situations.
Thanks
Having the same issue!!
[WORKING SOLUTION] I was facing the same issue on the Super AGI "Super Coder" agent and tried a few more, had the same issue. However, I have resolved it for me now and its working.
STEPS TO RESOLVE:
- While setting up the environment make sure to add these 4 API keys in the "config.yaml" file which should be a renamed version of "config-template.yaml":
- Open AI API key
- Pinecone API key
- Google Console Search API key
- Custom Search Engine ID (not an API key)
-
Make sure to check that your API key has available quota for usage try to run it into a python script like below:
import openai openai.api_key = '**YOUR-API_KEY**' def is_api_key_valid(): try: response = openai.Completion.create( engine="davinci", prompt="This is a test.", max_tokens=5 ) except: return False else: return True api_key_valid = is_api_key_valid() print("API key is valid:", api_key_valid)
-
Start with simpler automations for any task, like say building a calculator using SuperCoder Agent.
-
If all the above steps are performed and the Open AI API key has usage limit available the AGI shall work fine.
Feel free to share if you're still facing any issues :)