Versions in this module Expand all Collapse all v1 v1.0.0 Aug 3, 2025 Changes in this version + type AudioRequest struct + Input string + Instructions string + Model string + Voice string + type ChatRequest struct + Messages []Message + Model string + type ChatResponse struct + Choices []struct{ ... } + type Message struct + Content string + Role string + type OpenAI struct + func New(apiKey string, transcriptionModel string, speechModel string, chatModel string, ...) *OpenAI + func (o *OpenAI) Chat(messages []Message) (string, error) + func (o *OpenAI) GenerateAudio(text string, instructions string) (io.Reader, error) + func (o *OpenAI) Transcribe(audioFile io.Reader) (string, error) + type TranscriptionResponse struct + Text string