Documentation ¶
Index ¶
- Constants
- func Version() string
- type BackoffConfig
- type Completion
- type Config
- type LLMSpan
- type Message
- type Prompt
- type PromptsResponse
- type Task
- type Traceloop
- func (instance *Traceloop) GetOpenAIChatCompletionRequest(key string, variables map[string]any) (*openai.ChatCompletionRequest, error)
- func (instance *Traceloop) LogPrompt(ctx context.Context, prompt Prompt, workflowAttrs WorkflowAttributes) (LLMSpan, error)
- func (instance *Traceloop) NewWorkflow(ctx context.Context, attrs WorkflowAttributes) *Workflow
- func (instance *Traceloop) Shutdown(ctx context.Context)
- type Usage
- type Workflow
- type WorkflowAttributes
Constants ¶
View Source
const PromptsPath = "/v1/traceloop/prompts"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BackoffConfig ¶ added in v0.0.2
type BackoffConfig struct {
MaxRetries uint64
}
type Completion ¶ added in v0.0.2
type LLMSpan ¶ added in v0.0.2
type LLMSpan struct {
// contains filtered or unexported fields
}
func (*LLMSpan) LogCompletion ¶ added in v0.0.2
type Prompt ¶ added in v0.0.2
type Prompt struct { Vendor string `json:"vendor"` Model string `json:"model"` Mode string `json:"mode"` Temperature float32 `json:"temperature"` TopP float32 `json:"top_p"` Stop []string `json:"stop"` FrequencyPenalty float32 `json:"frequency_penalty"` PresencePenalty float32 `json:"presence_penalty"` Messages []Message `json:"messages"` }
type PromptsResponse ¶ added in v0.0.2
type Task ¶ added in v0.0.3
type Task struct { Name string `json:"name"` // contains filtered or unexported fields }
type Traceloop ¶
func (*Traceloop) GetOpenAIChatCompletionRequest ¶
func (*Traceloop) NewWorkflow ¶ added in v0.0.3
func (instance *Traceloop) NewWorkflow(ctx context.Context, attrs WorkflowAttributes) *Workflow
type Workflow ¶ added in v0.0.3
type Workflow struct { Attributes WorkflowAttributes `json:"workflow_attributes"` // contains filtered or unexported fields }
type WorkflowAttributes ¶ added in v0.0.3
Source Files ¶
Click to show internal directories.
Click to hide internal directories.