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

Fixes #437 - prevents panic when tool_calls is empty by adding length check before accessing delta.ToolCalls[0].Index

### Summary This pull request adds the missing`StreamOptions.IncludeUsage` option in the example code that should be set to `true` to retrieve accurate token usage information from the API. Without this...

## Context The current implementation when calling `RequestConfig.Execute` will eventually call the `handler` which downstream calls the `Do` method on the httpClient. This is called multiple times as we loop...

I followed this example: https://github.com/openai/openai-go/blob/main/examples/chat-completion-accumulating/main.go I want to get the thinking content, which is output by LLM in the `...` How to get the thinking content?

## Bug Description The OpenAI Go SDK incorrectly deserializes all `response_format` types as `OfText`, causing `json_object` and `json_schema` formats to lose their schema data. ## Impact - Structured output (`json_object`,...

In current implementation streaming accumulator only works for OpenAI models. This PR enables accumulator for Ollama and vLLM when used with tool calling.

"Your organization must be verified to use the model `gpt-5`. Please go to: https://platform.openai.com/settings/organization/general and click on Verify Organization. If you just verified, it can take up to 15 minutes...

Is there any chance to get chat-gpt realtimeapi

enhancement