brianpetro / obsidian-smart-connections

Chat with your notes & see links to related content with AI embeddings. Use local models or 100+ via APIs like Claude, Gemini, ChatGPT & Llama 3
https://smartconnections.app
GNU General Public License v3.0
2.71k stars 182 forks source link

API key invalid and error thrown #748

Open stanislavkozlovski opened 1 month ago

stanislavkozlovski commented 1 month ago

When I add the API key I get an error. It's freshly created from https://platform.openai.com/api-keys

image

When I try to chat with it, I get an error:

image

The full response is:

"{
    "error": {
        "message": "Incorrect API key provided: undefined. You can find your API key at https://platform.openai.com/account/api-keys.",
        "type": "invalid_request_error",
        "param": null,
        "code": "invalid_api_key"
    }
}
"
stanislavkozlovski commented 1 month ago
image

It seems like it's not adding it at all? But I do see it in the settings

image
brianpetro commented 1 month ago

@stanislavkozlovski The API key setting can be found in the Smart Chat window, see this screenshot 🌴 Screenshot 2024-08-29 at 7 27 02 PM

carsten0202 commented 1 month ago

I have a related problem, except I cannot enter my API Key, because nothing happens when I click the settings button indicated by the green arrow.

brianpetro commented 1 month ago

@carsten0202 does an error appear in the console logs when you click the button? 🌴

carsten0202 commented 1 month ago

Yes. I get both an error when starting Obsidian and when clicking the button. It complains about port 37042 being in use. I would try changing it, but I can't find where to do that?

I've pulled a screenshot. The topmost errors are from startup, the one at the bottom is from when I click the settings button.

Screenshot 2024-09-03 141343

AaronArt commented 1 month ago

In my case I even have the paid version of ChatGPT. There is an alert window that says the API is valid, but when I try to chat, it says API error and when I look to the console log , it says, invalid API. So???