Tags: ssd532/go-openai
Tags
Add support for multi part chat messages (and gpt-4-vision-preview mo… …del) (sashabaranov#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
Add missing response fields for pagination (sashabaranov#584)
feat: support direct bytes for file upload (sashabaranov#568) * feat: support direct bytes for file upload * add test for errors * add coverage
feat: initial TTS support (sashabaranov#528) * feat: initial TTS support * chore: lint, omitempty * chore: dont use pointer in struct * fix: add mocked server tests to speech_test.go Co-authored-by: Lachlan Laycock <[email protected]> * chore: update imports * chore: fix lint * chore: add an error check * chore: ignore lint * chore: add error checks in package * chore: add test * chore: fix test --------- Co-authored-by: Lachlan Laycock <[email protected]>
Feat implement Run APIs (sashabaranov#560) * chore: first commit * add apis * chore: add tests * feat add apis * chore: add api and tests * chore: add tests * fix * trigger build * fix * chore: formatting code * chore: add pagination type
fix test server setup: (sashabaranov#549) * fix test server setup: - go map access is not deterministic - this can lead to a route: /foo/bar/1 matching /foo/bar before matching /foo/bar/1 if the map iteration go through /foo/bar first since the regex match wasn't bound to start and end anchors - registering handlers now converts * in routes to .* for proper regex matching - test server route handling now tries to fully match the handler route * add missing /v1 prefix to fine-tuning job cancel test server handler
test: fix compile error in api integration test (sashabaranov#548)
fix: use pointer for ChatCompletionResponseFormat (sashabaranov#544)
Feat Support tools and tools choice new fileds (sashabaranov#526) * feat: support tools and tools choice new fileds * fix: use value not pointers
Feat Implement assistants API (sashabaranov#535) * chore: implement assistants API * fix * fix * chore: add tests * fix tests * fix linting
PreviousNext