Giter VIP home page Giter VIP logo

Comments (10)

RickyGrassmuck avatar RickyGrassmuck commented on June 23, 2024 1

Just ran into this as well. Looks like the model name gpt-4-turbo isn't a valid model name (anymore? not sure if it ever was) which is the name SmartConnections is using.

Information about available models

I was able to get the chat with the change shown in the diff below (File is located in ${PATH_TO_VAULT}/.obsidian/plugins/smart-connections/main.js on MacOS)

diff --git a/main.js b/main.js
index 0398f15..7e91959 100644
--- a/main.js
+++ b/main.js
@@ -5375,7 +5375,7 @@ var require_models2 = __commonJS({
         streaming: true
       },
       "openai-gpt-4-turbo": {
-        model_name: "gpt-4-turbo",
+        model_name: "gpt-4-turbo-preview",
         description: "OpenAI's GPT-4 model",
         max_input_tokens: 128e3,
         type: "API",

Basically, fix the model_name: "gpt-4-turbo" line, restart obsidian, go back and set the chat model to GPT4 turbo again in Smart Connections settings (Possibly need to reload after this too). Once you do that, chat should go back to working for you.

As a side note to @brianpetro, OpenAI provides the GET /v1/models endpoint for getting a list of all available models, it may be worth using that as a source of truth for model names in the event they go off and change things.

from obsidian-smart-connections.

bbecausereasonss avatar bbecausereasonss commented on June 23, 2024 1

For the record, getting API error on 3.5 openAI as well.

from obsidian-smart-connections.

bbecausereasonss avatar bbecausereasonss commented on June 23, 2024

Obsidian Developer Console
plugin:obsidian-icon-folder:5427 loading iconize
plugin:obsidian-mind-map:32574 Loading Mind Map plugin
plugin:obsidian-tasks-plugin:149 [2024-03-13-18:03:37.904][info][tasks] loading plugin "Tasks" v6.1.2
plugin:obsidian-minimal-settings:80 Folding is on
plugin:obsidian-minimal-settings:94 Line numbers are off
plugin:obsidian-minimal-settings:100 Readable line length is on
plugin:simple-embeds:29615 Loading Simple Embeds v1.15.0
plugin:obsidian-sortable:180 Sortable: loading plugin...
plugin:obsidian-sortable:183 Sortable: loaded plugin.
plugin:highlightr-plugin:3508 Highlightr v1.2.2 loaded
plugin:table-editor-obsidian:28854 loading markdown-table-editor plugin
plugin:webpage-html-export:74719 Loading webpage-html-export plugin
plugin:file-explorer-note-count:933 loading FileExplorerNoteCount
plugin:editing-toolbar:9 cMenuToolbar v2.4.0 loaded
plugin:obsidian-auto-link-title:404 loading obsidian-auto-link-title
plugin:obsidian-paste-image-rename:465 Plugin loading: obsidian-paste-image-rename 1.6.1 BUILD_ENV=production
plugin:recent-files-obsidian:234 Recent Files: Loading plugin v1.3.10
plugin:recent-files-obsidian:272 Recent Files: maxLength is not set, using default (50)
plugin:arrows:52 Loading Obsidian Arrows...
plugin:arrows:62 Loaded Obsidian Arrows.
plugin:link-favicon:9 enabling plugin: link favicons
plugin:obsidian-shortcuts-for-starred-files:96 loading Hotkeys for Bookmarks
2plugin:lovely-mindmap:495 setting
plugin:obsidian42-brat:2300 loading BRAT
plugin:obsidian-focus-mode:152 Loading Focus Mode plugin ...
plugin:obsidian-markdown-formatting-assistant-plugin:2364 Object
plugin:obsidian-markdown-formatting-assistant-plugin:4815 loading obsidian-markdown-formatting-assistant-plugin
plugin:copilot:80585 New LLM chain created.
plugin:copilot:91572 Setting model to GPT-4: gpt-4
plugin:pdf-to-markdown-plugin:62114 Found existing settings file
plugin:smart-connections:7477 Loading Smart Connections v2...
plugin:callout-manager:1620 Unable to fetch Obsidian stylesheet. Error: [obsidian-extra]: Obsidian 1.5.8 has not been tested with this function
at eval (plugin:callout-manager:154:13)
at Generator.next ()
at eval (plugin:callout-manager:147:67)
at new Promise ()
at __awaiter (plugin:callout-manager:129:10)
at fetchObsidianStyles (plugin:callout-manager:152:10)
at StylesheetWatcher.checkForChangesObsidian (plugin:callout-manager:1612:35)
at StylesheetWatcher.checkForChanges (plugin:callout-manager:1594:28)
at StylesheetWatcher.watch (plugin:callout-manager:1531:10)
at eval (plugin:callout-manager:2983:37)
at t. (app.js:1:2003310)
at app.js:1:237544
at Object.next (app.js:1:237649)
at a (app.js:1:236367)
checkForChangesObsidian @ plugin:callout-manager:1620
plugin:obsidian-excalidraw-plugin:95 Initialized Excalidraw Image Cache
plugin:smart-connections:5316 get_conversation_ids_and_file_types
plugin:smart-connections:5318 Object
plugin:smart-connections:6975 SmartConversationMD
plugin:smart-connections:6634 init SmartChatRenderer
plugin:smart-connections:6635 <div class=​"workspace-leaf-content" data-type=​"smart-connections-chat-view">​…​​flex
plugin:smart-connections:6637 SmartConversationMD
plugin:obsidian-icon-folder:581 loaded icon pack font-awesome-brands (459)
plugin:obsidian-icon-folder:581 loaded icon pack font-awesome-regular (161)
plugin:smart-connections:4635 Parent changed, reloading
plugin:obsidian-icon-folder:581 loaded icon pack font-awesome-solid (1128)
plugin:smart-connections:114 Loading: .smart-connections/smart_notes-text-embedding-3-small.ajson
plugin:smart-connections:114 Loading: .smart-connections/smart_blocks-text-embedding-3-small-512.ajson
plugin:smart-connections:122 Loaded: smart_notes-text-embedding-3-small.ajson
plugin:smart-connections:122 Loaded: smart_blocks-text-embedding-3-small-512.ajson
plugin:smart-connections:157 Saving: smart_notes-text-embedding-3-small.ajson
plugin:smart-connections:151 Already saving: smart_notes-text-embedding-3-small.ajson
plugin:smart-connections:1452 total tokens exceeds max_tokens 30660
plugin:smart-connections:7754 Object
plugin:smart-connections:7756 2.1.3
plugin:smart-connections:7759 Already up to date
plugin:smart-connections:114 Loading: .smart-connections/smart_notes-text-embedding-3-small.ajson
plugin:smart-connections:114 Loading: .smart-connections/smart_blocks-text-embedding-3-small-512.ajson
plugin:smart-connections:151 Already saving: smart_notes-text-embedding-3-small.ajson
plugin:smart-connections:157 Saving: smart_notes-text-embedding-3-small.ajson
plugin:smart-connections:122 Loaded: smart_notes-text-embedding-3-small.ajson
plugin:smart-connections:122 Loaded: smart_blocks-text-embedding-3-small-512.ajson
2plugin:smart-connections:151 Already saving: smart_notes-text-embedding-3-small.ajson
plugin:smart-connections:1452 total tokens exceeds max_tokens 30660
plugin:smart-connections:188 Error saving: smart_notes-text-embedding-3-small.ajson
_save @ plugin:smart-connections:188
plugin:smart-connections:189 Error: EPERM: operation not permitted, rename 'W:\Dropbox\Inbox\Obsidian.smart-connections\smart_notes-text-embedding-3-small.temp.ajson' -> 'W:\Dropbox\Inbox\Obsidian.smart-connections\smart_notes-text-embedding-3-small.ajson'
_save @ plugin:smart-connections:189
plugin:smart-connections:188 Error saving: smart_notes-text-embedding-3-small.ajson
_save @ plugin:smart-connections:188
plugin:smart-connections:189 Error: EPERM: operation not permitted, open 'W:\Dropbox\Inbox\Obsidian.smart-connections\smart_notes-text-embedding-3-small.temp.ajson'
_save @ plugin:smart-connections:189
plugin:smart-connections:196 Uncaught (in promise) Error: EPERM: operation not permitted, rename 'W:\Dropbox\Inbox\Obsidian.smart-connections\smart_notes-text-embedding-3-small.temp.ajson' -> 'W:\Dropbox\Inbox\Obsidian.smart-connections\smart_notes-text-embedding-3-small.failed-1710367427484.ajson'
plugin:smart-connections:2062 Uncaught (in promise) Error: EPERM: operation not permitted, rename 'W:\Dropbox\Inbox\Obsidian.smart-connections\smart_notes-text-embedding-3-small.temp.ajson' -> 'W:\Dropbox\Inbox\Obsidian.smart-connections\smart_notes-text-embedding-3-small.failed-1710367427485.ajson'
plugin:obsidian-icon-folder:581 loaded icon pack icon-brew (284)
plugin:smart-connections:151 Already saving: smart_notes-text-embedding-3-small.ajson
plugin:obsidian-icon-folder:581 loaded icon pack lucide-icons (897)
plugin:smart-connections:157 Saving: smart_blocks-text-embedding-3-small-512.ajson
plugin:smart-connections:151 Already saving: smart_notes-text-embedding-3-small.ajson
plugin:smart-connections:203 New file size: 37299857 bytes
plugin:smart-connections:204 Old file size: 37299830 bytes
plugin:smart-connections:183 Saved smart_blocks-text-embedding-3-small-512.ajson in 815ms
plugin:obsidian-icon-folder:581 loaded icon pack remix-icons (2271)
plugin:smart-connections:2183 Object
plugin:smart-connections:2183 Object
plugin:obsidian-icon-folder:581 loaded icon pack simple-icons (2413)
plugin:obsidian-icon-folder:581 loaded icon pack tabler-icons (4140)
plugin:lovely-mindmap:201 Uncaught TypeError: Cannot read properties of undefined (reading 'selection')
at Node.getSelection (plugin:lovely-mindmap:201:29)
at View.isTouching (plugin:lovely-mindmap:431:27)
at Keymap.focusNode (plugin:lovely-mindmap:388:24)
at e.handleKey (app.js:1:748623)
at e.handleKey (app.js:1:748736)
at t.handleKey (app.js:1:748945)
at e.onKeyEvent (app.js:1:749879)
plugin:smart-connections:157 Saving: smart_notes-text-embedding-3-small.ajson
plugin:smart-connections:157 Saving: smart_blocks-text-embedding-3-small-512.ajson
plugin:smart-connections:183 Saved smart_notes-text-embedding-3-small.ajson in 577ms
plugin:smart-connections:203 New file size: 37299857 bytes
plugin:smart-connections:204 Old file size: 37299857 bytes
plugin:smart-connections:183 Saved smart_blocks-text-embedding-3-small-512.ajson in 954ms
plugin:smart-connections:6395 Array(1)
plugin:smart-connections:6364 Array(1)
plugin:smart-connections:5147 chat_ml
plugin:smart-connections:5148 Object
plugin:smart-connections:6371 should trigger retrieval
plugin:smart-connections:6403 get_context_hyde
plugin:smart-connections:6020 Object
plugin:smart-connections:6023 Object
plugin:smart-connections:6025 Object
plugin:smart-connections:6027 Object
complete @ plugin:smart-connections:6027
plugin:smart-connections:6034 TypeError: done_handler is not a function
at SmartModel.complete (plugin:smart-connections:6028:20)
at async ScActions.get_context_hyde (plugin:smart-connections:6409:21)
at async ScActions.new_user_message (plugin:smart-connections:6376:11)
at async ScChat.new_user_message (plugin:smart-connections:6984:9)
complete @ plugin:smart-connections:6034
plugin:smart-connections:1428 input is empty
plugin:smart-connections:5147 chat_ml
plugin:smart-connections:5148 Object
plugin:smart-connections:6433 Array(0)
plugin:smart-connections:5147 chat_ml
plugin:smart-connections:5148 Object
plugin:smart-connections:7017 Object
plugin:smart-connections:7017 Object
api.openai.com/v1/chat/completions:1 Failed to load resource: the server responded with a status of 404 ()
plugin:smart-connections:6121 CustomEvent
eval @ plugin:smart-connections:6121
plugin:smart-connections:5147 chat_ml
plugin:smart-connections:5148 Object
plugin:smart-connections:6999 Uncaught (in promise) CustomEvent
2plugin:smart-connections:7624 old showing notice
plugin:smart-connections:2677 WebSocket connection to 'ws://localhost:37042/' failed:
eval @ plugin:smart-connections:2677
connect_to_websocket @ plugin:smart-connections:2676
init @ plugin:smart-connections:2752
plugin:smart-connections:2699 Websocket error Event {isTrusted: true, type: 'error', target: WebSocket, currentTarget: WebSocket, eventPhase: 2, …}
on_error @ plugin:smart-connections:2699
ws.onerror @ plugin:smart-connections:2689
error (async)
eval @ plugin:smart-connections:2687
connect_to_websocket @ plugin:smart-connections:2676
init @ plugin:smart-connections:2752
plugin:smart-connections:2695 Failed to connect to WebSocket: Event {isTrusted: true, type: 'error', target: WebSocket, currentTarget: WebSocket, eventPhase: 2, …}
connect_to_websocket @ plugin:smart-connections:2695
await in connect_to_websocket (async)
init @ plugin:smart-connections:2752
plugin:smart-connections:2753 DataviewSocket initialized
plugin:smart-connections:2789 Disconnected from websocket
plugin:smart-connections:2677 WebSocket connection to 'ws://localhost:37042/' failed:
eval @ plugin:smart-connections:2677
connect_to_websocket @ plugin:smart-connections:2676
init @ plugin:smart-connections:2752
plugin:smart-connections:2699 Websocket error Event {isTrusted: true, type: 'error', target: WebSocket, currentTarget: WebSocket, eventPhase: 2, …}
on_error @ plugin:smart-connections:2699
ws.onerror @ plugin:smart-connections:2689
error (async)
eval @ plugin:smart-connections:2687
connect_to_websocket @ plugin:smart-connections:2676
init @ plugin:smart-connections:2752
plugin:smart-connections:2695 Failed to connect to WebSocket: Event {isTrusted: true, type: 'error', target: WebSocket, currentTarget: WebSocket, eventPhase: 2, …}
connect_to_websocket @ plugin:smart-connections:2695
await in connect_to_websocket (async)
init @ plugin:smart-connections:2752
plugin:smart-connections:2753 DataviewSocket initialized
plugin:smart-connections:2789 Disconnected from websocket

from obsidian-smart-connections.

brianpetro avatar brianpetro commented on June 23, 2024

@RickyGrassmuck @bbecausereasonss good catch.

I'll have that fixed shortly.

🌴

from obsidian-smart-connections.

bbecausereasonss avatar bbecausereasonss commented on June 23, 2024

from obsidian-smart-connections.

brianpetro avatar brianpetro commented on June 23, 2024

@bbecausereasonss can you confirm that your using the Google AI studio API key? https://aistudio.google.com/app/prompts/new_chat/

from obsidian-smart-connections.

bbecausereasonss avatar bbecausereasonss commented on June 23, 2024

from obsidian-smart-connections.

brianpetro avatar brianpetro commented on June 23, 2024

@bbecausereasonss thanks, I'll also give that a look shortly
🌴

from obsidian-smart-connections.

brianpetro avatar brianpetro commented on June 23, 2024

@bbecausereasonss the GPT-3.5 error should be fixed. It was token calculation-related.

The Google API key issue was likely caused by the test code. The test code is fixed, so it should return that the API key is valid.

The v2.1 beta version should automatically update to v2.1.4 next time you restart the plugin (enable/disable) or restart Obsidian.

🌴

from obsidian-smart-connections.

brianpetro avatar brianpetro commented on June 23, 2024

@RickyGrassmuck thanks for narrowing down the issue. It's been fixed in v2.1.4.

And I made a note to auto-import the models from the API endpoint. Thanks for the 💡

🌴

from obsidian-smart-connections.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.