Documentation
¶
Overview ¶
Package promptdb 在本地 SQLite 中保存 Playground 对话
Index ¶
- type Store
- func (s *Store) Close() error
- func (s *Store) DeletePrompt(ctx context.Context, id string) error
- func (s *Store) Prompt(ctx context.Context, id string) (api.Prompt, error)
- func (s *Store) Prompts(ctx context.Context) ([]api.PromptSummary, error)
- func (s *Store) SavePrompt(ctx context.Context, prompt api.Prompt) (api.PromptSummary, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store 读写对话库
func (*Store) DeletePrompt ¶
DeletePrompt 删除一份对话,不存在时返回 api.ErrPromptNotFound
func (*Store) SavePrompt ¶
SavePrompt 创建或覆盖一份对话,保留首次创建时间
Click to show internal directories.
Click to hide internal directories.