Documentation ¶
Index ¶
- func Bool(b bool) *bool
- func Byte(b byte) *byte
- func Complex128(c complex128) *complex128
- func Complex64(c complex64) *complex64
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int16(i int16) *int16
- func Int32(i int32) *int32
- func Int64(i int64) *int64
- func Int8(i int8) *int8
- func Rune(r rune) *rune
- func String(s string) *string
- func Time(t time.Time) *time.Time
- func Uint(u uint) *uint
- func Uint16(u uint16) *uint16
- func Uint32(u uint32) *uint32
- func Uint64(u uint64) *uint64
- func Uint8(u uint8) *uint8
- func Uintptr(u uintptr) *uintptr
- type BadRequestError
- type BaseEvent
- type CreateDatasetItemRequest
- type CreateDatasetRequest
- type CreateDatasetRunItemRequest
- type CreateEventBody
- type CreateEventEvent
- type CreateGenerationBody
- type CreateGenerationEvent
- type CreateObservationEvent
- type CreatePromptRequest
- type CreateScoreRequest
- type CreateSpanBody
- type CreateSpanEvent
- type Dataset
- type DatasetItem
- type DatasetRun
- type DatasetRunItem
- type DatasetStatus
- type ForbiddenError
- type HealthResponse
- type IngestionBatchRequest
- type IngestionError
- type IngestionEvent
- type IngestionResponse
- type IngestionSuccess
- type IngestionUsage
- type IngestionUsageVisitor
- type MapValue
- type MapValueVisitor
- type ModelUsageUnit
- type NotFoundError
- type Observation
- type ObservationBody
- type ObservationLevel
- type ObservationType
- type Observations
- type ObservationsGetManyRequest
- type OpenAiUsage
- type OptionalObservationBody
- type Project
- type Projects
- type Prompt
- type PromptsGetRequest
- type Score
- type ScoreBody
- type ScoreEvent
- type ScoreGetRequest
- type Scores
- type SdkLogBody
- type SdkLogEvent
- type ServiceUnavailableError
- type Session
- type SessionWithTraces
- type Trace
- type TraceBody
- type TraceEvent
- type TraceListRequest
- type TraceWithDetails
- type TraceWithFullDetails
- type Traces
- type UnauthorizedError
- type UpdateEventBody
- type UpdateGenerationBody
- type UpdateGenerationEvent
- type UpdateObservationEvent
- type UpdateSpanBody
- type UpdateSpanEvent
- type Usage
- type UtilsMetaResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Complex128 ¶
func Complex128(c complex128) *complex128
Complex128 returns a pointer to the given complex128 value.
Types ¶
type BadRequestError ¶
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 CreateDatasetRequest ¶
type CreateDatasetRequest struct {
Name string `json:"name"`
}
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 CreateScoreRequest ¶
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 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 DatasetRunItem ¶
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 ¶
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 IngestionBatchRequest ¶
type IngestionBatchRequest struct {
Batch []interface{} `json:"batch,omitempty"`
}
type IngestionError ¶
type IngestionEvent ¶
type IngestionResponse ¶
type IngestionResponse struct { Successes []*IngestionSuccess `json:"successes,omitempty"` Errors []*IngestionError `json:"errors,omitempty"` }
type IngestionSuccess ¶
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 (*MapValue) Accept ¶
func (m *MapValue) Accept(visitor MapValueVisitor) error
func (MapValue) MarshalJSON ¶
func (*MapValue) UnmarshalJSON ¶
type MapValueVisitor ¶
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 ¶
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 ¶
func (o ObservationLevel) Ptr() *ObservationLevel
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 ¶
func (o ObservationType) Ptr() *ObservationType
type Observations ¶
type Observations struct { Data []*Observation `json:"data,omitempty"` Meta *UtilsMetaResponse `json:"meta,omitempty"` }
type OpenAiUsage ¶
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 PromptsGetRequest ¶
type ScoreEvent ¶
type ScoreGetRequest ¶
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 {}
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 SessionWithTraces ¶
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 TraceListRequest ¶
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 {}
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"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.