brianpetro/obsidian-smart-connections

Unable to use OpenAI models in Smart Chat

Closed this issue · 5 comments

Thank you for creating a great plugin.
I found an issue and submitted it. It may seem simple, but it is a fatal problem. 🥹

Issue Description:
I used local LLM and OpenAI's ChatGPT in parallel for some experiments.
After updating to version 2.2.70, I experienced issue #787 , which was resolved in 2.2.72.
However, after recently updating to version 2.2.76, I discovered I could not use OpenAI's models.
Checking the Obsidian management console, I found that all the previously used settings were saved and the API key was properly activated.
It seems there's an error in loading the list of OpenAI models.

Steps to Reproduce:

  1. Change the Model Platform to OpenAI in Smart Chat settings.
  2. The 'Model Name' field is empty.
  3. Pressing the Refresh Models List button does not display any model list. (Please refer to screenshot No.3)

System Information:
OS: Windows 11 Pro
Obsidian Version: 1.6.7
Smart Connections Plugin Version: 2.2.76

Additional Information:
Error message displayed in the Obsidian developer console: 'Failed to fetch model data: Error: Request failed, status 401' Error

Screenshot:
No.1
This is the content of the Obsidian Developer Console. The plugin loads normally.
Screenshot_1

No.2
Probably the cause of this issue.
Screenshot_2

No.3
The model list does not appear in the Smart Chat settings window.
Screenshot_3

Hi @ravn-gt . Thanks for the detailed report.

When scrolling down in the chat settings, is the API key still present?

🌴

Yes, this is all in the settings window.

screenshot4

I can confirm having the same issue. On my Mac Pro (M3). Latest version of this plugin and obsidian.

#802
I found a solution to this issue in the link above. sorry for not checking it first.

Here is a solution for anyone who is having the same issue as me:

  1. Get a new API Key from OpenAI.
  2. Enter it in the Smart Chat settings window.
  3. You should see the model list loading properly.

Solve

When I checked in the OpenAI panel, the old API Key was activated, but for some reason, it seems that it is not authenticating through Obsidian. Getting a new key is the fastest and easiest solution.

@ravn-gt thanks for the follow-up 😊🌴