api

package
v0.0.0-...-16e66f6 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) *bool

Bool returns a pointer to the given bool value.

func Byte

func Byte(b byte) *byte

Byte returns a pointer to the given byte value.

func Complex128

func Complex128(c complex128) *complex128

Complex128 returns a pointer to the given complex128 value.

func Complex64

func Complex64(c complex64) *complex64

Complex64 returns a pointer to the given complex64 value.

func Float32

func Float32(f float32) *float32

Float32 returns a pointer to the given float32 value.

func Float64

func Float64(f float64) *float64

Float64 returns a pointer to the given float64 value.

func Int

func Int(i int) *int

Int returns a pointer to the given int value.

func Int16

func Int16(i int16) *int16

Int16 returns a pointer to the given int16 value.

func Int32

func Int32(i int32) *int32

Int32 returns a pointer to the given int32 value.

func Int64

func Int64(i int64) *int64

Int64 returns a pointer to the given int64 value.

func Int8

func Int8(i int8) *int8

Int8 returns a pointer to the given int8 value.

func Rune

func Rune(r rune) *rune

Rune returns a pointer to the given rune value.

func String

func String(s string) *string

String returns a pointer to the given string value.

func Time

func Time(t time.Time) *time.Time

Time returns a pointer to the given time.Time value.

func Uint

func Uint(u uint) *uint

Uint returns a pointer to the given uint value.

func Uint16

func Uint16(u uint16) *uint16

Uint16 returns a pointer to the given uint16 value.

func Uint32

func Uint32(u uint32) *uint32

Uint32 returns a pointer to the given uint32 value.

func Uint64

func Uint64(u uint64) *uint64

Uint64 returns a pointer to the given uint64 value.

func Uint8

func Uint8(u uint8) *uint8

Uint8 returns a pointer to the given uint8 value.

func Uintptr

func Uintptr(u uintptr) *uintptr

Uintptr returns a pointer to the given uintptr value.

Types

type BadRequestError

type BadRequestError struct {
	*core.APIError
	Body interface{}
}

func (*BadRequestError) MarshalJSON

func (b *BadRequestError) MarshalJSON() ([]byte, error)

func (*BadRequestError) UnmarshalJSON

func (b *BadRequestError) UnmarshalJSON(data []byte) error

func (*BadRequestError) Unwrap

func (b *BadRequestError) Unwrap() error

type BaseEvent

type BaseEvent struct {
	Id        string      `json:"id"`
	Timestamp string      `json:"timestamp"`
	Metadata  interface{} `json:"metadata,omitempty"`
}

type CreateDatasetItemRequest

type CreateDatasetItemRequest struct {
	DatasetName    string       `json:"datasetName"`
	Input          interface{}  `json:"input,omitempty"`
	ExpectedOutput *interface{} `json:"expectedOutput,omitempty"`
	Id             *string      `json:"id,omitempty"`
}

type CreateDatasetRequest

type CreateDatasetRequest struct {
	Name string `json:"name"`
}

type CreateDatasetRunItemRequest

type CreateDatasetRunItemRequest struct {
	RunName       string `json:"runName"`
	DatasetItemId string `json:"datasetItemId"`
	ObservationId string `json:"observationId"`
}

type CreateEventBody

type CreateEventBody struct {
	TraceId             *string           `json:"traceId,omitempty"`
	Name                *string           `json:"name,omitempty"`
	StartTime           *time.Time        `json:"startTime,omitempty"`
	Metadata            *interface{}      `json:"metadata,omitempty"`
	Input               *interface{}      `json:"input,omitempty"`
	Output              *interface{}      `json:"output,omitempty"`
	Level               *ObservationLevel `json:"level,omitempty"`
	StatusMessage       *string           `json:"statusMessage,omitempty"`
	ParentObservationId *string           `json:"parentObservationId,omitempty"`
	Version             *string           `json:"version,omitempty"`
	Id                  *string           `json:"id,omitempty"`
}

type CreateEventEvent

type CreateEventEvent struct {
	Id        string           `json:"id"`
	Timestamp string           `json:"timestamp"`
	Metadata  interface{}      `json:"metadata,omitempty"`
	Body      *CreateEventBody `json:"body,omitempty"`
}

type CreateGenerationBody

type CreateGenerationBody struct {
	TraceId             *string              `json:"traceId,omitempty"`
	Name                *string              `json:"name,omitempty"`
	StartTime           *time.Time           `json:"startTime,omitempty"`
	Metadata            *interface{}         `json:"metadata,omitempty"`
	Input               *interface{}         `json:"input,omitempty"`
	Output              *interface{}         `json:"output,omitempty"`
	Level               *ObservationLevel    `json:"level,omitempty"`
	StatusMessage       *string              `json:"statusMessage,omitempty"`
	ParentObservationId *string              `json:"parentObservationId,omitempty"`
	Version             *string              `json:"version,omitempty"`
	Id                  *string              `json:"id,omitempty"`
	EndTime             *time.Time           `json:"endTime,omitempty"`
	CompletionStartTime *time.Time           `json:"completionStartTime,omitempty"`
	Model               *string              `json:"model,omitempty"`
	ModelParameters     map[string]*MapValue `json:"modelParameters,omitempty"`
	Usage               *IngestionUsage      `json:"usage,omitempty"`
	PromptName          *string              `json:"promptName,omitempty"`
	PromptVersion       *int                 `json:"promptVersion,omitempty"`
}

type CreateGenerationEvent

type CreateGenerationEvent struct {
	Id        string                `json:"id"`
	Timestamp string                `json:"timestamp"`
	Metadata  interface{}           `json:"metadata,omitempty"`
	Body      *CreateGenerationBody `json:"body,omitempty"`
}

type CreateObservationEvent

type CreateObservationEvent struct {
	Id        string           `json:"id"`
	Timestamp string           `json:"timestamp"`
	Metadata  interface{}      `json:"metadata,omitempty"`
	Body      *ObservationBody `json:"body,omitempty"`
}

type CreatePromptRequest

type CreatePromptRequest struct {
	Name     string `json:"name"`
	IsActive bool   `json:"isActive"`
	Prompt   string `json:"prompt"`
}

type CreateScoreRequest

type CreateScoreRequest struct {
	Id            *string `json:"id,omitempty"`
	TraceId       string  `json:"traceId"`
	Name          string  `json:"name"`
	Value         float64 `json:"value"`
	ObservationId *string `json:"observationId,omitempty"`
	Comment       *string `json:"comment,omitempty"`
}

type CreateSpanBody

type CreateSpanBody struct {
	TraceId             *string           `json:"traceId,omitempty"`
	Name                *string           `json:"name,omitempty"`
	StartTime           *time.Time        `json:"startTime,omitempty"`
	Metadata            *interface{}      `json:"metadata,omitempty"`
	Input               *interface{}      `json:"input,omitempty"`
	Output              *interface{}      `json:"output,omitempty"`
	Level               *ObservationLevel `json:"level,omitempty"`
	StatusMessage       *string           `json:"statusMessage,omitempty"`
	ParentObservationId *string           `json:"parentObservationId,omitempty"`
	Version             *string           `json:"version,omitempty"`
	Id                  *string           `json:"id,omitempty"`
	EndTime             *time.Time        `json:"endTime,omitempty"`
}

type CreateSpanEvent

type CreateSpanEvent struct {
	Id        string          `json:"id"`
	Timestamp string          `json:"timestamp"`
	Metadata  interface{}     `json:"metadata,omitempty"`
	Body      *CreateSpanBody `json:"body,omitempty"`
}

type Dataset

type Dataset struct {
	Id        string         `json:"id"`
	Name      string         `json:"name"`
	ProjectId string         `json:"projectId"`
	CreatedAt time.Time      `json:"createdAt"`
	UpdatedAt time.Time      `json:"updatedAt"`
	Items     []*DatasetItem `json:"items,omitempty"`
	Runs      []string       `json:"runs,omitempty"`
}

type DatasetItem

type DatasetItem struct {
	Id                  string        `json:"id"`
	Status              DatasetStatus `json:"status,omitempty"`
	Input               interface{}   `json:"input,omitempty"`
	ExpectedOutput      *interface{}  `json:"expectedOutput,omitempty"`
	SourceObservationId *string       `json:"sourceObservationId,omitempty"`
	DatasetId           string        `json:"datasetId"`
	CreatedAt           time.Time     `json:"createdAt"`
	UpdatedAt           time.Time     `json:"updatedAt"`
}

type DatasetRun

type DatasetRun struct {
	Id              string            `json:"id"`
	Name            string            `json:"name"`
	DatasetId       string            `json:"datasetId"`
	CreatedAt       time.Time         `json:"createdAt"`
	UpdatedAt       time.Time         `json:"updatedAt"`
	DatasetRunItems []*DatasetRunItem `json:"datasetRunItems,omitempty"`
}

type DatasetRunItem

type DatasetRunItem struct {
	Id            string    `json:"id"`
	DatasetRunId  string    `json:"datasetRunId"`
	DatasetItemId string    `json:"datasetItemId"`
	ObservationId string    `json:"observationId"`
	CreatedAt     time.Time `json:"createdAt"`
	UpdatedAt     time.Time `json:"updatedAt"`
}

type DatasetStatus

type DatasetStatus string
const (
	DatasetStatusActive   DatasetStatus = "ACTIVE"
	DatasetStatusArchived DatasetStatus = "ARCHIVED"
)

func NewDatasetStatusFromString

func NewDatasetStatusFromString(s string) (DatasetStatus, error)

func (DatasetStatus) Ptr

func (d DatasetStatus) Ptr() *DatasetStatus

type ForbiddenError

type ForbiddenError struct {
	*core.APIError
	Body interface{}
}

func (*ForbiddenError) MarshalJSON

func (f *ForbiddenError) MarshalJSON() ([]byte, error)

func (*ForbiddenError) UnmarshalJSON

func (f *ForbiddenError) UnmarshalJSON(data []byte) error

func (*ForbiddenError) Unwrap

func (f *ForbiddenError) Unwrap() error

type HealthResponse

type HealthResponse struct {
	// Langfuse server version
	Version string `json:"version"`
	Status  string `json:"status"`
}

type IngestionBatchRequest

type IngestionBatchRequest struct {
	Batch []interface{} `json:"batch,omitempty"`
}

type IngestionError

type IngestionError struct {
	Id      string       `json:"id"`
	Status  int          `json:"status"`
	Message *string      `json:"message,omitempty"`
	Error   *interface{} `json:"error,omitempty"`
}

type IngestionEvent

type IngestionEvent struct {
	Type      string                 `json:"type"`
	Body      interface{}            `json:"body"`
	ID        string                 `json:"id"`
	Metadata  map[string]interface{} `json:"metadata"`
	Timestamp time.Time              `json:"timestamp"`
}

type IngestionResponse

type IngestionResponse struct {
	Successes []*IngestionSuccess `json:"successes,omitempty"`
	Errors    []*IngestionError   `json:"errors,omitempty"`
}

type IngestionSuccess

type IngestionSuccess struct {
	Id     string `json:"id"`
	Status int    `json:"status"`
}

type IngestionUsage

type IngestionUsage struct {
	Usage       *Usage
	OpenAiUsage *OpenAiUsage
	// contains filtered or unexported fields
}

func NewIngestionUsageFromOpenAiUsage

func NewIngestionUsageFromOpenAiUsage(value *OpenAiUsage) *IngestionUsage

func NewIngestionUsageFromUsage

func NewIngestionUsageFromUsage(value *Usage) *IngestionUsage

func (*IngestionUsage) Accept

func (i *IngestionUsage) Accept(visitor IngestionUsageVisitor) error

func (IngestionUsage) MarshalJSON

func (i IngestionUsage) MarshalJSON() ([]byte, error)

func (*IngestionUsage) UnmarshalJSON

func (i *IngestionUsage) UnmarshalJSON(data []byte) error

type IngestionUsageVisitor

type IngestionUsageVisitor interface {
	VisitUsage(*Usage) error
	VisitOpenAiUsage(*OpenAiUsage) error
}

type MapValue

type MapValue struct {
	StringOptional  *string
	IntegerOptional *int
	BooleanOptional *bool
	// contains filtered or unexported fields
}

func NewMapValueFromBooleanOptional

func NewMapValueFromBooleanOptional(value *bool) *MapValue

func NewMapValueFromIntegerOptional

func NewMapValueFromIntegerOptional(value *int) *MapValue

func NewMapValueFromStringOptional

func NewMapValueFromStringOptional(value *string) *MapValue

func (*MapValue) Accept

func (m *MapValue) Accept(visitor MapValueVisitor) error

func (MapValue) MarshalJSON

func (m MapValue) MarshalJSON() ([]byte, error)

func (*MapValue) UnmarshalJSON

func (m *MapValue) UnmarshalJSON(data []byte) error

type MapValueVisitor

type MapValueVisitor interface {
	VisitStringOptional(*string) error
	VisitIntegerOptional(*int) error
	VisitBooleanOptional(*bool) error
}

type ModelUsageUnit

type ModelUsageUnit string
const (
	ModelUsageUnitCharacters ModelUsageUnit = "CHARACTERS"
	ModelUsageUnitTokens     ModelUsageUnit = "TOKENS"
)

func NewModelUsageUnitFromString

func NewModelUsageUnitFromString(s string) (ModelUsageUnit, error)

func (ModelUsageUnit) Ptr

func (m ModelUsageUnit) Ptr() *ModelUsageUnit

type NotFoundError

type NotFoundError struct {
	*core.APIError
	Body interface{}
}

func (*NotFoundError) MarshalJSON

func (n *NotFoundError) MarshalJSON() ([]byte, error)

func (*NotFoundError) UnmarshalJSON

func (n *NotFoundError) UnmarshalJSON(data []byte) error

func (*NotFoundError) Unwrap

func (n *NotFoundError) Unwrap() error

type Observation

type Observation struct {
	Id                  string               `json:"id"`
	TraceId             *string              `json:"traceId,omitempty"`
	Type                string               `json:"type"`
	Name                *string              `json:"name,omitempty"`
	StartTime           time.Time            `json:"startTime"`
	EndTime             *time.Time           `json:"endTime,omitempty"`
	CompletionStartTime *time.Time           `json:"completionStartTime,omitempty"`
	Model               *string              `json:"model,omitempty"`
	ModelParameters     map[string]*MapValue `json:"modelParameters,omitempty"`
	Input               *interface{}         `json:"input,omitempty"`
	Version             *string              `json:"version,omitempty"`
	Metadata            *interface{}         `json:"metadata,omitempty"`
	Output              *interface{}         `json:"output,omitempty"`
	Usage               *Usage               `json:"usage,omitempty"`
	Level               ObservationLevel     `json:"level,omitempty"`
	StatusMessage       *string              `json:"statusMessage,omitempty"`
	ParentObservationId *string              `json:"parentObservationId,omitempty"`
	PromptId            *string              `json:"promptId,omitempty"`
}

type ObservationBody

type ObservationBody struct {
	Id                  *string              `json:"id,omitempty"`
	TraceId             *string              `json:"traceId,omitempty"`
	Type                ObservationType      `json:"type,omitempty"`
	Name                *string              `json:"name,omitempty"`
	StartTime           *time.Time           `json:"startTime,omitempty"`
	EndTime             *time.Time           `json:"endTime,omitempty"`
	CompletionStartTime *time.Time           `json:"completionStartTime,omitempty"`
	Model               *string              `json:"model,omitempty"`
	ModelParameters     map[string]*MapValue `json:"modelParameters,omitempty"`
	Input               *interface{}         `json:"input,omitempty"`
	Version             *string              `json:"version,omitempty"`
	Metadata            *interface{}         `json:"metadata,omitempty"`
	Output              *interface{}         `json:"output,omitempty"`
	Usage               *Usage               `json:"usage,omitempty"`
	Level               *ObservationLevel    `json:"level,omitempty"`
	StatusMessage       *string              `json:"statusMessage,omitempty"`
	ParentObservationId *string              `json:"parentObservationId,omitempty"`
}

type ObservationLevel

type ObservationLevel string
const (
	ObservationLevelDebug   ObservationLevel = "DEBUG"
	ObservationLevelDefault ObservationLevel = "DEFAULT"
	ObservationLevelWarning ObservationLevel = "WARNING"
	ObservationLevelError   ObservationLevel = "ERROR"
)

func NewObservationLevelFromString

func NewObservationLevelFromString(s string) (ObservationLevel, error)

func (ObservationLevel) Ptr

type ObservationType

type ObservationType string
const (
	ObservationTypeSpan       ObservationType = "SPAN"
	ObservationTypeGeneration ObservationType = "GENERATION"
	ObservationTypeEvent      ObservationType = "EVENT"
)

func NewObservationTypeFromString

func NewObservationTypeFromString(s string) (ObservationType, error)

func (ObservationType) Ptr

type Observations

type Observations struct {
	Data []*Observation     `json:"data,omitempty"`
	Meta *UtilsMetaResponse `json:"meta,omitempty"`
}

type ObservationsGetManyRequest

type ObservationsGetManyRequest struct {
	Page                *int    `json:"-"`
	Limit               *int    `json:"-"`
	Name                *string `json:"-"`
	UserId              *string `json:"-"`
	Type                *string `json:"-"`
	TraceId             *string `json:"-"`
	ParentObservationId *string `json:"-"`
}

type OpenAiUsage

type OpenAiUsage struct {
	PromptTokens     *int `json:"promptTokens,omitempty"`
	CompletionTokens *int `json:"completionTokens,omitempty"`
	TotalTokens      *int `json:"totalTokens,omitempty"`
}

type OptionalObservationBody

type OptionalObservationBody struct {
	TraceId             *string           `json:"traceId,omitempty"`
	Name                *string           `json:"name,omitempty"`
	StartTime           *time.Time        `json:"startTime,omitempty"`
	Metadata            *interface{}      `json:"metadata,omitempty"`
	Input               *interface{}      `json:"input,omitempty"`
	Output              *interface{}      `json:"output,omitempty"`
	Level               *ObservationLevel `json:"level,omitempty"`
	StatusMessage       *string           `json:"statusMessage,omitempty"`
	ParentObservationId *string           `json:"parentObservationId,omitempty"`
	Version             *string           `json:"version,omitempty"`
}

type Project

type Project struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type Projects

type Projects struct {
	Data []*Project `json:"data,omitempty"`
}

type Prompt

type Prompt struct {
	Name    string `json:"name"`
	Version int    `json:"version"`
	Prompt  string `json:"prompt"`
}

type PromptsGetRequest

type PromptsGetRequest struct {
	Name    string `json:"-"`
	Version *int   `json:"-"`
}

type Score

type Score struct {
	Id            string    `json:"id"`
	TraceId       string    `json:"traceId"`
	Name          string    `json:"name"`
	Value         float64   `json:"value"`
	ObservationId *string   `json:"observationId,omitempty"`
	Timestamp     time.Time `json:"timestamp"`
	Comment       *string   `json:"comment,omitempty"`
}

type ScoreBody

type ScoreBody struct {
	Id            *string `json:"id,omitempty"`
	TraceId       string  `json:"traceId"`
	Name          string  `json:"name"`
	Value         float64 `json:"value"`
	ObservationId *string `json:"observationId,omitempty"`
	Comment       *string `json:"comment,omitempty"`
}

type ScoreEvent

type ScoreEvent struct {
	Id        string      `json:"id"`
	Timestamp string      `json:"timestamp"`
	Metadata  interface{} `json:"metadata,omitempty"`
	Body      *ScoreBody  `json:"body,omitempty"`
}

type ScoreGetRequest

type ScoreGetRequest struct {
	Page   *int    `json:"-"`
	Limit  *int    `json:"-"`
	UserId *string `json:"-"`
	Name   *string `json:"-"`
}

type Scores

type Scores struct {
	Data []*Score           `json:"data,omitempty"`
	Meta *UtilsMetaResponse `json:"meta,omitempty"`
}

type SdkLogBody

type SdkLogBody struct {
	Log interface{} `json:"log,omitempty"`
}

type SdkLogEvent

type SdkLogEvent struct {
	Id        string      `json:"id"`
	Timestamp string      `json:"timestamp"`
	Metadata  interface{} `json:"metadata,omitempty"`
	Body      *SdkLogBody `json:"body,omitempty"`
}

type ServiceUnavailableError

type ServiceUnavailableError struct {
	*core.APIError
	Body interface{}
}

func (*ServiceUnavailableError) MarshalJSON

func (s *ServiceUnavailableError) MarshalJSON() ([]byte, error)

func (*ServiceUnavailableError) UnmarshalJSON

func (s *ServiceUnavailableError) UnmarshalJSON(data []byte) error

func (*ServiceUnavailableError) Unwrap

func (s *ServiceUnavailableError) Unwrap() error

type Session

type Session struct {
	Id        string    `json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	ProjectId string    `json:"projectId"`
}

type SessionWithTraces

type SessionWithTraces struct {
	Id        string    `json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	ProjectId string    `json:"projectId"`
	Traces    []*Trace  `json:"traces,omitempty"`
}

type Trace

type Trace struct {
	// The unique identifier of a trace
	Id        string       `json:"id"`
	Timestamp time.Time    `json:"timestamp"`
	Name      *string      `json:"name,omitempty"`
	Input     *interface{} `json:"input,omitempty"`
	Output    *interface{} `json:"output,omitempty"`
	SessionId *string      `json:"sessionId,omitempty"`
	Release   *string      `json:"release,omitempty"`
	Version   *string      `json:"version,omitempty"`
	UserId    *string      `json:"userId,omitempty"`
	Metadata  *interface{} `json:"metadata,omitempty"`
	Tags      []string     `json:"tags,omitempty"`
	// Public traces are accessible via url without login
	Public *bool `json:"public,omitempty"`
}

type TraceBody

type TraceBody struct {
	Id        *string      `json:"id,omitempty"`
	Name      *string      `json:"name,omitempty"`
	UserId    *string      `json:"userId,omitempty"`
	Input     *interface{} `json:"input,omitempty"`
	Output    *interface{} `json:"output,omitempty"`
	SessionId *string      `json:"sessionId,omitempty"`
	Release   *string      `json:"release,omitempty"`
	Version   *string      `json:"version,omitempty"`
	Metadata  *interface{} `json:"metadata,omitempty"`
	Tags      []string     `json:"tags,omitempty"`
	// Make trace publicly accessible via url
	Public *bool `json:"public,omitempty"`
}

type TraceEvent

type TraceEvent struct {
	Id        string      `json:"id"`
	Timestamp string      `json:"timestamp"`
	Metadata  interface{} `json:"metadata,omitempty"`
	Body      *TraceBody  `json:"body,omitempty"`
}

type TraceListRequest

type TraceListRequest struct {
	Page   *int    `json:"-"`
	Limit  *int    `json:"-"`
	UserId *string `json:"-"`
	Name   *string `json:"-"`
	// Only traces that include all of these tags will be returned.
	Tags []*string `json:"-"`
}

type TraceWithDetails

type TraceWithDetails struct {
	// The unique identifier of a trace
	Id        string       `json:"id"`
	Timestamp time.Time    `json:"timestamp"`
	Name      *string      `json:"name,omitempty"`
	Input     *interface{} `json:"input,omitempty"`
	Output    *interface{} `json:"output,omitempty"`
	SessionId *string      `json:"sessionId,omitempty"`
	Release   *string      `json:"release,omitempty"`
	Version   *string      `json:"version,omitempty"`
	UserId    *string      `json:"userId,omitempty"`
	Metadata  *interface{} `json:"metadata,omitempty"`
	Tags      []string     `json:"tags,omitempty"`
	// Public traces are accessible via url without login
	Public *bool `json:"public,omitempty"`
	// List of observation ids
	Observations []string `json:"observations,omitempty"`
	// List of score ids
	Scores []string `json:"scores,omitempty"`
}

type TraceWithFullDetails

type TraceWithFullDetails struct {
	// The unique identifier of a trace
	Id        string       `json:"id"`
	Timestamp time.Time    `json:"timestamp"`
	Name      *string      `json:"name,omitempty"`
	Input     *interface{} `json:"input,omitempty"`
	Output    *interface{} `json:"output,omitempty"`
	SessionId *string      `json:"sessionId,omitempty"`
	Release   *string      `json:"release,omitempty"`
	Version   *string      `json:"version,omitempty"`
	UserId    *string      `json:"userId,omitempty"`
	Metadata  *interface{} `json:"metadata,omitempty"`
	Tags      []string     `json:"tags,omitempty"`
	// Public traces are accessible via url without login
	Public       *bool          `json:"public,omitempty"`
	Observations []*Observation `json:"observations,omitempty"`
	Scores       []*Score       `json:"scores,omitempty"`
}

type Traces

type Traces struct {
	Data []*TraceWithDetails `json:"data,omitempty"`
	Meta *UtilsMetaResponse  `json:"meta,omitempty"`
}

type UnauthorizedError

type UnauthorizedError struct {
	*core.APIError
	Body interface{}
}

func (*UnauthorizedError) MarshalJSON

func (u *UnauthorizedError) MarshalJSON() ([]byte, error)

func (*UnauthorizedError) UnmarshalJSON

func (u *UnauthorizedError) UnmarshalJSON(data []byte) error

func (*UnauthorizedError) Unwrap

func (u *UnauthorizedError) Unwrap() error

type UpdateEventBody

type UpdateEventBody struct {
	TraceId             *string           `json:"traceId,omitempty"`
	Name                *string           `json:"name,omitempty"`
	StartTime           *time.Time        `json:"startTime,omitempty"`
	Metadata            *interface{}      `json:"metadata,omitempty"`
	Input               *interface{}      `json:"input,omitempty"`
	Output              *interface{}      `json:"output,omitempty"`
	Level               *ObservationLevel `json:"level,omitempty"`
	StatusMessage       *string           `json:"statusMessage,omitempty"`
	ParentObservationId *string           `json:"parentObservationId,omitempty"`
	Version             *string           `json:"version,omitempty"`
	Id                  string            `json:"id"`
}

type UpdateGenerationBody

type UpdateGenerationBody struct {
	TraceId             *string              `json:"traceId,omitempty"`
	Name                *string              `json:"name,omitempty"`
	StartTime           *time.Time           `json:"startTime,omitempty"`
	Metadata            *interface{}         `json:"metadata,omitempty"`
	Input               *interface{}         `json:"input,omitempty"`
	Output              *interface{}         `json:"output,omitempty"`
	Level               *ObservationLevel    `json:"level,omitempty"`
	StatusMessage       *string              `json:"statusMessage,omitempty"`
	ParentObservationId *string              `json:"parentObservationId,omitempty"`
	Version             *string              `json:"version,omitempty"`
	Id                  string               `json:"id"`
	EndTime             *time.Time           `json:"endTime,omitempty"`
	CompletionStartTime *time.Time           `json:"completionStartTime,omitempty"`
	Model               *string              `json:"model,omitempty"`
	ModelParameters     map[string]*MapValue `json:"modelParameters,omitempty"`
	Usage               *IngestionUsage      `json:"usage,omitempty"`
	PromptName          *string              `json:"promptName,omitempty"`
	PromptVersion       *int                 `json:"promptVersion,omitempty"`
}

type UpdateGenerationEvent

type UpdateGenerationEvent struct {
	Id        string                `json:"id"`
	Timestamp string                `json:"timestamp"`
	Metadata  interface{}           `json:"metadata,omitempty"`
	Body      *UpdateGenerationBody `json:"body,omitempty"`
}

type UpdateObservationEvent

type UpdateObservationEvent struct {
	Id        string           `json:"id"`
	Timestamp string           `json:"timestamp"`
	Metadata  interface{}      `json:"metadata,omitempty"`
	Body      *ObservationBody `json:"body,omitempty"`
}

type UpdateSpanBody

type UpdateSpanBody struct {
	TraceId             *string           `json:"traceId,omitempty"`
	Name                *string           `json:"name,omitempty"`
	StartTime           *time.Time        `json:"startTime,omitempty"`
	Metadata            *interface{}      `json:"metadata,omitempty"`
	Input               *interface{}      `json:"input,omitempty"`
	Output              *interface{}      `json:"output,omitempty"`
	Level               *ObservationLevel `json:"level,omitempty"`
	StatusMessage       *string           `json:"statusMessage,omitempty"`
	ParentObservationId *string           `json:"parentObservationId,omitempty"`
	Version             *string           `json:"version,omitempty"`
	Id                  string            `json:"id"`
	EndTime             *time.Time        `json:"endTime,omitempty"`
}

type UpdateSpanEvent

type UpdateSpanEvent struct {
	Id        string          `json:"id"`
	Timestamp string          `json:"timestamp"`
	Metadata  interface{}     `json:"metadata,omitempty"`
	Body      *UpdateSpanBody `json:"body,omitempty"`
}

type Usage

type Usage struct {
	Input  *int            `json:"input,omitempty"`
	Output *int            `json:"output,omitempty"`
	Total  *int            `json:"total,omitempty"`
	Unit   *ModelUsageUnit `json:"unit,omitempty"`
}

type UtilsMetaResponse

type UtilsMetaResponse struct {
	// current page number
	Page int `json:"page"`
	// number of items per page
	Limit int `json:"limit"`
	// number of total items given the current filters/selection (if any)
	TotalItems int `json:"totalItems"`
	// number of total pages given the current limit
	TotalPages int `json:"totalPages"`
}

Jump to

Keyboard shortcuts

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