Documentation ¶
Index ¶
- Variables
- func DoPrompt(promptName string, in string, variables map[string]string) (string, []openai.ChatCompletionMessage)
- func RunWithHistory(history []openai.ChatCompletionMessage) (string, []openai.ChatCompletionMessage)
- type Chat
- type OpenAI
- func (o *OpenAI) CreateChatCompletion(ctx context.Context, messages []openai.ChatCompletionMessage) (string, Usage, error)
- func (o *OpenAI) SetTemperature(t float32)
- func (o *OpenAI) StreamChatCompletion(ctx context.Context, messages []openai.ChatCompletionMessage) (*openai.ChatCompletionStream, error)
- type Usage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Temperature float32 Model string )
Functions ¶
func RunWithHistory ¶ added in v0.1.8
func RunWithHistory(history []openai.ChatCompletionMessage) (string, []openai.ChatCompletionMessage)
Types ¶
type Chat ¶ added in v0.1.4
func (*Chat) AddMessage ¶ added in v0.1.4
func (c *Chat) AddMessage(msg openai.ChatCompletionMessage)
func (*Chat) CreateResponse ¶ added in v0.1.4
func (c *Chat) CreateResponse()
type OpenAI ¶
type OpenAI struct {
// contains filtered or unexported fields
}
func (*OpenAI) CreateChatCompletion ¶
func (*OpenAI) SetTemperature ¶ added in v0.1.2
Click to show internal directories.
Click to hide internal directories.