From 092cf29f16b45bcc37489bc9c9335f9d0f9da5df Mon Sep 17 00:00:00 2001 From: Alit Indrawan Date: Mon, 12 May 2025 16:53:36 +0800 Subject: [PATCH 1/2] feat: add support for file uploads in chat message parts --- chat.go | 7 +++++++ chat_test.go | 30 ++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/chat.go b/chat.go index 0f91d481c..09338048f 100644 --- a/chat.go +++ b/chat.go @@ -79,17 +79,24 @@ type ChatMessageImageURL struct { Detail ImageURLDetail `json:"detail,omitempty"` } +type ChatMessageFile struct { + FileData string `json:"file_data,omitempty"` + Filename string `json:"filename,omitempty"` +} + type ChatMessagePartType string const ( ChatMessagePartTypeText ChatMessagePartType = "text" ChatMessagePartTypeImageURL ChatMessagePartType = "image_url" + ChatMessagePartTypeFile ChatMessagePartType = "file" ) type ChatMessagePart struct { Type ChatMessagePartType `json:"type,omitempty"` Text string `json:"text,omitempty"` ImageURL *ChatMessageImageURL `json:"image_url,omitempty"` + File *ChatMessageFile `json:"file,omitempty"` } type ChatCompletionMessage struct { diff --git a/chat_test.go b/chat_test.go index 514706c96..91a9436af 100644 --- a/chat_test.go +++ b/chat_test.go @@ -684,6 +684,36 @@ func TestMultipartChatCompletions(t *testing.T) { checks.NoError(t, err, "CreateAzureChatCompletion error") } +func TestMultipartChatCompletionUsingFile(t *testing.T) { + client, server, teardown := setupAzureTestServer() + defer teardown() + server.RegisterHandler("/openai/deployments/*", handleChatCompletionEndpoint) + + _, err := client.CreateChatCompletion(context.Background(), openai.ChatCompletionRequest{ + MaxTokens: 5, + Model: openai.GPT3Dot5Turbo, + Messages: []openai.ChatCompletionMessage{ + { + Role: openai.ChatMessageRoleUser, + MultiContent: []openai.ChatMessagePart{ + { + Type: openai.ChatMessagePartTypeText, + Text: "Hello!", + }, + { + Type: openai.ChatMessagePartTypeFile, + File: &openai.ChatMessageFile{ + Filename: "file.pdf", + FileData: "filedata", + }, + }, + }, + }, + }, + }) + checks.NoError(t, err, "CreateAzureChatCompletion error") +} + func TestMultipartChatMessageSerialization(t *testing.T) { jsonText := `[{"role":"system","content":"system-message"},` + `{"role":"user","content":[{"type":"text","text":"nice-text"},` + From e30221ce74663db0c19fbdaf1c50078e028cfe28 Mon Sep 17 00:00:00 2001 From: Alit Indrawan Date: Mon, 12 May 2025 16:56:58 +0800 Subject: [PATCH 2/2] refactor: update import paths from sashabaranov to tech-djoin --- api_integration_test.go | 6 +++--- assistant_test.go | 4 ++-- audio.go | 2 +- audio_api_test.go | 6 +++--- audio_test.go | 6 +++--- batch_test.go | 4 ++-- chat_stream_test.go | 4 ++-- chat_test.go | 6 +++--- client.go | 2 +- client_test.go | 4 ++-- completion_test.go | 4 ++-- config_test.go | 2 +- edits_test.go | 4 ++-- embeddings_test.go | 4 ++-- engines_test.go | 4 ++-- error.go | 4 ++-- error_test.go | 2 +- example_test.go | 2 +- examples/chatbot/main.go | 2 +- examples/completion-with-tool/main.go | 4 ++-- examples/completion/main.go | 2 +- examples/images/main.go | 2 +- examples/voice-to-text/main.go | 2 +- files_api_test.go | 4 ++-- files_test.go | 4 ++-- fine_tunes_test.go | 4 ++-- fine_tuning_job_test.go | 4 ++-- go.mod | 2 +- image_api_test.go | 4 ++-- image_test.go | 4 ++-- internal/error_accumulator_test.go | 4 ++-- internal/form_builder_test.go | 2 +- internal/test/helpers.go | 2 +- jsonschema/json_test.go | 2 +- jsonschema/validate_test.go | 2 +- messages_test.go | 6 +++--- models_test.go | 4 ++-- moderation_test.go | 4 ++-- openai_test.go | 4 ++-- run_test.go | 4 ++-- speech_test.go | 6 +++--- stream_reader.go | 2 +- stream_reader_test.go | 6 +++--- stream_test.go | 4 ++-- thread_test.go | 4 ++-- vector_store_test.go | 4 ++-- 46 files changed, 84 insertions(+), 84 deletions(-) diff --git a/api_integration_test.go b/api_integration_test.go index 7828d9451..0d03bcc3b 100644 --- a/api_integration_test.go +++ b/api_integration_test.go @@ -10,9 +10,9 @@ import ( "os" "testing" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" - "github.com/sashabaranov/go-openai/jsonschema" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai/jsonschema" ) func TestAPI(t *testing.T) { diff --git a/assistant_test.go b/assistant_test.go index 40de0e50f..28ba02e4b 100644 --- a/assistant_test.go +++ b/assistant_test.go @@ -3,8 +3,8 @@ package openai_test import ( "context" - openai "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + openai "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" "encoding/json" "fmt" diff --git a/audio.go b/audio.go index f321f93d6..5f1562592 100644 --- a/audio.go +++ b/audio.go @@ -8,7 +8,7 @@ import ( "net/http" "os" - utils "github.com/sashabaranov/go-openai/internal" + utils "github.com/tech-djoin/go-openai/internal" ) // Whisper Defines the models provided by OpenAI to use when processing audio with OpenAI. diff --git a/audio_api_test.go b/audio_api_test.go index 6c6a35643..5f930c8ce 100644 --- a/audio_api_test.go +++ b/audio_api_test.go @@ -12,9 +12,9 @@ import ( "strings" "testing" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test" + "github.com/tech-djoin/go-openai/internal/test/checks" ) // TestAudio Tests the transcription and translation endpoints of the API using the mocked server. diff --git a/audio_test.go b/audio_test.go index 51b3f465d..f8ec5c660 100644 --- a/audio_test.go +++ b/audio_test.go @@ -11,9 +11,9 @@ import ( "path/filepath" "testing" - utils "github.com/sashabaranov/go-openai/internal" - "github.com/sashabaranov/go-openai/internal/test" - "github.com/sashabaranov/go-openai/internal/test/checks" + utils "github.com/tech-djoin/go-openai/internal" + "github.com/tech-djoin/go-openai/internal/test" + "github.com/tech-djoin/go-openai/internal/test/checks" ) func TestAudioWithFailingFormBuilder(t *testing.T) { diff --git a/batch_test.go b/batch_test.go index f4714f4eb..3579c88b1 100644 --- a/batch_test.go +++ b/batch_test.go @@ -7,8 +7,8 @@ import ( "reflect" "testing" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" ) func TestUploadBatchFile(t *testing.T) { diff --git a/chat_stream_test.go b/chat_stream_test.go index eabb0f3a2..280ebaf22 100644 --- a/chat_stream_test.go +++ b/chat_stream_test.go @@ -10,8 +10,8 @@ import ( "strconv" "testing" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" ) func TestChatCompletionsStreamWrongModel(t *testing.T) { diff --git a/chat_test.go b/chat_test.go index 91a9436af..7a38a5750 100644 --- a/chat_test.go +++ b/chat_test.go @@ -12,9 +12,9 @@ import ( "testing" "time" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" - "github.com/sashabaranov/go-openai/jsonschema" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai/jsonschema" ) const ( diff --git a/client.go b/client.go index cef375348..21d240e3a 100644 --- a/client.go +++ b/client.go @@ -10,7 +10,7 @@ import ( "net/url" "strings" - utils "github.com/sashabaranov/go-openai/internal" + utils "github.com/tech-djoin/go-openai/internal" ) // Client is OpenAI GPT-3 API client. diff --git a/client_test.go b/client_test.go index 321971445..6dd0201f4 100644 --- a/client_test.go +++ b/client_test.go @@ -10,8 +10,8 @@ import ( "reflect" "testing" - "github.com/sashabaranov/go-openai/internal/test" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai/internal/test" + "github.com/tech-djoin/go-openai/internal/test/checks" ) var errTestRequestBuilderFailed = errors.New("test request builder failed") diff --git a/completion_test.go b/completion_test.go index 27e2d150e..9468e471c 100644 --- a/completion_test.go +++ b/completion_test.go @@ -12,8 +12,8 @@ import ( "testing" "time" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" ) func TestCompletionsWrongModel(t *testing.T) { diff --git a/config_test.go b/config_test.go index 960230804..490f51d0c 100644 --- a/config_test.go +++ b/config_test.go @@ -3,7 +3,7 @@ package openai_test import ( "testing" - "github.com/sashabaranov/go-openai" + "github.com/tech-djoin/go-openai" ) func TestGetAzureDeploymentByModel(t *testing.T) { diff --git a/edits_test.go b/edits_test.go index d2a6db40d..3b85a36f9 100644 --- a/edits_test.go +++ b/edits_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" ) // TestEdits Tests the edits endpoint of the API using the mocked server. diff --git a/embeddings_test.go b/embeddings_test.go index 438978169..0237102b8 100644 --- a/embeddings_test.go +++ b/embeddings_test.go @@ -11,8 +11,8 @@ import ( "reflect" "testing" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" ) func TestEmbedding(t *testing.T) { diff --git a/engines_test.go b/engines_test.go index d26aa5541..05c2fc583 100644 --- a/engines_test.go +++ b/engines_test.go @@ -7,8 +7,8 @@ import ( "net/http" "testing" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" ) // TestGetEngine Tests the retrieve engine endpoint of the API using the mocked server. diff --git a/error.go b/error.go index 8a74bd52c..685d7992e 100644 --- a/error.go +++ b/error.go @@ -54,7 +54,7 @@ func (e *APIError) UnmarshalJSON(data []byte) (err error) { err = json.Unmarshal(rawMap["message"], &e.Message) if err != nil { // If the parameter field of a function call is invalid as a JSON schema - // refs: https://github.com/sashabaranov/go-openai/issues/381 + // refs: https://github.com/tech-djoin/go-openai/issues/381 var messages []string err = json.Unmarshal(rawMap["message"], &messages) if err != nil { @@ -64,7 +64,7 @@ func (e *APIError) UnmarshalJSON(data []byte) (err error) { } // optional fields for azure openai - // refs: https://github.com/sashabaranov/go-openai/issues/343 + // refs: https://github.com/tech-djoin/go-openai/issues/343 if _, ok := rawMap["type"]; ok { err = json.Unmarshal(rawMap["type"], &e.Type) if err != nil { diff --git a/error_test.go b/error_test.go index 48cbe4f29..6bdd82943 100644 --- a/error_test.go +++ b/error_test.go @@ -6,7 +6,7 @@ import ( "reflect" "testing" - "github.com/sashabaranov/go-openai" + "github.com/tech-djoin/go-openai" ) func TestAPIErrorUnmarshalJSON(t *testing.T) { diff --git a/example_test.go b/example_test.go index 5910ffb84..6ab3488a4 100644 --- a/example_test.go +++ b/example_test.go @@ -11,7 +11,7 @@ import ( "net/url" "os" - "github.com/sashabaranov/go-openai" + "github.com/tech-djoin/go-openai" ) func Example() { diff --git a/examples/chatbot/main.go b/examples/chatbot/main.go index ad41e957d..86cf82fea 100644 --- a/examples/chatbot/main.go +++ b/examples/chatbot/main.go @@ -6,7 +6,7 @@ import ( "fmt" "os" - "github.com/sashabaranov/go-openai" + "github.com/tech-djoin/go-openai" ) func main() { diff --git a/examples/completion-with-tool/main.go b/examples/completion-with-tool/main.go index 26126e41b..86b972c80 100644 --- a/examples/completion-with-tool/main.go +++ b/examples/completion-with-tool/main.go @@ -5,8 +5,8 @@ import ( "fmt" "os" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/jsonschema" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/jsonschema" ) func main() { diff --git a/examples/completion/main.go b/examples/completion/main.go index 8c5cbd5ca..3050e4838 100644 --- a/examples/completion/main.go +++ b/examples/completion/main.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - "github.com/sashabaranov/go-openai" + "github.com/tech-djoin/go-openai" ) func main() { diff --git a/examples/images/main.go b/examples/images/main.go index 5ee649d22..bd72f201b 100644 --- a/examples/images/main.go +++ b/examples/images/main.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - "github.com/sashabaranov/go-openai" + "github.com/tech-djoin/go-openai" ) func main() { diff --git a/examples/voice-to-text/main.go b/examples/voice-to-text/main.go index 713e748e1..c948b0f42 100644 --- a/examples/voice-to-text/main.go +++ b/examples/voice-to-text/main.go @@ -6,7 +6,7 @@ import ( "fmt" "os" - "github.com/sashabaranov/go-openai" + "github.com/tech-djoin/go-openai" ) func main() { diff --git a/files_api_test.go b/files_api_test.go index aa4fda458..9b79f37bf 100644 --- a/files_api_test.go +++ b/files_api_test.go @@ -12,8 +12,8 @@ import ( "testing" "time" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" ) func TestFileBytesUpload(t *testing.T) { diff --git a/files_test.go b/files_test.go index 3c1b99fb4..2af661f43 100644 --- a/files_test.go +++ b/files_test.go @@ -7,8 +7,8 @@ import ( "os" "testing" - utils "github.com/sashabaranov/go-openai/internal" - "github.com/sashabaranov/go-openai/internal/test/checks" + utils "github.com/tech-djoin/go-openai/internal" + "github.com/tech-djoin/go-openai/internal/test/checks" ) func TestFileBytesUploadWithFailingFormBuilder(t *testing.T) { diff --git a/fine_tunes_test.go b/fine_tunes_test.go index 2ab6817f7..b4c6039c4 100644 --- a/fine_tunes_test.go +++ b/fine_tunes_test.go @@ -7,8 +7,8 @@ import ( "net/http" "testing" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" ) const testFineTuneID = "fine-tune-id" diff --git a/fine_tuning_job_test.go b/fine_tuning_job_test.go index 5f63ef24c..069983fbc 100644 --- a/fine_tuning_job_test.go +++ b/fine_tuning_job_test.go @@ -7,8 +7,8 @@ import ( "net/http" "testing" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" ) const testFineTuninigJobID = "fine-tuning-job-id" diff --git a/go.mod b/go.mod index 42cc7b391..578d61807 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/sashabaranov/go-openai +module github.com/tech-djoin/go-openai go 1.18 diff --git a/image_api_test.go b/image_api_test.go index f6057b77d..fe6489265 100644 --- a/image_api_test.go +++ b/image_api_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" ) func TestImages(t *testing.T) { diff --git a/image_test.go b/image_test.go index 9332dd5cd..f1b73add3 100644 --- a/image_test.go +++ b/image_test.go @@ -1,8 +1,8 @@ package openai //nolint:testpackage // testing private field import ( - utils "github.com/sashabaranov/go-openai/internal" - "github.com/sashabaranov/go-openai/internal/test/checks" + utils "github.com/tech-djoin/go-openai/internal" + "github.com/tech-djoin/go-openai/internal/test/checks" "context" "fmt" diff --git a/internal/error_accumulator_test.go b/internal/error_accumulator_test.go index d48f28177..0061e49ba 100644 --- a/internal/error_accumulator_test.go +++ b/internal/error_accumulator_test.go @@ -5,8 +5,8 @@ import ( "errors" "testing" - utils "github.com/sashabaranov/go-openai/internal" - "github.com/sashabaranov/go-openai/internal/test" + utils "github.com/tech-djoin/go-openai/internal" + "github.com/tech-djoin/go-openai/internal/test" ) func TestErrorAccumulatorBytes(t *testing.T) { diff --git a/internal/form_builder_test.go b/internal/form_builder_test.go index 8df989e3b..4ddb46b08 100644 --- a/internal/form_builder_test.go +++ b/internal/form_builder_test.go @@ -1,7 +1,7 @@ package openai //nolint:testpackage // testing private field import ( - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai/internal/test/checks" "bytes" "errors" diff --git a/internal/test/helpers.go b/internal/test/helpers.go index dc5fa6646..d5736ce07 100644 --- a/internal/test/helpers.go +++ b/internal/test/helpers.go @@ -1,7 +1,7 @@ package test import ( - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai/internal/test/checks" "net/http" "os" diff --git a/jsonschema/json_test.go b/jsonschema/json_test.go index 17f0aba8a..9eabb6a57 100644 --- a/jsonschema/json_test.go +++ b/jsonschema/json_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/sashabaranov/go-openai/jsonschema" + "github.com/tech-djoin/go-openai/jsonschema" ) func TestDefinition_MarshalJSON(t *testing.T) { diff --git a/jsonschema/validate_test.go b/jsonschema/validate_test.go index 6fa30ab0c..76c6535d2 100644 --- a/jsonschema/validate_test.go +++ b/jsonschema/validate_test.go @@ -3,7 +3,7 @@ package jsonschema_test import ( "testing" - "github.com/sashabaranov/go-openai/jsonschema" + "github.com/tech-djoin/go-openai/jsonschema" ) func Test_Validate(t *testing.T) { diff --git a/messages_test.go b/messages_test.go index b25755f98..e04acf67d 100644 --- a/messages_test.go +++ b/messages_test.go @@ -7,9 +7,9 @@ import ( "net/http" "testing" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test" + "github.com/tech-djoin/go-openai/internal/test/checks" ) var emptyStr = "" diff --git a/models_test.go b/models_test.go index 7fd010c34..3c8ce0845 100644 --- a/models_test.go +++ b/models_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" ) const testFineTuneModelID = "fine-tune-model-id" diff --git a/moderation_test.go b/moderation_test.go index a97f25bc6..b6899bf18 100644 --- a/moderation_test.go +++ b/moderation_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" ) // TestModeration Tests the moderations endpoint of the API using the mocked server. diff --git a/openai_test.go b/openai_test.go index a55f3a858..754a4ca39 100644 --- a/openai_test.go +++ b/openai_test.go @@ -1,8 +1,8 @@ package openai_test import ( - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test" ) func setupOpenAITestServer() (client *openai.Client, server *test.ServerTest, teardown func()) { diff --git a/run_test.go b/run_test.go index cdf99db05..ebc0802b1 100644 --- a/run_test.go +++ b/run_test.go @@ -3,8 +3,8 @@ package openai_test import ( "context" - openai "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + openai "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" "encoding/json" "fmt" diff --git a/speech_test.go b/speech_test.go index 67a3feabc..ced6a77ed 100644 --- a/speech_test.go +++ b/speech_test.go @@ -11,9 +11,9 @@ import ( "path/filepath" "testing" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test" + "github.com/tech-djoin/go-openai/internal/test/checks" ) func TestSpeechIntegration(t *testing.T) { diff --git a/stream_reader.go b/stream_reader.go index 6faefe0a7..01d62d773 100644 --- a/stream_reader.go +++ b/stream_reader.go @@ -8,7 +8,7 @@ import ( "net/http" "regexp" - utils "github.com/sashabaranov/go-openai/internal" + utils "github.com/tech-djoin/go-openai/internal" ) var ( diff --git a/stream_reader_test.go b/stream_reader_test.go index 449a14b43..169330159 100644 --- a/stream_reader_test.go +++ b/stream_reader_test.go @@ -6,9 +6,9 @@ import ( "errors" "testing" - utils "github.com/sashabaranov/go-openai/internal" - "github.com/sashabaranov/go-openai/internal/test" - "github.com/sashabaranov/go-openai/internal/test/checks" + utils "github.com/tech-djoin/go-openai/internal" + "github.com/tech-djoin/go-openai/internal/test" + "github.com/tech-djoin/go-openai/internal/test/checks" ) var errTestUnmarshalerFailed = errors.New("test unmarshaler failed") diff --git a/stream_test.go b/stream_test.go index 9dd95bb5f..43d4c8d63 100644 --- a/stream_test.go +++ b/stream_test.go @@ -10,8 +10,8 @@ import ( "testing" "time" - "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" ) func TestCompletionsStreamWrongModel(t *testing.T) { diff --git a/thread_test.go b/thread_test.go index 1ac0f3c0e..81509b846 100644 --- a/thread_test.go +++ b/thread_test.go @@ -7,8 +7,8 @@ import ( "net/http" "testing" - openai "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + openai "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" ) // TestThread Tests the thread endpoint of the API using the mocked server. diff --git a/vector_store_test.go b/vector_store_test.go index 58b9a857e..a4adc1a16 100644 --- a/vector_store_test.go +++ b/vector_store_test.go @@ -3,8 +3,8 @@ package openai_test import ( "context" - openai "github.com/sashabaranov/go-openai" - "github.com/sashabaranov/go-openai/internal/test/checks" + openai "github.com/tech-djoin/go-openai" + "github.com/tech-djoin/go-openai/internal/test/checks" "encoding/json" "fmt"