Documentation ¶
Index ¶
- Constants
- func GetToolCallDelta(toolCalls []go_openai.ToolCall) string
- func IsOpenAiEngine(engine string) bool
- type ChatToolStep
- type ChatToolStepOption
- type ExecuteToolStep
- type ExecuteToolStepOption
- type Step
- type StepOption
- type ToolCallMerger
- type ToolCompletionResponse
- type ToolStep
- type ToolStepOption
- type Transcription
- type TranscriptionClient
Constants ¶
View Source
const MetadataToolCallsSlug = "tool-calls"
View Source
const MetadataToolsSlug = "tools"
Variables ¶
This section is empty.
Functions ¶
func GetToolCallDelta ¶ added in v0.4.1
func IsOpenAiEngine ¶
Types ¶
type ChatToolStep ¶ added in v0.4.1
type ChatToolStep struct {
// contains filtered or unexported fields
}
func NewChatToolStep ¶ added in v0.4.1
func NewChatToolStep(stepSettings *settings.StepSettings, options ...ChatToolStepOption) (*ChatToolStep, error)
func (*ChatToolStep) AddPublishedTopic ¶ added in v0.4.1
func (t *ChatToolStep) AddPublishedTopic(publisher message.Publisher, topic string) error
func (*ChatToolStep) Start ¶ added in v0.4.1
func (t *ChatToolStep) Start(ctx context.Context, input conversation.Conversation) (steps.StepResult[string], error)
type ChatToolStepOption ¶ added in v0.4.1
type ChatToolStepOption func(step *ChatToolStep)
func WithReflector ¶ added in v0.4.1
func WithReflector(reflector *jsonschema.Reflector) ChatToolStepOption
func WithToolFunctions ¶ added in v0.4.1
func WithToolFunctions(toolFunctions map[string]interface{}) ChatToolStepOption
type ExecuteToolStep ¶ added in v0.2.24
type ExecuteToolStep struct { Tools map[string]interface{} // contains filtered or unexported fields }
func NewExecuteToolStep ¶ added in v0.4.1
func NewExecuteToolStep( tools map[string]interface{}, options ...ExecuteToolStepOption, ) (*ExecuteToolStep, error)
func (*ExecuteToolStep) AddPublishedTopic ¶ added in v0.4.1
func (e *ExecuteToolStep) AddPublishedTopic(publisher message.Publisher, topic string) error
func (*ExecuteToolStep) Start ¶ added in v0.2.24
func (e *ExecuteToolStep) Start( ctx context.Context, input ToolCompletionResponse, ) (steps.StepResult[map[string]interface{}], error)
type ExecuteToolStepOption ¶ added in v0.4.1
type ExecuteToolStepOption func(*ExecuteToolStep) error
func WithExecuteToolStepMessageID ¶ added in v0.4.1
func WithExecuteToolStepMessageID(messageID conversation.NodeID) ExecuteToolStepOption
func WithExecuteToolStepParentID ¶ added in v0.4.1
func WithExecuteToolStepParentID(parentID conversation.NodeID) ExecuteToolStepOption
func WithExecuteToolStepSubscriptionManager ¶ added in v0.4.1
func WithExecuteToolStepSubscriptionManager(subscriptionManager *events.PublisherManager) ExecuteToolStepOption
type Step ¶
type Step struct { Settings *settings.StepSettings // contains filtered or unexported fields }
func NewStep ¶ added in v0.2.24
func NewStep(settings *settings.StepSettings, options ...StepOption) (*Step, error)
func (*Step) AddPublishedTopic ¶ added in v0.4.1
func (*Step) Start ¶
func (csf *Step) Start( ctx context.Context, messages conversation.Conversation, ) (steps.StepResult[string], error)
type StepOption ¶ added in v0.4.1
func WithSubscriptionManager ¶ added in v0.4.1
func WithSubscriptionManager(subscriptionManager *events.PublisherManager) StepOption
type ToolCallMerger ¶ added in v0.2.24
type ToolCallMerger struct {
// contains filtered or unexported fields
}
func NewToolCallMerger ¶ added in v0.2.24
func NewToolCallMerger() *ToolCallMerger
func (*ToolCallMerger) AddToolCalls ¶ added in v0.2.24
func (tcm *ToolCallMerger) AddToolCalls(toolCalls []go_openai.ToolCall)
func (*ToolCallMerger) GetToolCalls ¶ added in v0.2.24
func (tcm *ToolCallMerger) GetToolCalls() []go_openai.ToolCall
type ToolCompletionResponse ¶ added in v0.2.24
type ToolStep ¶ added in v0.2.24
type ToolStep struct { Settings *settings.StepSettings Tools []go_openai.Tool // contains filtered or unexported fields }
func NewToolStep ¶ added in v0.4.1
func NewToolStep( stepSettings *settings.StepSettings, Tools []go_openai.Tool, options ...ToolStepOption, ) (*ToolStep, error)
func (*ToolStep) AddPublishedTopic ¶ added in v0.4.1
func (*ToolStep) SetStreaming ¶ added in v0.2.24
func (*ToolStep) Start ¶ added in v0.2.24
func (csf *ToolStep) Start( ctx context.Context, messages []*conversation.Message, ) (steps.StepResult[ToolCompletionResponse], error)
type ToolStepOption ¶ added in v0.4.1
func WithToolStepMessageID ¶ added in v0.4.1
func WithToolStepMessageID(messageID conversation.NodeID) ToolStepOption
func WithToolStepParentID ¶ added in v0.4.1
func WithToolStepParentID(parentID conversation.NodeID) ToolStepOption
func WithToolStepSubscriptionManager ¶ added in v0.4.1
func WithToolStepSubscriptionManager(subscriptionManager *events.PublisherManager) ToolStepOption
type Transcription ¶ added in v0.2.18
type Transcription struct { File string `json:"file"` Response *openai.AudioResponse `json:"response"` // contains filtered or unexported fields }
type TranscriptionClient ¶ added in v0.2.18
type TranscriptionClient struct {
// contains filtered or unexported fields
}
func NewTranscriptionClient ¶ added in v0.2.18
func NewTranscriptionClient(apiKey, model, prompt, language string, temperature float32) *TranscriptionClient
func (*TranscriptionClient) TranscribeFile ¶ added in v0.2.18
func (tc *TranscriptionClient) TranscribeFile(mp3FilePath string, out chan<- Transcription, wg *sync.WaitGroup)
Click to show internal directories.
Click to hide internal directories.