Documentation
¶
Index ¶
- Constants
- Variables
- func Open(sqlite string) error
- type Batch
- type BatchOp
- type BatchOpsCompletedParams
- type CountBatchOpsRow
- type DBTX
- type InsertBatchOpParams
- type InsertBatchParams
- type Keyring
- type KeyringDeleteParams
- type KeyringGetParams
- type KeyringListParams
- type KeyringSetParams
- type Migration
- type Queries
- func (q *Queries) BatchById(ctx context.Context, id string) (Batch, error)
- func (q *Queries) BatchOps(ctx context.Context, batch string) ([]openai.BatchInput, error)
- func (q *Queries) BatchOpsCompleted(ctx context.Context, arg BatchOpsCompletedParams) ([]openai.BatchOutput, error)
- func (q *Queries) CancelBatch(ctx context.Context, id string) error
- func (q *Queries) CancelBatchOps(ctx context.Context, id string) error
- func (q *Queries) CountBatchOps(ctx context.Context, batch string) (CountBatchOpsRow, error)
- func (q *Queries) DeleteBatchOps(ctx context.Context, batch string) error
- func (q *Queries) Epoch(ctx context.Context) (int64, error)
- func (q *Queries) InsertBatch(ctx context.Context, arg InsertBatchParams) error
- func (q *Queries) InsertBatchOp(ctx context.Context, arg InsertBatchOpParams) error
- func (q *Queries) KeyringDelete(ctx context.Context, arg KeyringDeleteParams) error
- func (q *Queries) KeyringGet(ctx context.Context, arg KeyringGetParams) ([]byte, error)
- func (q *Queries) KeyringList(ctx context.Context, arg KeyringListParams) ([]string, error)
- func (q *Queries) KeyringSet(ctx context.Context, arg KeyringSetParams) error
- func (q *Queries) SubBatches(ctx context.Context, super *string) ([]Batch, error)
- func (q *Queries) SubBatchesCompleted(ctx context.Context, super *string) ([]Batch, error)
- func (q *Queries) SubBatchesPending(ctx context.Context, super *string) ([]Batch, error)
- func (q *Queries) UpdateBatch(ctx context.Context, arg UpdateBatchParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type UpdateBatchParams
Constants ¶
View Source
const Epoch = 2
Variables ¶
View Source
var DB *sql.DB
Functions ¶
Types ¶
type Batch ¶
type Batch struct { ID string `db:"id" json:"id"` Super *string `db:"super" json:"super"` Model string `db:"model" json:"model"` Body openai.Batch `db:"body" json:"body"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt *time.Time `db:"updated_at" json:"updated_at"` CompletedAt *time.Time `db:"completed_at" json:"completed_at"` CanceledAt *time.Time `db:"canceled_at" json:"canceled_at"` }
type BatchOp ¶
type BatchOp struct { Batch string `db:"batch" json:"batch"` CustomID string `db:"custom_id" json:"custom_id"` Request openai.BatchInput `db:"request" json:"request"` Response openai.BatchOutput `db:"response" json:"response"` Implicit bool `db:"implicit" json:"implicit"` Deferred bool `db:"deferred" json:"deferred"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt *time.Time `db:"updated_at" json:"updated_at"` CompletedAt *time.Time `db:"completed_at" json:"completed_at"` CanceledAt *time.Time `db:"canceled_at" json:"canceled_at"` }
type BatchOpsCompletedParams ¶
type CountBatchOpsRow ¶
type InsertBatchOpParams ¶
type InsertBatchParams ¶
type KeyringDeleteParams ¶
type KeyringGetParams ¶
type KeyringListParams ¶
type KeyringSetParams ¶
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) BatchOpsCompleted ¶
func (q *Queries) BatchOpsCompleted(ctx context.Context, arg BatchOpsCompletedParams) ([]openai.BatchOutput, error)
func (*Queries) CancelBatchOps ¶
func (*Queries) CountBatchOps ¶
func (*Queries) DeleteBatchOps ¶
func (*Queries) InsertBatch ¶
func (q *Queries) InsertBatch(ctx context.Context, arg InsertBatchParams) error
func (*Queries) InsertBatchOp ¶
func (q *Queries) InsertBatchOp(ctx context.Context, arg InsertBatchOpParams) error
func (*Queries) KeyringDelete ¶
func (q *Queries) KeyringDelete(ctx context.Context, arg KeyringDeleteParams) error
func (*Queries) KeyringGet ¶
func (*Queries) KeyringList ¶
func (*Queries) KeyringSet ¶
func (q *Queries) KeyringSet(ctx context.Context, arg KeyringSetParams) error
func (*Queries) SubBatches ¶
func (*Queries) SubBatchesCompleted ¶
func (*Queries) SubBatchesPending ¶
func (*Queries) UpdateBatch ¶
func (q *Queries) UpdateBatch(ctx context.Context, arg UpdateBatchParams) error
type UpdateBatchParams ¶
type UpdateBatchParams struct { Body openai.Batch `db:"body" json:"body"` CanceledAt *time.Time `db:"canceled_at" json:"canceled_at"` CompletedAt *time.Time `db:"completed_at" json:"completed_at"` ID string `db:"id" json:"id"` }
func BatchUpdates ¶
func BatchUpdates(batch openai.Batch) (upd UpdateBatchParams)
Click to show internal directories.
Click to hide internal directories.