prompt

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBClient

type DBClient struct {
	DB *gorm.DB
}

func (*DBClient) Create

func (dbClient *DBClient) Create(ctx context.Context, req *pb.PromptCreateRequest) (*pb.Prompt, error)

func (*DBClient) Delete

func (dbClient *DBClient) Delete(ctx context.Context, req *pb.PromptDeleteRequest) (*commonpb.VoidResponse, error)

func (*DBClient) Get

func (dbClient *DBClient) Get(ctx context.Context, req *pb.PromptGetRequest) (*pb.Prompt, error)

func (*DBClient) Paging

func (dbClient *DBClient) Paging(ctx context.Context, req *pb.PromptPagingRequest) (*pb.PromptPagingResponse, error)

func (*DBClient) Update

func (dbClient *DBClient) Update(ctx context.Context, req *pb.PromptUpdateRequest) (*pb.Prompt, error)

type Prompt

type Prompt struct {
	common.BaseModel
	Name     string            `gorm:"column:name;type:varchar(191)" json:"name" yaml:"name"`
	Desc     string            `gorm:"column:desc;type:varchar(1024)" json:"desc" yaml:"desc"`
	ClientID string            `gorm:"column:client_id;type:char(36)" json:"clientID" yaml:"clientID"`
	Messages message.Messages  `gorm:"column:messages;type:longtext" json:"messages" yaml:"messages"`
	Metadata metadata.Metadata `gorm:"column:metadata;type:mediumtext" json:"metadata" yaml:"metadata"`
}

func (*Prompt) TableName

func (*Prompt) TableName() string

func (*Prompt) ToProtobuf

func (p *Prompt) ToProtobuf() *pb.Prompt

type Prompts

type Prompts []Prompt

func (*Prompts) ToProtobuf

func (prompts *Prompts) ToProtobuf() []*pb.Prompt

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL