Versions in this module Expand all Collapse all v1 v1.86.0 Jun 23, 2026 Changes in this version + const AttrAgentDescription + const AttrAgentID + const AttrAgentName + const AttrAgentNameRuntime + const AttrAgentVersion + const AttrCacheBacking + const AttrCacheHit + const AttrConversationID + const AttrDataSourceID + const AttrEmbeddingsDimensionCount + const AttrEvaluationExplanation + const AttrEvaluationName + const AttrEvaluationScoreLabel + const AttrEvaluationScoreValue + const AttrFallbackAttempts + const AttrFallbackFinalModel + const AttrFallbackInCooldown + const AttrFallbackOutcome + const AttrFallbackPrimaryModel + const AttrInputMessages + const AttrOperationName + const AttrOutputMessages + const AttrOutputType + const AttrPromptName + const AttrProviderName + const AttrRequestChoiceCount + const AttrRequestEncodingFormats + const AttrRequestFrequencyPenalty + const AttrRequestMaxTokens + const AttrRequestModel + const AttrRequestPresencePenalty + const AttrRequestSeed + const AttrRequestStopSequences + const AttrRequestStream + const AttrRequestTemperature + const AttrRequestTopK + const AttrRequestTopP + const AttrResponseFinishReasons + const AttrResponseID + const AttrResponseModel + const AttrResponseTimeToFirstChunk + const AttrRetrievalDocuments + const AttrRetrievalQueryText + const AttrRetrievalResultCount + const AttrSandboxContainer + const AttrSandboxExitCode + const AttrSandboxImage + const AttrSandboxRuntime + const AttrSystemInstructions + const AttrTokenType + const AttrToolCallArguments + const AttrToolCallID + const AttrToolCallResult + const AttrToolDefinitions + const AttrToolDescription + const AttrToolName + const AttrToolType + const AttrUsageCacheCreationInputTokens + const AttrUsageCacheReadInputTokens + const AttrUsageInputTokens + const AttrUsageOutputTokens + const AttrUsageReasoningOutputTokens + const AttrWorkflowName + const EnvCaptureMessageContent + const EnvSemconvStability + const ErrorTypeOther + const FallbackOutcomeContextCanceled + const FallbackOutcomeFailed + const FallbackOutcomeSuccess + const OperationChat + const OperationCreateAgent + const OperationEmbeddings + const OperationExecuteTool + const OperationGenerateContent + const OperationInvokeAgent + const OperationInvokeWorkflow + const OperationRetrieval + const OperationTextCompletion + const ProviderAWSBedrock + const ProviderAnthropic + const ProviderAzureAI + const ProviderDMR + const ProviderGCPGenAI + const ProviderGCPVertexAI + const ProviderOpenAI + const TokenTypeCacheCreation + const TokenTypeCacheRead + const TokenTypeInput + const TokenTypeOutput + const TokenTypeReasoning + func ClassifyError(err error) string + func ConversationIDFromContext(ctx context.Context) string + func EmitEvaluationResult(ctx context.Context, result EvaluationResult) + func EmitLegacyAttributes() bool + func InjectSandboxEnv(ctx context.Context) []string + func InjectTraceContextEnv(ctx context.Context) []string + func IsContentCaptureEnabled() bool + func LegacyToolAttributes(toolName, toolType, agentName, sessionID, callID string) []attribute.KeyValue + func ProviderNameForConfig(internalName string) string + func ResetStabilityForTest() + func ServerAddressFromURL(raw string) (string, int) + func SetInputMessages(span *ChatSpan, messages []chat.Message) + func SetOutputMessages(span *ChatSpan, content, reasoning string, toolCalls []tools.ToolCall) + func SetToolDefinitions(span *ChatSpan, toolDefs []tools.Tool) + func WithConversationID(ctx context.Context, id string) context.Context + func WrapStream(span *ChatSpan, stream chat.MessageStream) chat.MessageStream + type CacheSpan struct + func RecordCacheLookup(ctx context.Context, backing string) (context.Context, *CacheSpan) + func RecordCacheStore(ctx context.Context, backing string) (context.Context, *CacheSpan) + func (s *CacheSpan) End() + func (s *CacheSpan) SetHit(hit bool) + type ChatRequest struct + ChoiceCount int + FrequencyPenalty float64 + HasFreqPenalty bool + HasPresPenalty bool + HasTemperature bool + HasTopK bool + HasTopP bool + MaxTokens int + Model string + PresencePenalty float64 + Provider string + Seed int + ServerAddress string + ServerPort int + StopSequences []string + Stream bool + Temperature float64 + TopK float64 + TopP float64 + type ChatSpan struct + func StartChat(ctx context.Context, req ChatRequest) (context.Context, *ChatSpan) + func (s *ChatSpan) AddFinishReason(reason string) + func (s *ChatSpan) End() + func (s *ChatSpan) MarkChunk() + func (s *ChatSpan) RecordError(err error, errType string) + func (s *ChatSpan) RecordUsage(...) + func (s *ChatSpan) SetAttributes(attrs ...attribute.KeyValue) + func (s *ChatSpan) SetResponseID(id string) + func (s *ChatSpan) SetResponseModel(model string) + func (s *ChatSpan) Span() trace.Span + type EmbeddingRequest struct + BatchSize int + EncodingFormats []string + Model string + Provider string + type EmbeddingSpan struct + func StartEmbedding(ctx context.Context, req EmbeddingRequest) (context.Context, *EmbeddingSpan) + func (s *EmbeddingSpan) End() + func (s *EmbeddingSpan) RecordError(err error, errType string) + func (s *EmbeddingSpan) SetDimensions(d int) + func (s *EmbeddingSpan) SetInputTokens(n int64) + type EvaluationResult struct + ErrorType string + Explanation string + HasScoreValue bool + Name string + ScoreLabel string + ScoreValue float64 + type FallbackSpan struct + func StartFallback(ctx context.Context, agentName, primaryModel string, inCooldown bool) (context.Context, *FallbackSpan) + func (s *FallbackSpan) End() + func (s *FallbackSpan) IncrementAttempt() + func (s *FallbackSpan) RecordError(err error, errType string) + func (s *FallbackSpan) SetFinalModel(model string) + func (s *FallbackSpan) SetOutcome(outcome string) + type KeyValue struct + Key string + Value any + type RetrievalSpan struct + func StartRetrieval(ctx context.Context, providerName, dataSourceID string, captureQuery bool, ...) (context.Context, *RetrievalSpan) + func (s *RetrievalSpan) End() + func (s *RetrievalSpan) RecordError(err error, errType string) + func (s *RetrievalSpan) SetAttributes(attrs ...attribute.KeyValue) + func (s *RetrievalSpan) SetResultCount(n int) + type SandboxOptions struct + AgentName string + Container string + Image string + Runtime string + type SandboxSpan struct + func StartSandboxExec(ctx context.Context, opts SandboxOptions) (context.Context, *SandboxSpan) + func (s *SandboxSpan) End() + func (s *SandboxSpan) RecordError(err error, errType string) + func (s *SandboxSpan) SetExitCode(code int) + type Stability int + const StabilityDualEmit + const StabilityGenAILatest + func CurrentStability() Stability + type StreamAttributer interface + GenAIStreamAttributes func() []KeyValue