Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OpenAI ¶ added in v1.5.39
type OpenAI struct { Client *openai.Client Model string Temperature float64 MaxTokens int64 SystemMessage string }
func (*OpenAI) CreateChat ¶ added in v1.5.39
func (o *OpenAI) CreateChat(messages models.AIChatHistory) (*openai.ChatCompletion, error)
func (*OpenAI) CreateChatStream ¶ added in v1.5.39
func (o *OpenAI) CreateChatStream(messages models.AIChatHistory, chunkHandler func(chuck openai.ChatCompletionChunk)) (*openai.ChatCompletion, error)
Click to show internal directories.
Click to hide internal directories.