griptape-ai / ComfyUI-Griptape

A suite of Griptape nodes for ComfyUI
Apache License 2.0
45 stars 4 forks source link

Can not connect to APIs #36

Open freshlesh3 opened 1 week ago

freshlesh3 commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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

freshlesh3 commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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

shhlife commented 1 week ago

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 commented 6 days ago

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 commented 4 days ago

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

image