I'm unsure whether this report should be included in this library, but I want to mention that the error below occurs when the content is nil during function calls.
; Execution error (ExceptionInfo) at schema-tools.coerce/coerce-or-error! (coerce.cljc:24).
; Could not coerce the value to schema: {:body {:messages [nil nil nil nil nil nil {:content (not (instance? java.lang.String nil))} nil]}}
This issue can be reproduced when using function calls as a response of create-chat-completion. The response value appears as {:role "assistant", :content nil, :function_call {:name "some-function", :arguments "{\n \"name\": \"someName\"\n}"}}), but it's an invalid schema in the API. I may have a workaround, but I'd like to inquire if supporting nil as a value is allowed.
I'm unsure whether this report should be included in this library, but I want to mention that the error below occurs when the content is
nil
during function calls.This issue can be reproduced when using function calls as a response of
create-chat-completion
. The response value appears as{:role "assistant", :content nil, :function_call {:name "some-function", :arguments "{\n \"name\": \"someName\"\n}"}})
, but it's an invalid schema in the API. I may have a workaround, but I'd like to inquire if supportingnil
as a value is allowed.Reference: https://platform.openai.com/docs/api-reference/chat/create,