Documentation ¶
Index ¶
- type AuthenticationRepository
- type DatabaseRepository
- func (dr *DatabaseRepository) ChatCompletion(r *requests.CompletionRequest) (*requests.CompletionResponse, error)
- func (dr *DatabaseRepository) ProxyRequest(r *requests.ProxyRequest) error
- func (dr *DatabaseRepository) SaveQueryRecord(req *requests.CompletionRequest, resp *requests.CompletionResponse) error
- type ModelRepository
- type ProxyRepository
- func (pr *ProxyRepository) ChatCompletion(r *requests.CompletionRequest) (*requests.CompletionResponse, error)
- func (pr *ProxyRepository) ProxyClaude(r *requests.CompletionRequest) (*requests.CompletionResponse, error)
- func (pr *ProxyRepository) ProxyRequest(r *requests.ProxyRequest) error
- func (pr *ProxyRepository) RunInBackground(r *requests.CompletionRequest, req *http.Request)
- type Repository
- type ValidationRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticationRepository ¶
type AuthenticationRepository struct { DB *gorm.DB APIKeyCache sync.Map // contains filtered or unexported fields }
func NewAuthenticationRepository ¶
func NewAuthenticationRepository(db *gorm.DB, r Repository) *AuthenticationRepository
func (*AuthenticationRepository) ChatCompletion ¶
func (ar *AuthenticationRepository) ChatCompletion(r *requests.CompletionRequest) (*requests.CompletionResponse, error)
func (*AuthenticationRepository) IsValidAPIKey ¶
func (ar *AuthenticationRepository) IsValidAPIKey(apiKey string) bool
func (*AuthenticationRepository) ProxyRequest ¶
func (ar *AuthenticationRepository) ProxyRequest(r *requests.ProxyRequest) error
type DatabaseRepository ¶
type DatabaseRepository struct { DB *gorm.DB APIKeyCache sync.Map // contains filtered or unexported fields }
func NewDatabaseRepository ¶
func NewDatabaseRepository(db *gorm.DB, r Repository) *DatabaseRepository
func (*DatabaseRepository) ChatCompletion ¶
func (dr *DatabaseRepository) ChatCompletion(r *requests.CompletionRequest) (*requests.CompletionResponse, error)
func (*DatabaseRepository) ProxyRequest ¶
func (dr *DatabaseRepository) ProxyRequest(r *requests.ProxyRequest) error
func (*DatabaseRepository) SaveQueryRecord ¶
func (dr *DatabaseRepository) SaveQueryRecord(req *requests.CompletionRequest, resp *requests.CompletionResponse) error
type ModelRepository ¶
type ModelRepository struct { DB *gorm.DB ModelCache sync.Map // contains filtered or unexported fields }
func NewModelRepository ¶
func NewModelRepository(db *gorm.DB, r Repository) *ModelRepository
func (*ModelRepository) ChatCompletion ¶
func (ar *ModelRepository) ChatCompletion(r *requests.CompletionRequest) (*requests.CompletionResponse, error)
func (*ModelRepository) ProxyRequest ¶
func (ar *ModelRepository) ProxyRequest(r *requests.ProxyRequest) error
type ProxyRepository ¶
func NewProxyRepository ¶
func NewProxyRepository(Config *config.Config, db *gorm.DB) *ProxyRepository
func (*ProxyRepository) ChatCompletion ¶
func (pr *ProxyRepository) ChatCompletion(r *requests.CompletionRequest) (*requests.CompletionResponse, error)
func (*ProxyRepository) ProxyClaude ¶
func (pr *ProxyRepository) ProxyClaude(r *requests.CompletionRequest) (*requests.CompletionResponse, error)
func (*ProxyRepository) ProxyRequest ¶
func (pr *ProxyRepository) ProxyRequest(r *requests.ProxyRequest) error
func (*ProxyRepository) RunInBackground ¶
func (pr *ProxyRepository) RunInBackground(r *requests.CompletionRequest, req *http.Request)
type Repository ¶
type Repository interface { ProxyRequest(r *requests.ProxyRequest) error ChatCompletion(r *requests.CompletionRequest) (*requests.CompletionResponse, error) }
type ValidationRepository ¶
type ValidationRepository struct {
// contains filtered or unexported fields
}
func NewValidationRepository ¶
func NewValidationRepository(repo Repository) *ValidationRepository
func (*ValidationRepository) ChatCompletion ¶
func (vr *ValidationRepository) ChatCompletion(r *requests.CompletionRequest) (*requests.CompletionResponse, error)
func (*ValidationRepository) ProxyRequest ¶
func (vr *ValidationRepository) ProxyRequest(r *requests.ProxyRequest) error
Click to show internal directories.
Click to hide internal directories.