Discover and explore top open-source AI tools and projects—updated daily.
otiai10Go library for OpenAI API access
Top 88.4% on SourcePulse
This Go library provides a client for the OpenAI API, targeting developers who need to integrate GPT-3/3.5 and GPT-4 capabilities into their applications. It offers a simple, dependency-light, and well-tested interface for interacting with various OpenAI endpoints, including chat completions, image generation, embeddings, and fine-tuning.
How It Works
The library leverages Go's standard net/http package for making API requests, abstracting the complexities of authentication and request/response serialization. It supports core OpenAI features like chat completions (including function_call and streaming responses) and image generation. The design prioritizes ease of use and minimal external dependencies, making it suitable for Go projects requiring straightforward OpenAI integration.
Quick Start & Requirements
go get github.com/otiai10/openaigoOPENAI_API_KEY=YourAPIKey go run ./testapp/main.goHighlighted Details
function_call and streaming.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The library is community-maintained and not officially endorsed by OpenAI. Some features are marked as beta, and the Engines endpoint is deprecated and not supported.
1 year ago
1 day