Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when attempting to use Claude API #928

Open
InusahLore42 opened this issue Dec 17, 2024 · 1 comment
Open

Error when attempting to use Claude API #928

InusahLore42 opened this issue Dec 17, 2024 · 1 comment

Comments

@InusahLore42
Copy link

Im attempting to make use of smart connections for obsidian but it seems like the lookup function fails when using Claude 3.5. - Sonnet.

These are the most recent logs I have, any insight on how to resolve this issue?

plugin:smart-connections:13179 request_params {url: 'https://api.anthropic.com/v1/messages', method: 'POST', headers: {…}, body: '{"model":"claude-3-5-sonnet-latest","max_tokens":4…}],"tool_choice":{"type":"tool","name":"lookup"}}'}
plugin:smart-connections:13182 http_resp SmartHttpObsidianResponseAdapter {response: {…}}response: {status: 200, headers: {…}, arrayBuffer: ArrayBuffer(589)}[[Prototype]]: SmartHttpResponseAdapter3
plugin:smart-connections:17829 filter {limit: '10'}[[Prototype]]: Object
plugin:smart-connections:9040 Fetch finished loading: POST "https://api.openai.com/v1/embeddings".
request @ plugin:smart-connections:9040
request @ plugin:smart-connections:9005
request @ plugin:smart-connections:9197
embed_batch @ plugin:smart-connections:9145
await in embed_batch (async)
invoke_adapter_method @ plugin:smart-connections:8526
embed_batch @ plugin:smart-connections:8704
lookup @ plugin:smart-connections:6040
handle_lookup_tool_call @ plugin:smart-connections:17759
handle_tool_calls @ plugin:smart-connections:17735
handle_message_from_chat_model @ plugin:smart-connections:17332
await in handle_message_from_chat_model (async)
complete @ plugin:smart-connections:17402
await in complete (async)
init @ plugin:smart-connections:18244
await in init (async)
eval @ plugin:smart-connections:4997
create_or_update @ plugin:smart-connections:4996
handle_message_from_user @ plugin:smart-connections:17283
eval @ plugin:smart-connections:16994
plugin:smart-connections:6066 Found and returned 10 smart_blocks.
plugin:smart-connections:8121 Saving smart_threads: 1 items
plugin:smart-connections:8134 Saved smart_threads in 5ms
plugin:smart-connections:17568 Moved last user message to the end of the request for better context handling.
plugin:smart-connections:13206 request_params {url: 'https://api.anthropic.com/v1/messages', method: 'POST', headers: {…}, body: '{"model":"claude-3-5-sonnet-latest","max_tokens":4…type":"text","text":"tell me about my notes"}]}]}'}
plugin:smart-connections:12740 POST https://api.anthropic.com/v1/messages 400
stream @ plugin:smart-connections:12740
eval @ plugin:smart-connections:13239
stream @ plugin:smart-connections:13207
invoke_adapter_method @ plugin:smart-connections:12337
stream @ plugin:smart-connections:12487
complete @ plugin:smart-connections:17391
await in complete (async)
eval @ plugin:smart-connections:18063
plugin:smart-connections:13234 Stream error: CustomEvent {isTrusted: false, data: '{"type":"error","error":{"type":"invalid_request_e…seortool_result blocks must define tools."}}', source: SmartStreamer, detail: null, type: 'error', …} eval @ plugin:smart-connections:13234 eval @ plugin:smart-connections:12717 dispatchEvent @ plugin:smart-connections:12716 #onStreamFailure @ plugin:smart-connections:12762 #onStreamProgress @ plugin:smart-connections:12772 XMLHttpRequest.send (async) stream @ plugin:smart-connections:12740 eval @ plugin:smart-connections:13239 stream @ plugin:smart-connections:13207 invoke_adapter_method @ plugin:smart-connections:12337 stream @ plugin:smart-connections:12487 complete @ plugin:smart-connections:17391 await in complete (async) eval @ plugin:smart-connections:18063 plugin:smart-connections:17432 error_handler *API Error. See console logs for details.* error_handler @ plugin:smart-connections:17432 eval @ plugin:smart-connections:13235 eval @ plugin:smart-connections:12717 dispatchEvent @ plugin:smart-connections:12716 #onStreamFailure @ plugin:smart-connections:12762 #onStreamProgress @ plugin:smart-connections:12772 XMLHttpRequest.send (async) stream @ plugin:smart-connections:12740 eval @ plugin:smart-connections:13239 stream @ plugin:smart-connections:13207 invoke_adapter_method @ plugin:smart-connections:12337 stream @ plugin:smart-connections:12487 complete @ plugin:smart-connections:17391 await in complete (async) eval @ plugin:smart-connections:18063 plugin:smart-connections:18064 Uncaught (in promise) CustomEvent {isTrusted: false, data: '{"type":"error","error":{"type":"invalid_request_e…se or tool_result blocks must define tools."}}', source: SmartStreamer, detail: null, type: 'error', …}
eval @ plugin:smart-connections:18064
plugin:smart-connections:12740 XHR failed loading: POST "https://api.anthropic.com/v1/messages".
stream @ plugin:smart-connections:12740
eval @ plugin:smart-connections:13239
stream @ plugin:smart-connections:13207
invoke_adapter_method @ plugin:smart-connections:12337
stream @ plugin:smart-connections:12487
complete @ plugin:smart-connections:17391
await in complete (async)
eval @ plugin:smart-connections:18063

@brianpetro
Copy link
Owner

I think this is fixed in the latest version 2.3.46. Let me know if updating fixes it 🌴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants