event

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 1 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"`
	SuccessCouunt        int     `json:"successCount"`
}

type Event

type Event struct {
	Id                   string
	CreatedAt            int64
	Tags                 []string
	KeyId                string
	CostInUsd            float64
	Provider             provider.Provider
	Model                string
	Status               int
	PromptTokenCount     int
	CompletionTokenCount int
	LatencyInMs          int
}

type ReportingRequest

type ReportingRequest struct {
	KeyIds    []string `json:"keyIds"`
	Tags      []string `json:"tags"`
	Start     int64    `json:"start"`
	End       int64    `json:"end"`
	Increment int64    `json:"increment"`
}

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