event

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataPoint

type DataPoint struct {
	TimeStamp            int64   `json:"timeStamp"`
	NumberOfRequests     int64   `json:"numberOfRequests"`
	CostInUsd            float64 `json:"costInUsd"`
	LatencyInMs          int     `json:"latencyInMs"`
	PromptTokenCount     int     `json:"promptTokenCount"`
	CompletionTokenCount int     `json:"completionTokenCount"`
	SuccessCount         int     `json:"successCount"`
	Model                string  `json:"model"`
	KeyId                string  `json:"keyId"`
	CustomId             string  `json:"customId"`
	UserId               string  `json:"userId"`
}

type Event

type Event struct {
	Id                   string   `json:"id"`
	CreatedAt            int64    `json:"created_at"`
	Tags                 []string `json:"tags"`
	KeyId                string   `json:"key_id"`
	CostInUsd            float64  `json:"cost_in_usd"`
	Provider             string   `json:"provider"`
	Model                string   `json:"model"`
	Status               int      `json:"status"`
	PromptTokenCount     int      `json:"prompt_token_count"`
	CompletionTokenCount int      `json:"completion_token_count"`
	LatencyInMs          int      `json:"latency_in_ms"`
	Path                 string   `json:"path"`
	Method               string   `json:"method"`
	CustomId             string   `json:"custom_id"`
	Request              []byte   `json:"request"`
	Response             []byte   `json:"response"`
	UserId               string   `json:"userId"`
}

type EventWithRequestAndContent added in v1.9.0

type EventWithRequestAndContent struct {
	Event               *Event
	IsEmbeddingsRequest bool
	RouteConfig         *custom.RouteConfig
	Request             interface{}
	Content             string
	Response            interface{}
	Key                 *key.ResponseKey
}

type KeyDataPoint added in v1.18.0

type KeyDataPoint struct {
	KeyId     string  `json:"keyId"`
	CostInUsd float64 `json:"costInUsd"`
}

type KeyReportingRequest added in v1.18.0

type KeyReportingRequest struct {
	Tags   []string `json:"tags"`
	Start  int64    `json:"start"`
	End    int64    `json:"end"`
	Limit  int      `json:"limit"`
	Offset int      `json:"offset"`
}

type KeyReportingResponse added in v1.18.0

type KeyReportingResponse struct {
	DataPoints []*KeyDataPoint `json:"dataPoints"`
}

type ReportingRequest

type ReportingRequest struct {
	KeyIds    []string `json:"keyIds"`
	Tags      []string `json:"tags"`
	CustomIds []string `json:"customIds"`
	UserIds   []string `json:"userIds"`
	Start     int64    `json:"start"`
	End       int64    `json:"end"`
	Increment int64    `json:"increment"`
	Filters   []string `json:"filters"`
}

type ReportingResponse

type ReportingResponse struct {
	DataPoints        []*DataPoint `json:"dataPoints"`
	LatencyInMsMedian float64      `json:"latencyInMsMedian"`
	LatencyInMs99th   float64      `json:"latencyInMs99th"`
}

Jump to

Keyboard shortcuts

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