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.2k stars 157 forks source link

Smart chat with an occational API error #658

Open jiaqingw opened 3 weeks ago

jiaqingw commented 3 weeks ago

The symtom: when I ask my questions in the char window, I'd get an error message that says "API Error. See console logs for details.".

Here is what's shown in obsidian developer tool's console:

{
    "message": "An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. The following tool_call_ids did not have response messages: sql",
    "type": "invalid_request_error",
    "param": "messages.[6].role",
    "code": null
}

However, if I restart the obsidian, sometimes this error will go away but sometimes it will persist.

jiaqingw commented 3 weeks ago

just another observation, this API error could happen, even if I just want to complement the assitant with like

"excellent, great job!" or "you got that correct" etc...

again, upon restarting the obsidian will make these errors go away.

jiaqingw commented 3 weeks ago

BTW, this is one of the best AI integration with Obsidian I've found so far. When it works it really could find my old notes with relevant information.