Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status Code 400 #1063

Open
Vairal77 opened this issue Oct 26, 2024 · 13 comments
Open

Status Code 400 #1063

Vairal77 opened this issue Oct 26, 2024 · 13 comments

Comments

@Vairal77
Copy link

Hello? I keep getting Error Creating Task from Prompt. The example tasks return Max Retries error. I'm on Windows using Claude 3 Sonnet. Regards

@wintonzheng
Copy link
Contributor

wintonzheng commented Oct 26, 2024

@Vairal77 Hello. Are you running skyvern with docker images in Windows? how are you running it? What is your LLM_KEY in .env? did you have ANTHROPIC_API_KEY set up in .env?

@adya14
Copy link

adya14 commented Oct 27, 2024

Facing the same issue. All tasks are failing. I have used OpenAI API and set LLm as OPENAI_GPT4_TURBO. ANTHROPIC_API_KEY is false. Running with docker images in Windows

@Vairal77
Copy link
Author

@wintonzheng good day? I'm running a docker container as per the installation instructions. Using ANTHROPIC_CLAUDE3_SONNET and I've set the API key in env

@wintonzheng
Copy link
Contributor

wintonzheng commented Oct 27, 2024

https://github.com/Skyvern-AI/skyvern?tab=readme-ov-file#environment-variables

To set up anthropic sonnet 3 or 3.5, please make sure these environment vars are set in the .env file:

ENABLE_ANTHROPIC=true
ANTHROPIC_API_KEY=<YOUR API KEY>
LLM_KEY=[ANTHROPIC_CLAUDE3_SONNET or ANTHROPIC_CLAUDE3.5_SONNET]

@Vairal77 @adya14 If this still doesn't work, please share your error logs if any with me by inspecting the skyvern api service - docker logs -f <the skyvern container>.

Happy to debug together if that's preferred. [email protected] or join our discord

@Vairal77
Copy link
Author

Thank you for your speedy response. I have shared the error logs as well as the LLM Environment I have set. Seems to be looking for OpenAI despite setting to anthropic sonnet 3.5 - Regards
skyvern1.txt
LLM.txt
skyvern

@dginovker
Copy link

dginovker commented Oct 28, 2024

I found the issue in my case was I was using Open AI, but I didn't have LLM_KEY set in docker-compose.yml. The reason it wasn't set was because LLM_KEY is commented out beneath the text saying "If you want to use other LLM provider, like azure and anthropic", so I assumed it wasn't needed.

Anyways, the error message should probably indicate the LLM_KEY isn't set

@adya14
Copy link

adya14 commented Oct 29, 2024

I am using Azure API
I have set all these values in docker_compose.yaml file
ENABLE_AZURE=true
LLM_KEY=AZURE_OPENAI
AZURE_DEPLOYMENT=gpt3turbo
AZURE_API_KEY= My api key
AZURE_API_BASE=https://nextgenaiaustraliaeast.openai.azure.com/
AZURE_API_VERSION=2023-05-15 #

This is my error for all tasks

Screenshot 2024-10-29 114639

@wintonzheng
Copy link
Contributor

@Vairal77
Oh my bad, I meant to say you should check the environment for the skyvern service in your docker-compose.yml:

ENABLE_ANTHROPIC=true
ANTHROPIC_API_KEY=<YOUR API KEY>
LLM_KEY=[ANTHROPIC_CLAUDE3_SONNET or ANTHROPIC_CLAUDE3.5_SONNET]

@wintonzheng
Copy link
Contributor

I found the issue in my case was I was using Open AI, but I didn't have LLM_KEY set in docker-compose.yml. The reason it wasn't set was because LLM_KEY is commented out beneath the text saying "If you want to use other LLM provider, like azure and anthropic", so I assumed it wasn't needed.

Anyways, the error message should probably indicate the LLM_KEY isn't set

@dginovker great suggestion. Will add error messages and fail hard if env vars are not set up correctly: #1084

@Vairal77
Copy link
Author

Vairal77 commented Oct 30, 2024

LLM
Good day all?

  1. litellm.exceptions.AuthenticationError: litellm.AuthenticationError: AuthenticationError: OpenAIException - Incorrect API key provided: <your_op*****key>. You can find your API key at https://platform.openai.com/account/api-keys
  2. [info ] Calling LLM API llm_key=OPENAI_GPT4O model=gpt-4o

I've set ANTHROPIC_CLAUDE3.5_SONNET and API Key for said LLM in docker-compose.yml and env.example. ENABLE_OPENAI=false and ENABLE_ANTHROPIC=true on both docker-compose.yml and env.example. I don't understand, unless there's a file somewhere that sets OPENAI_GPT4O as the default LLM thus the API call error? I don't know ...

@LawyZheng
Copy link
Collaborator

@Vairal77 Did you recreate the docker container by running docker compose up -d.

Only update the docker compose file without recreating the containers won't update the configuration for containers.

@tgaldes
Copy link

tgaldes commented Nov 2, 2024

LLM_KEY=OPENAI_GPT4V, my open ai api key in OPEN_API_KEY and also adding a billing for my org in the open ai platform, adding $10, and waiting a few minutes got it working for me

@suchintan
Copy link
Contributor

@tgaldes we highly recommend using GPT-4O instead of GPT-4V -- 4O is cheaper and better haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants