package
Version:
v0.0.0-...-9ae7e58
Opens a new window with list of versions in this module.
Published: Apr 29, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type APIKey struct {
BaseModel
UserId uint `json:"user_id" gorm:"index"`
Name string `json:"name"`
Key string `json:"key" gorm:"uniqueIndex"`
}
type BaseModel struct {
ID uint `json:"id" gorm:"primarykey"`
CreatedAt time.Time `json:"created_at" gorm:"index"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at" gorm:"index"`
}
type Prompt struct {
BaseModel
UserID uint `json:"user_id" gorm:"index"`
Name string `json:"name"`
Nodes string `json:"nodes" gorm:"type:json"`
Edges string `json:"edges" gorm:"type:json"`
Snippets []Snippet `json:"snippets" gorm:"many2many:prompt_snippets;"`
}
type QueryRecord struct {
BaseModel
APIKey string `json:"api_key" gorm:"index"`
Request string `json:"request"`
Response string `json:"response"`
RequestedModel string `json:"requested_model"`
MaxTokens int `json:"max_tokens"`
InputTokens int `json:"input_tokens"`
OutputTokens int `json:"output_tokens"`
Temperature float32 `json:"temperature"`
TopP float32 `json:"top_p"`
PresencePenalty float32 `json:"presence_penalty"`
FrequencyPenalty float32 `json:"frequency_penalty"`
Stream bool `json:"stream"`
Tags []string `json:"tags" gorm:"serializer:json"`
RequestTimeSeconds float32 `json:"request_time_seconds"`
}
type Snippet struct {
BaseModel
UserId uint `json:"user_id" gorm:"index"`
Name string `json:"name"`
Snippet string `json:"snippet"`
}
type User struct {
BaseModel
Email string `json:"email" gorm:"uniqueIndex"`
HashedPassword string `json:"-"`
Password string `json:"-" gorm:"-"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.