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

Can not connect to APIs #36

Open
freshlesh3 opened this issue Jun 23, 2024 · 11 comments
Open

Can not connect to APIs #36

freshlesh3 opened this issue Jun 23, 2024 · 11 comments
Assignees

Comments

@freshlesh3
Copy link

I have installed the correct API key and getting this error. I have used the Anthropic and OpenAI keys. I created the .env file with the API key string and restarted comfyui:

Error code: 401 - {'error': {'message': 'Incorrect API key provided: sk-2bOuG***************************************II7o. You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}

**Note that the API key that is shown is not the one I placed in the .env for some reason, it shows a previous version in the error message.

I am using windows 11, with Comfyui portable build

@shhlife
Copy link
Collaborator

shhlife commented Jun 24, 2024

Good morning - are you still seeing the issue?

Where is your .env file located? Is it in the main ComfyUI folder, or in the ComfyUI-Griptape folder?

@shhlife shhlife self-assigned this Jun 24, 2024
@shhlife
Copy link
Collaborator

shhlife commented Jun 27, 2024

@freshlesh3 just checking in to see if you've had a chance to try again?

@freshlesh3
Copy link
Author

freshlesh3 commented Jun 28, 2024

Good morning - are you still seeing the issue?

Where is your .env file located? Is it in the main ComfyUI folder, or in the ComfyUI-Griptape folder?

Hey thanks for the response. I think I had a

@freshlesh3 just checking in to see if you've had a chance to try again?

Hey thanks for the response my .env file is in my \ComfyUI.env folder and still not working.

@freshlesh3
Copy link
Author

Good morning - are you still seeing the issue?
Where is your .env file located? Is it in the main ComfyUI folder, or in the ComfyUI-Griptape folder?

Hey thanks for the response. I think I had a

@freshlesh3 just checking in to see if you've had a chance to try again?

Hey thanks for the response my .env file is in my \ComfyUI.env folder and still not working.

Good morning - are you still seeing the issue?
Where is your .env file located? Is it in the main ComfyUI folder, or in the ComfyUI-Griptape folder?

Hey thanks for the response. I think I had a

@freshlesh3 just checking in to see if you've had a chance to try again?

Hey thanks for the response my .env file is in my \ComfyUI.env folder and still not working.

Actually I just tried it and updated the custom nodes and its working now. Both Ollama and the Claude Sonnet models are working great. Thanks for the follow up and the assist @shhlife

@freshlesh3
Copy link
Author

Correction. I get this error when I run a griptape run: Image description now.
Error code: 401 - {'error': {'message': 'Incorrect API key provided: sk-2bOuG***************************************II7o. You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}

@shhlife
Copy link
Collaborator

shhlife commented Jun 28, 2024

Looks like it was working for a second, and now it isn't! D'oh! :)

can you show me an image of your graph so I can help debug?

cheers!
-Jason

@freshlesh3
Copy link
Author

Looks like it was working for a second, and now it isn't! D'oh! :)

can you show me an image of your graph so I can help debug?

Cheers! -jason

Here is my workflow.
Screenshot 2024-06-28 182310

@shhlife
Copy link
Collaborator

shhlife commented Jun 29, 2024

Okay, yeah it looks like it's not getting the OPENAI api key.. and it's set in your .env file on disk?

@shhlife
Copy link
Collaborator

shhlife commented Jun 29, 2024

If you're looking to use Claude, you'll need to create a config & then connect that to an agent, and connect the agent to the Run Image Description.. this is because the default agent uses OpenAI

image

@freshlesh3
Copy link
Author

If you're looking to use Claude, you'll need to create a config & then connect that to an agent, and connect the agent to the Run Image Description.. this is because the default agent uses OpenAI

image

The Claude API is working, but as I am testing all of the pipelines I have issues running LM Studio, and Ollama

@shhlife
Copy link
Collaborator

shhlife commented Jul 1, 2024

Ah, okay - I've just pushed a new update that allows you to set the url & port - can you give it a try?

image

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

No branches or pull requests

2 participants