Versions in this module Expand all Collapse all v0 v0.1.1 Jan 29, 2024 v0.1.0 Jan 29, 2024 Changes in this version + type ChatCompletion struct + Choices []ChatCompletionChoice + Created int + ID string + Model string + Object string + System_fingerprint string + Usage chatCompletionUsage + type ChatCompletionChoice struct + Finish_reason string + Index int + Message Message + type ChatCompletionChunk struct + Choices []chatCompletionChunkChoice + Created int + ID string + Model string + Object string + System_fingerprint string + type Client interface + CreateChatCompletion func(command CreateChatCompletionCommand) (*ChatCompletion, error) + CreateChatCompletionStream func(command CreateChatCompletionCommand) (<-chan ChatCompletionChunk, error) + func NewClient(apiKey string) Client + type CreateChatCompletionCommand struct + Frequency_penalty *float32 + Max_tokens *int + Messages []Message + Model string + N *int + Presence_penalty *float32 + Response_format *ResponseFormat + Stop *[]string + Stream *bool + Temperature *float32 + Top_p *float32 + User *string + type Message struct + Content string + Name *string + Role string + Tool_calls *[]toolCall + type OpenAiErrResponse struct + Error OpenAiError + type OpenAiError struct + Code *string + Message string + Param *string + Type string + func (e *OpenAiError) Error() string + type ResponseFormat struct + Typ *string