Documentation
¶
Index ¶
- type Batch
- type BatchRequest
- type EntryRequest
- type LogEntry
- type Logger
- func (l *Logger) Close(ctx context.Context)
- func (l *Logger) CreateBatch(ctx context.Context, batchReq BatchRequest) (primitive.ObjectID, error)
- func (l *Logger) GetBatch(ctx context.Context, batchID string) (Batch, error)
- func (l *Logger) GetBatches(ctx context.Context) ([]Batch, error)
- func (l *Logger) GetLogs(ctx context.Context, batchID string) ([]LogEntry, error)
- func (l *Logger) Log(ctx context.Context, req EntryRequest) error
- type ModelInfo
- type ModelInfoMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct { ID primitive.ObjectID `bson:"_id" json:"id"` CreatedBy string `bson:"createdBy" json:"createdBy"` Name string `bson:"name" json:"name"` TotalTokens int `bson:"totalTokens" json:"totalTokens"` InputCost float64 `bson:"inputCost" json:"inputCost"` OutputCost float64 `bson:"outputCost" json:"outputCost"` CreatedAt time.Time `bson:"createdAt" json:"createdAt"` }
type BatchRequest ¶ added in v0.1.4
type EntryRequest ¶ added in v0.1.4
type LogEntry ¶
type LogEntry struct { ID string `bson:"_id,omitempty" json:"id,omitempty"` BatchID string `bson:"batchId" json:"batchId"` CreatedBy string `bson:"createdBy" json:"createdBy"` Timestamp time.Time `bson:"timestamp" json:"timestamp"` Name string `bson:"name" json:"name"` Prompt string `bson:"prompt" json:"prompt"` Response string `bson:"response" json:"response"` ModelInfo ModelInfo `bson:"modelInfo" json:"modelInfo"` InputTokens int `bson:"inputTokens" json:"inputTokens"` InputCost float64 `bson:"inputCost" json:"inputCost"` OutputTokens int `bson:"outputTokens" json:"outputTokens"` OutputCost float64 `bson:"outputCost" json:"outputCost"` }
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) CreateBatch ¶
type ModelInfoMap ¶ added in v0.1.4
func (ModelInfoMap) GetModelInfo ¶ added in v0.1.4
func (m ModelInfoMap) GetModelInfo(model string) (ModelInfo, error)
Click to show internal directories.
Click to hide internal directories.