Documentation
¶
Index ¶
- type Option
- func WithAddicionalMessage(messages []message.Message) Option
- func WithAdditionalInstructions(instructions string) Option
- func WithInstructions(instructions interface{}) Option
- func WithMaxCompletionTokens(tokens int) Option
- func WithMaxPromptTokens(tokens int) Option
- func WithMetadata(metadata map[string]string) Option
- func WithModel(model string) Option
- func WithObject(object string) Option
- func WithParallelToolCalls(parallel bool) Option
- func WithResponseFormat(format string) Option
- func WithStatus(status string) Option
- func WithStream(stream bool) Option
- func WithTemperature(temperature float64) Option
- func WithThreadID(threadID string) Option
- func WithToolChoice(toolChoice string) Option
- func WithTools(tools []tools.Tool) Option
- func WithTopP(topP float64) Option
- func WithTruncationStrategy(strategy TruncationStrategy) Option
- type Runner
- type TruncationStrategy
- type Usage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Runner)
Option define o tipo para opções funcionais para configurar o runner.
func WithAddicionalMessage ¶
func WithInstructions ¶
func WithInstructions(instructions interface{}) Option
func WithMaxCompletionTokens ¶
func WithMaxPromptTokens ¶
func WithMetadata ¶
func WithObject ¶
Funções para configurar cada campo da struct Runner
func WithParallelToolCalls ¶
func WithResponseFormat ¶
func WithStatus ¶
func WithStream ¶
func WithTemperature ¶
func WithThreadID ¶
func WithToolChoice ¶
func WithTruncationStrategy ¶
func WithTruncationStrategy(strategy TruncationStrategy) Option
type Runner ¶
type Runner struct {
Id *string `json:"id,omitempty"`
Object *string `json:"object,omitempty"`
CreatedAt *int `json:"created_at,omitempty"`
AssistantId string `json:"assistant_id"` // Este campo é obrigatório, sem `omitempty`
ThreadId *string `json:"thread_id,omitempty"`
Status *string `json:"status,omitempty"`
StartedAt *int `json:"started_at,omitempty"`
ExpiresAt *interface{} `json:"expires_at,omitempty"`
CancelledAt *interface{} `json:"cancelled_at,omitempty"`
FailedAt *interface{} `json:"failed_at,omitempty"`
CompletedAt *int `json:"completed_at,omitempty"`
RequiredAction interface{} `json:"required_action,omitempty"`
LastError *interface{} `json:"last_error,omitempty"`
Model *string `json:"model,omitempty"`
Instructions *interface{} `json:"instructions,omitempty"`
AdditionalInstructions *string `json:"additional_instructions,omitempty"`
AddicionalMessage *[]message.Message `json:"additional_messages,omitempty"`
Tools *[]assistant.Tool `json:"tools,omitempty"`
Metadata *map[string]string `json:"metadata,omitempty"`
IncompleteDetails *interface{} `json:"incomplete_details,omitempty"`
Usage *Usage `json:"usage,omitempty"`
Temperature *float64 `json:"temperature,omitempty"`
TopP *float64 `json:"top_p,omitempty"`
MaxPromptTokens *int `json:"max_prompt_tokens,omitempty"`
MaxCompletionTokens *int `json:"max_completion_tokens,omitempty"`
TruncationStrategy *TruncationStrategy `json:"truncation_strategy,omitempty"`
ResponseFormat *string `json:"response_format,omitempty"`
ToolChoice *string `json:"tool_choice,omitempty"`
ParallelToolCalls *bool `json:"parallel_tool_calls,omitempty"`
Stream *bool `json:"stream,omitempty"`
Thread *thread.Thread `json:"thread,omitempty"`
}
type TruncationStrategy ¶
type TruncationStrategy struct {
Type string `json:"type,omitempty"`
LastMessages interface{} `json:"last_messages,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.