mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-02-13 15:34:59 -05:00
Add dry run
This commit is contained in:
@@ -142,6 +142,13 @@ func Cli() (message string, err error) {
|
||||
}
|
||||
}
|
||||
|
||||
if currentFlags.DryRun {
|
||||
fmt.Println("Dry run: Would send the following request:")
|
||||
fmt.Printf("Chat Request: %+v\n", currentFlags.BuildChatRequest())
|
||||
fmt.Printf("Chat Options: %+v\n", currentFlags.BuildChatOptions())
|
||||
return
|
||||
}
|
||||
|
||||
var chatter *core.Chatter
|
||||
if chatter, err = fabric.GetChatter(currentFlags.Model, currentFlags.Stream); err != nil {
|
||||
return
|
||||
|
||||
@@ -37,6 +37,7 @@ type Flags struct {
|
||||
YouTube string `short:"y" long:"youtube" description:"YouTube video url to grab transcript, comments from it and send to chat"`
|
||||
YouTubeTranscript bool `long:"transcript" description:"Grab transcript from YouTube video and send to chat"`
|
||||
YouTubeComments bool `long:"comments" description:"Grab comments from YouTube video and send to chat"`
|
||||
DryRun bool `long:"dry-run" description:"Show what would be sent to the model without actually sending it"`
|
||||
}
|
||||
|
||||
// Init Initialize flags. returns a Flags struct and an error
|
||||
|
||||
Reference in New Issue
Block a user