Merge pull request #996 from hallelujah-shih/feature/wipe_parameter
add wipe flag for ctx and session
This commit is contained in:
commit
fa457e7812
@ -219,6 +219,8 @@ Application Options:
|
|||||||
-q, --scrape_question= Search question using Jina AI
|
-q, --scrape_question= Search question using Jina AI
|
||||||
-e, --seed= Seed to be used for LMM generation
|
-e, --seed= Seed to be used for LMM generation
|
||||||
--dry-run Show what would be sent to the model without actually sending it
|
--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
|
--version Print current version
|
||||||
|
|
||||||
Help Options:
|
Help Options:
|
||||||
|
12
cli/cli.go
12
cli/cli.go
@ -100,6 +100,18 @@ func Cli(version string) (message string, err error) {
|
|||||||
return
|
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 the interactive flag is set, run the interactive function
|
||||||
// if currentFlags.Interactive {
|
// if currentFlags.Interactive {
|
||||||
// interactive.Interactive()
|
// interactive.Interactive()
|
||||||
|
@ -45,6 +45,8 @@ type Flags struct {
|
|||||||
ScrapeQuestion string `short:"q" long:"scrape_question" description:"Search question using Jina AI"`
|
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"`
|
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"`
|
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"`
|
Version bool `long:"version" description:"Print current version"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user