Commit Graph

351 Commits

Author SHA1 Message Date
eiixy
3e47e6fef4 fix: #790 (#798) 2024-07-19 15:06:27 +01:00
Luca Giannini
727944c478 feat: ParallelToolCalls to ChatCompletionRequest with helper functions (#787)
* added ParallelToolCalls to ChatCompletionRequest with helper functions

* added tests for coverage

* changed ParallelToolCalls to any
2024-07-12 11:31:11 +01:00
Adrian Liechti
03851d2032 allow custom voice and speech models (#691) 2024-06-30 16:20:10 +01:00
Alex Baranov
e31185974c remove errors.Join (#778) 2024-06-26 14:06:52 +01:00
Peng Guan-Cheng
0a42130899 feat: provide vector store (#772)
* implement vectore store feature

* fix after integration testing

* fix golint error

* improve test to increare code coverage

* fix golint anc code coverage problem

* add tool_resource in assistant response

* chore: code style

* feat: use pagination param

* feat: use pagination param

* test: use pagination param

* test: rm unused code

---------

Co-authored-by: Denny Depok <61371551+kodernubie@users.noreply.github.com>
Co-authored-by: eric.p <eric.p>
2024-06-19 09:37:21 +01:00
Pawel Kosiec
68acf22a43 Support Tool Resources properties for Threads (#760)
* Support Tool Resources properties for Threads

* Add Chunking Strategy for Threads vector stores
2024-06-13 19:26:37 +04:00
eiixy
99cc170b54 feat: support batches api (#746)
* feat: support batches api

* update batch_test.go

* fix golangci-lint check

* fix golangci-lint check

* fix tests coverage

* fix tests coverage

* fix tests coverage

* fix tests coverage

* fix tests coverage

* fix tests coverage

* fix tests coverage

* fix: create batch api

* update batch_test.go

* feat: add `CreateBatchWithUploadFile`

* feat: add `UploadBatchFile`

* optimize variable and type naming

* expose `BatchLineItem` interface

* update batches const
2024-06-13 19:24:37 +04:00
Alex Baranov
c69c3bb1d2 integration tests: pass openai secret (#770)
* pass openai secret

* only run in master branch
2024-06-13 19:21:25 +04:00
Alex Baranov
7e96c712cb run integration tests (#769) 2024-06-13 19:15:27 +04:00
Adam Smith
fd41f7a5f4 Fix integration test (#762)
* added TestCompletionStream test

moved completion stream testing to seperate function
added NoErrorF
fixes nil pointer reference on stream object

* update integration test models
2024-06-13 17:23:07 +04:00
shosato0306
8618492b98 feat: add incomplete run status (#763) 2024-06-05 15:03:57 +04:00
Adam Smith
30cf7b879c feat: add params to RunRequest (#754) 2024-06-03 20:50:22 +04:00
ando-masaki
211cb49fc2 Update client.go to get response header whether there is an error or not. (#751)
Update client.go to get response header whether there is an error or not. Because 429 Too Many Requests error response has "Retry-After" header.
2024-05-24 11:18:47 +04:00
Kshirodra Meher
4f4a85687b Added DALL.E 3 to readme.md (#741)
* Added DALL.E 3 to readme.md

Added DALL.E 3 to readme.md as its supported now as per issue https://github.com/sashabaranov/go-openai/issues/494

* Update README.md

---------

Co-authored-by: Alexander Baranov <677093+sashabaranov@users.noreply.github.com>
2024-05-13 23:08:14 +04:00
nullswan
9f19d1c93b Add gpt4o (#742)
* Add gpt4o

* disabled model for endpoint

seen in e0d0801ac7

* Update completion.go

---------

Co-authored-by: Alexander Baranov <677093+sashabaranov@users.noreply.github.com>
2024-05-13 23:07:07 +04:00
Kevin Mesiab
3b25e09da9 enhancement: Add new GPT4-o and alias to completion enums (#744) 2024-05-13 22:48:14 +04:00
Liu Shuang
6af32202d1 feat: support stream_options (#736)
* feat: support stream_options

* fix lint

* fix lint
2024-05-07 16:42:24 +04:00
Alireza Ghasemi
3334a9c78a Add support for word-level audio transcription timestamp granularity (#733)
* Add support for audio transcription timestamp_granularities word

* Fixup multiple timestamp granularities
2024-05-07 16:40:07 +04:00
Alireza Ghasemi
c9953a7b05 Fixup minor copy-pasta comment typo (#728)
imagess ->  images
2024-04-27 13:25:49 +04:00
wurui
c84ab5f6ae feat: support cloudflare AI Gateway flavored azure openai (#715)
* feat: support cloudflare AI Gateway flavored azure openai

Signed-off-by: STRRL <im@strrl.dev>

* test: add test for cloudflare azure fullURL

---------

Signed-off-by: STRRL <im@strrl.dev>
Co-authored-by: STRRL <im@strrl.dev>
2024-04-24 16:08:58 +04:00
往日。
2d58f8f4b8 chore: add SystemFingerprint for chat completion stream response (#716)
* chore: add SystemFingerprint for stream response

* chore: add test

* lint: format for test
2024-04-24 16:02:03 +04:00
Danai Antoniou
8d15a377ec Remove hardcoded assistants version (#719) 2024-04-24 15:59:50 +04:00
Mike Chaykowsky
c6a63ed19a Add PromptFilterResult (#702) 2024-04-16 23:28:06 +04:00
Quest Henkart
a42f51967f [New_Features] Adds recently added Assistant cost saving parameters (#710)
* add cost saving parameters

* add periods at the end of comments

* shorten commnet

* further lower comment length

* fix type
2024-04-16 23:26:14 +04:00
Andreas Deininger
2446f08f94 Bump GitHub workflow actions to latest versions (#707) 2024-04-13 15:34:23 +04:00
Andreas Deininger
ea551f422e Fixing typos (#706) 2024-04-13 15:32:38 +04:00
Liu Shuang
e0d0801ac7 feat: add GPT4Turbo and GPT4Turbo20240409 (#703) 2024-04-11 12:39:10 +04:00
Quest Henkart
187f4169f8 [BREAKING_CHANGES] Fix update message payload (#699)
* add custom marshaller, documentation and isolate tests

* fix linter

* wrap payload as expected from the API and update test

* modify input to accept map[string]string only
2024-04-09 12:22:31 +04:00
Alexander Baranov
774fc9dd12 make linter happy (#701) 2024-04-05 23:24:30 +04:00
Qiying Wang
2646bce71c feat: get header from sendRequestRaw (#694)
* feat: get header from sendRequestRaw

* Fix ci lint
2024-04-05 23:15:54 +04:00
Quest Henkart
0925563e86 Fix broken implementation AssistantModify implementation (#685)
* add custom marshaller, documentation and isolate tests

* fix linter
2024-03-15 14:59:16 +04:00
sunshineplan
699f397c36 Update streamReader Close() method to return error (#681) 2024-03-11 11:27:48 +04:00
Bilal Hameed
38b16a3c41 Added 'wav' and 'pcm' Audio Formats (#671)
* Added 'wav' and 'pcm' Audio Formats

Added "wav" and "pcm" audio formats as per OpenAI API documentation for createSpeech endpoint. 
Ref: https://platform.openai.com/docs/api-reference/audio/createSpeech
Supported formats are mp3, opus, aac, flac, wav, and pcm.

* Removed Extra Newline for Sanity Check

* fix: run goimports to get accepted by the linter
2024-03-07 14:56:50 +04:00
Martin Heck
bb6149f64f fix: repair json decoding of moderation response (#670) 2024-02-28 13:25:47 +04:00
Guillaume Dussault
41037783bc fix: when no Assistant Tools are specified, an empty list should be sent (#669) 2024-02-26 12:48:53 +04:00
Raphaël Oester
f220443985 Added fields for moderation (#662) 2024-02-26 12:48:09 +04:00
Rich Coggins
c5401e9e64 Fix for broken Azure Threads url (#668) 2024-02-26 12:46:35 +04:00
Rich Coggins
7381d18a75 Fix for broken Azure Assistants url (#665)
* fix:fix url for Azure assistants api

* test:add unit tests for Azure Assistants api

* fix:minor liniting issue
2024-02-21 16:45:15 +04:00
CaoPengFlying
e8b347891b fix:fix open ai original validation. modify Tool's Function to pointer (#664)
Co-authored-by: caopengfei1 <caopengfei1@tal.com>
2024-02-19 16:26:04 +04:00
Igor Berlenko
69e3bbb1eb Update client.go - allow to skip Authorization header (#658)
* Update client.go - allow to skip Authorization header

* Update client.go
2024-02-16 14:22:38 +04:00
chrbsg
ff61bbb322 Add RunRequest field AdditionalInstructions (#656)
AdditionalInstructions is an optional string field used to append
additional instructions at the end of the instructions for the run. This
is useful for modifying the behavior on a per-run basis without
overriding other instructions.

Also, change the Model and Instructions *string fields to string.
2024-02-15 20:12:22 +04:00
grulex
66bae3ee73 Content-type fix (#659)
* charset fixes

* make linter happy (#661)

---------

Co-authored-by: grulex <god@vk.com>
Co-authored-by: Alexander Baranov <677093+sashabaranov@users.noreply.github.com>
2024-02-15 20:11:58 +04:00
Alexander Baranov
11ad4b69d0 make linter happy (#661) 2024-02-15 16:02:48 +04:00
shadowpigy
a7954c854c Feat: Add assistant usage (#649)
* Feat: Add assistant usage

---------

Co-authored-by: shadowpigy <shadowpigy@github.com>
2024-02-08 17:08:30 +04:00
xuanming.zhang
6c2e3162df Added support for CreateSpeech Azure models (#657) 2024-02-08 11:40:39 +04:00
chrbsg
69e3fcbc27 Fix typo assitantInstructions (#655) 2024-02-06 23:04:40 +04:00
shadowpigy
bb6ed54530 Fix: Add RunStatusCancelled (#650)
Co-authored-by: shadowpigy <shadowpigy@github.com>
2024-02-02 16:41:39 +04:00
Liu Shuang
bc8cdd33d1 add GPT3Dot5Turbo0125 model (#648) 2024-02-02 14:30:24 +04:00
chenhhA
06ff541559 Add new struct filed dimensions for embedding API (#645)
* add new struct filed dimensions for embedding API

* docs: remove long single-line comments

* change embedding request param Dimensions type to int
2024-01-29 11:09:56 +04:00
Daniil
4c41f24a99 Support January 25, 2024, models update. (#644) 2024-01-26 12:41:48 +04:00