Documentation
¶
Index ¶
- type Batch
- type LogEntry
- type Logger
- func (l *Logger) Close()
- func (l *Logger) CreateBatch(id, description string) (primitive.ObjectID, error)
- func (l *Logger) GetBatches() ([]Batch, error)
- func (l *Logger) GetLogs(batchID string) (map[string]interface{}, error)
- func (l *Logger) Log(batchID, prompt, response, model string, inputTokens, outputTokens int) error
- type ModelPrice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogEntry ¶
type LogEntry struct { ID string `bson:"_id,omitempty" json:"id,omitempty"` BatchID string `bson:"batchId" json:"batchId"` Timestamp time.Time `bson:"timestamp" json:"timestamp"` Prompt string `bson:"prompt" json:"prompt"` Response string `bson:"response" json:"response"` InputTokens int `bson:"inputTokens" json:"inputTokens"` OutputTokens int `bson:"outputTokens" json:"outputTokens"` }
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) CreateBatch ¶
func (*Logger) GetBatches ¶
type ModelPrice ¶ added in v0.1.1
type ModelPrice struct {
Input, Output float64
}
Click to show internal directories.
Click to hide internal directories.