Versions in this module Expand all Collapse all v0 v0.0.1 Feb 6, 2025 Changes in this version + const ContentTypeImageURL + const ContentTypeInputAudio + const ContentTypeText + type Audio struct + Format string + Voice string + type Error struct + Code any + Message string + Param string + Type string + type ErrorWithStatusCode struct + StatusCode int + type Function struct + Arguments any + Description string + Name string + Parameters any + type GeneralOpenAIRequest struct + Audio *Audio + Dimensions int + EncodingFormat string + FrequencyPenalty *float64 + FunctionCall any + Functions any + Input any + Instruction string + LogitBias any + Logprobs *bool + MaxCompletionTokens *int + MaxTokens int + Messages []Message + Metadata any + Modalities []string + Model string + N int + NumCtx int + ParallelTooCalls *bool + Prediction any + PresencePenalty *float64 + Prompt any + Quality *string + ResponseFormat *ResponseFormat + Seed float64 + ServiceTier *string + Size string + Stop any + Store *bool + Stream bool + StreamOptions *StreamOptions + Style *string + Temperature *float64 + ToolChoice any + Tools []Tool + TopK int + TopLogprobs *int + TopP *float64 + User string + func (r GeneralOpenAIRequest) ParseInput() []string + type ImageRequest struct + Model string + N int + Prompt string + Quality string + ResponseFormat string + Size string + Style string + User string + type ImageURL struct + Detail string + Url string + type JSONSchema struct + Description string + Name string + Schema map[string]interface{} + Strict *bool + type Message struct + Content any + Name *string + Role string + ToolCallId string + ToolCalls []Tool + func (m Message) IsStringContent() bool + func (m Message) ParseContent() []MessageContent + func (m Message) StringContent() string + type MessageContent struct + ImageURL *ImageURL + Text string + Type string + type ResponseFormat struct + JsonSchema *JSONSchema + Type string + type StreamOptions struct + IncludeUsage bool + type Tool struct + Function Function + Id string + Type string + type Usage struct + CompletionTokens int + PromptTokens int + TotalTokens int