Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callback ¶
type Callback interface { // OnLLMNewToken Runs on new LLM token. Only available when streaming is enabled OnLLMNewToken(str string) }
Callback handlers for streaming. Only works with LLMs that support streaming.
type ChatMessage ¶
type ChatMessage struct { // The role of the author of this message. One of system, user, or assistant. Role string `json:"role"` // The content of the message. Content string `json:"content"` // The name of the author of this message. May contain a-z, A-Z, 0-9, and underscores, // with a maximum length of 64 characters. Name string `json:"name,omitempty"` }
ChatMessage is a message in a chat request.
type ChatRequest ¶
type ChatRequest struct { Model string `json:"models"` Prompt string `json:"prompt"` Temperature float64 `json:"temperature,omitempty"` }
ChatRequest is a request to create an embedding.
Click to show internal directories.
Click to hide internal directories.