observer

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextValueObserverInstance

func ContextValueObserverInstance(ctx context.Context) any

func ContextValueParentID

func ContextValueParentID(ctx context.Context) string

func ContextValueTraceID

func ContextValueTraceID(ctx context.Context) string

func ContextWithObserverInstance

func ContextWithObserverInstance(ctx context.Context, instance any) context.Context

func ContextWithParentID

func ContextWithParentID(ctx context.Context, parentID string) context.Context

func ContextWithTraceID

func ContextWithTraceID(ctx context.Context, traceID string) context.Context

Types

type ContextKey

type ContextKey string
const (
	ContextKeyParentID         ContextKey = "observerParentID"
	ContextKeyTraceID          ContextKey = "observerTraceID"
	ContextKeyObserverInstance ContextKey = "observerInstance"
)

type Embedding

type Embedding struct {
	ID              string
	ParentID        string
	TraceID         string
	Name            string
	Model           string
	ModelParameters types.M
	Input           []string
	Output          []embedder.Embedding
	Metadata        types.M
}

type Event

type Event struct {
	ID       string
	ParentID string
	TraceID  string
	Name     string
	Metadata types.M
}

type Generation

type Generation struct {
	ID              string
	ParentID        string
	TraceID         string
	Name            string
	Model           string
	ModelParameters types.M
	Input           []*thread.Message
	Output          []*thread.Message
	Metadata        types.M
}

type Score

type Score struct {
	ID      string
	TraceID string
	Name    string
	Value   float64
}

type Span

type Span struct {
	ID       string
	ParentID string
	TraceID  string
	Name     string
	Input    any
	Output   any
}

type Trace

type Trace struct {
	ID   string
	Name string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL