openai-go icon indicating copy to clipboard operation
openai-go copied to clipboard

The official Go library for the OpenAI API

Results 100 openai-go issues
Sort by recently updated
recently updated
newest added

throughout the SDK, metadata is commonly represented by a shared object https://github.com/openai/openai-[go/blob/main/shared/shared.go#L746](https://www.golinks.io/blob/main/shared/shared.go#L746?trackSource=github) as seen here https://github.com/openai/openai-[go/blob/main/responses/response.go#L965](https://www.golinks.io/blob/main/responses/response.go#L965?trackSource=github) And other places. This provides strict typing, shared usage and easy consumption of the...

Conversations now represents an OpenAI API and object set https://platform.openai.com/docs/api-reference/conversations/create However the documentation literally states this for conversations ``` Conversations param := openai.ChatCompletionNewParams{ Messages: []openai.ChatCompletionMessageParamUnion{ openai.UserMessage("What kind of houseplant is...

Just a thought, but it may be worthwhile to add a note on structured outputs (docs & codebase) in that if your struct tags have omitempty that the openai-go api...

### Description The [VectorStoreFile.PollStatus](https://github.com/openai/openai-go/blob/main/polling.go#L28-L61) method is calling the underlying [Get](https://github.com/openai/openai-go/blob/main/polling.go#L35) method with parameters in the wrong order, causing API requests to fail with 400 Bad Request errors. ### Current Behavior...

It's possible to generate this JSON: ```json { "input": [ { "content": [ { "text": "write me a haiku about a sunset", "type": "input_text" } ], "role": "user" }, {...

When connecting to Azure government environment I get an error: ``` Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.us/ or https://ai.azure.us/), or have expired ``` This is because the...

This commit fixes issue #520 by improving the union decoder's ability to handle param.Opt types during JSON unmarshaling. The problem occurred when the decoder tried to call .Elem() on param.Opt[string]...

This commit addresses issue #520 where the JSON unmarshaling fails for ChatCompletionToolChoiceOptionUnionParam when encountering OfAuto field with param.Opt[string] type. The decoder.field.Type.Elem() method was calling .Elem() on param.Opt[string] which is not...

unmarshalling into ChatCompletionToolChoiceOptionUnionParam does not work openai-go version: v2.6.1 go 1.25 Reproduction: ```go import ( "encoding/json" "testing" "github.com/openai/openai-[go/v2](https://www.golinks.io/v2?trackSource=github)" "github.com/openai/openai-[go/v2/packages/param](https://www.golinks.io/v2/packages/param?trackSource=github)" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestBugRepro(t *testing.T) { t.Run("test_bug_repro", func(t *testing.T) {...

When using Azure client, the Python SDK will check the path to determine whether to replace it, the code is as follows: ![Image](https://github.com/user-attachments/assets/c9df5fea-240e-485c-8891-b398ffc243ec) And the URL in FinalRequestOptions is only...

enhancement