mirror of
https://github.com/danielmiessler/fabric
synced 2024-11-08 07:11:06 +00:00
add wipe flag for ctx and session
This commit is contained in:
parent
41b711f1ca
commit
dd6cd06b5a
@ -219,6 +219,8 @@ Application Options:
|
||||
-q, --scrape_question= Search question using Jina AI
|
||||
-e, --seed= Seed to be used for LMM generation
|
||||
--dry-run Show what would be sent to the model without actually sending it
|
||||
-w, --wipecontext= Wipe context
|
||||
-W, --wipesession= Wipe session
|
||||
--version Print current version
|
||||
|
||||
Help Options:
|
||||
|
12
cli/cli.go
12
cli/cli.go
@ -100,6 +100,18 @@ func Cli(version string) (message string, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// if the wipe context flag is set, run the wipe context function
|
||||
if currentFlags.WipeContext != "" {
|
||||
err = fabricDb.Contexts.Delete(currentFlags.WipeContext)
|
||||
return
|
||||
}
|
||||
|
||||
// if the wipe session flag is set, run the wipe session function
|
||||
if currentFlags.WipeSession != "" {
|
||||
err = fabricDb.Sessions.Delete(currentFlags.WipeSession)
|
||||
return
|
||||
}
|
||||
|
||||
// if the interactive flag is set, run the interactive function
|
||||
// if currentFlags.Interactive {
|
||||
// interactive.Interactive()
|
||||
|
@ -45,6 +45,8 @@ type Flags struct {
|
||||
ScrapeQuestion string `short:"q" long:"scrape_question" description:"Search question using Jina AI"`
|
||||
Seed int `short:"e" long:"seed" description:"Seed to be used for LMM generation"`
|
||||
DryRun bool `long:"dry-run" description:"Show what would be sent to the model without actually sending it"`
|
||||
WipeContext string `short:"w" long:"wipecontext" description:"Wipe context"`
|
||||
WipeSession string `short:"W" long:"wipesession" description:"Wipe session"`
|
||||
Version bool `long:"version" description:"Print current version"`
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user