Unofficial Go client library for the OpenAI API, supporting ChatGPT, GPT-4, DALL·E, Whisper, and more.
go-openai is an unofficial Go client library that provides comprehensive access to the OpenAI API. It enables Go developers to integrate AI models like ChatGPT, GPT-4, DALL·E, and Whisper into their applications with a clean and idiomatic Go interface.
Go developers building applications that require integration with OpenAI's models, such as chatbots, image generators, audio transcription services, or AI-powered tools.
Developers choose go-openai for its full API coverage, including streaming and Azure OpenAI compatibility, combined with a Go-idiomatic design that mirrors the official API structure while offering robust error handling and configuration options.
OpenAI ChatGPT, GPT-5, GPT-Image-1, Whisper API clients for Go
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports all major OpenAI models including ChatGPT 4o, DALL·E 3, and Whisper, with extensive code examples in the README for each.
Includes both chat and completion streaming, enabling real-time AI interactions as shown in the streaming examples.
Offers seamless configuration for Azure OpenAI services, with dedicated examples for Azure ChatGPT and embeddings.
Facilitates function calling and structured responses using the built-in jsonschema package, detailed in the examples.
A known issue where temperature=0 is omitted from requests due to Go's omitempty, leading to non-deterministic outputs, as admitted in the FAQ with workarounds required.
The library lacks built-in token counting, a common need for cost management, and the README states no plans to implement it, pushing users to external solutions.
As an unofficial client, it may lag behind API updates or have compatibility gaps compared to official SDKs, though it aims for comprehensive coverage.