You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
convert EmbeddingModel to string type (#629)
This gives the user the ability to pass in models for embeddings that are not
already defined in the library. Also more closely matches how the completions
API works.
Add support for multi part chat messages (and gpt-4-vision-preview mo…
…del) (#580)
* Add support for multi part chat messages
OpenAI has recently introduced a new model called gpt-4-visual-preview,
which now supports images as input. The chat completion endpoint accepts
multi-part chat messages, where the content can be an array of structs
in addition to the usual string format.
This commit introduces new structures and constants to represent
different types of content parts. It also implements the json.Marshaler
and json.Unmarshaler interfaces on ChatCompletionMessage.
* Add ImageURLDetail and ChatMessagePartType types
* Optimize ChatCompletionMessage deserialization
* Add ErrContentFieldsMisused error