Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StreamCompleter ¶
type StreamCompleter struct { Model string FrequencyPenalty *float64 MaxTokens *int PresencePenalty *float64 Temperature *float64 TopP *float64 ToolChoice *string // contains filtered or unexported fields }
StreamCompleter is a struct which follows the model for both OpenAI and Mistral
func (*StreamCompleter) InternalRegisterTool ¶
func (g *StreamCompleter) InternalRegisterTool(tool tools.AiTool)
func (*StreamCompleter) Setup ¶
func (s *StreamCompleter) Setup(apiKeyEnv, url, debugEnv string) error
func (*StreamCompleter) StreamCompletions ¶
func (s *StreamCompleter) StreamCompletions(ctx context.Context, chat models.Chat) (chan models.CompletionEvent, error)
// streamCompletions taking the messages as prompt conversation. Returns the messages from the chat model.
type Tool ¶
type Tool struct { Name string `json:"name"` Description string `json:"description"` Inputs tools.InputSchema `json:"parameters"` }
Click to show internal directories.
Click to hide internal directories.