brianpetro/obsidian-smart-connections

Error (422) when using context from document

Opened this issue · 1 comments

Hi, Im using obsidian v1.7.7. and Smart Connections v2.3.39 , when I chat with prompt to ask from my document, I got this error, any ideas ?

 Error (422)
 
Provider returned error {"detail":[{"loc":["body","messages",1,"role"],"msg":"unexpected value; permitted: ","type":"value_error.const","ctx":{"given":"assistant","permitted":["tool"]}},{"loc":["body","messages",1,"content"],"msg":"str type expected","type":"type_error.str"},{"loc":["body","messages",1,"tool_call_id"],"msg":"field required","type":"value_error.missing"},{"loc":["body","messages",1,"content"],"msg":"str type expected","type":"type_error.str"},{"loc":["body","messages",1,"role"],"msg":"unexpected value; permitted: ","type":"value_error.const","ctx":{"given":"assistant","permitted":["user"]}},{"loc":["body","messages",1,"role"],"msg":"unexpected value; permitted: ","type":"value_error.const","ctx":{"given":"assistant","permitted":["system"]}},{"loc":["body","messages",1,"content"],"msg":"str type expected","type":"type_error.str"},{"loc":["body","tool_choice"],"msg":"str type expected","type":"type_error.str"}]} {"detail":[{"loc":["body","messages",1,"role"],"msg":"unexpected value; permitted: ","type":"value_error.const","ctx":{"given":"assistant","permitted":["tool"]}},{"loc":["body","messages",1,"content"],"msg":"str type expected","type":"type_error.str"},{"loc":["body","messages",1,"tool_call_id"],"msg":"field required","type":"value_error.missing"},{"loc":["body","messages",1,"content"],"msg":"str type expected","type":"type_error.str"},{"loc":["body","messages",1,"role"],"msg":"unexpected value; permitted: ","type":"value_error.const","ctx":{"given":"assistant","permitted":["user"]}},{"loc":["body","messages",1,"role"],"msg":"unexpected value; permitted: ","type":"value_error.const","ctx":{"given":"assistant","permitted":["system"]}},{"loc":["body","messages",1,"content"],"msg":"str type expected","type":"type_error.str"},{"loc":["body","tool_choice"],"msg":"str type expected","type":"type_error.str"}]}

Hi @bilalbayasut

Which model are you using when that error occurs?

Additionally, seeing the exact input into the chat may be helpful.

Lastly, in the future, screenshots of errors are a lot easier for me to read/review

Thanks for your help in figuring out this issue 😊
🌴