Documentation ¶
Index ¶
- type DBClient
- func (dbClient *DBClient) Archive(ctx context.Context, req *pb.SessionArchiveRequest) (*pb.Session, error)
- func (dbClient *DBClient) Create(ctx context.Context, req *pb.SessionCreateRequest) (*pb.Session, error)
- func (dbClient *DBClient) Delete(ctx context.Context, req *pb.SessionDeleteRequest) (*commonpb.VoidResponse, error)
- func (dbClient *DBClient) Get(ctx context.Context, req *pb.SessionGetRequest) (*pb.Session, error)
- func (dbClient *DBClient) GetChatLogs(ctx context.Context, req *pb.SessionChatLogGetRequest) (*pb.SessionChatLogGetResponse, error)
- func (dbClient *DBClient) Paging(ctx context.Context, req *pb.SessionPagingRequest) (*pb.SessionPagingResponse, error)
- func (dbClient *DBClient) Reset(ctx context.Context, req *pb.SessionResetRequest) (*pb.Session, error)
- func (dbClient *DBClient) UnArchive(ctx context.Context, req *pb.SessionUnArchiveRequest) (*pb.Session, error)
- func (dbClient *DBClient) Update(ctx context.Context, req *pb.SessionUpdateRequest) (*pb.Session, error)
- type Session
- type Sessions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBClient ¶
func (*DBClient) Delete ¶
func (dbClient *DBClient) Delete(ctx context.Context, req *pb.SessionDeleteRequest) (*commonpb.VoidResponse, error)
func (*DBClient) GetChatLogs ¶
func (dbClient *DBClient) GetChatLogs(ctx context.Context, req *pb.SessionChatLogGetRequest) (*pb.SessionChatLogGetResponse, error)
func (*DBClient) Paging ¶
func (dbClient *DBClient) Paging(ctx context.Context, req *pb.SessionPagingRequest) (*pb.SessionPagingResponse, error)
type Session ¶
type Session struct { common.BaseModel ClientID string `gorm:"column:client_id;type:char(36)" json:"clientID" yaml:"clientID"` PromptID string `gorm:"column:prompt_id;type:char(36)" json:"promptID" yaml:"promptID"` ModelID string `gorm:"column:model_id;type:char(36)" json:"modelID" yaml:"modelID"` UserID string `gorm:"column:user_id;type:varchar(191)" json:"userID" yaml:"userID"` Scene string `gorm:"column:scene;type:varchar(191)" json:"scene" yaml:"scene"` Name string `gorm:"column:name;type:varchar(191)" json:"name" yaml:"name"` Topic string `gorm:"column:topic;type:text" json:"topic" yaml:"topic"` NumOfCtxMsg int64 `gorm:"column:num_of_ctx_msg;type:int(11)" json:"numOfCtxMsg" yaml:"numOfCtxMsg"` IsArchived bool `gorm:"column:is_archived;type:tinyint(1)" json:"isArchived" yaml:"isArchived"` ResetAt fields.DeletedAt `gorm:"column:reset_at;type:datetime" json:"resetAt" yaml:"resetAt"` Temperature float64 `gorm:"column:temperature;type:decimal(11,0)" json:"temperature" yaml:"temperature"` Metadata metadata.Metadata `gorm:"column:metadata;type:mediumtext" json:"metadata" yaml:"metadata"` }
func (*Session) ToProtobuf ¶
Click to show internal directories.
Click to hide internal directories.