-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dry run #892
Add dry run #892
Conversation
Thank you for the PR. Please refactor and integrate it to the Chatter struct: ... type Chatter struct {
} Please implement a DryRun Vendor and the builder method fabric.GetChatter(..., dryRun) shall return the chatter instance with the DrynRunVendor in the field Chatter.vendor, so we don't need to adapt which prints prompts without sending it. |
@eugeis I've refactored the dry run to a DryRun vendor as requested and ensured that the dry run model is excluded when listing models. Let me know if there's anything else you'd like to adjust. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, please apply those two comments and we would be ready to merge.
Pull Request Description
Summary
This pull request introduces a new
--dry-run
flag to the CLI application. This flag allows users to see what would be sent to the model without actually sending the request. The changes include updates to theREADME.md
for documentation purposes and modifications to the CLI code to implement the dry-run functionality.Files Changed
README.md
--dry-run
flag under the Application Options section.cli/cli.go
--dry-run
flag. This includes fetching the pattern and context content (if provided) and displaying the formatted request that would be sent to the model.cli/flags.go
DryRun
field to theFlags
struct to accommodate the new command-line option.Code Changes
README.md
Application Options: -u, --url= Choose ollama url (default: http://127.0.0.1:11434) -o, --output= Output to file -n, --latest= Number of latest patterns to list (default: 0) + --dry-run Show what would be sent to the model without actually sending it
cli/cli.go
cli/flags.go
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"` }
Reason for Changes
The
--dry-run
flag is introduced to provide users with a way to preview the request that would be sent to the model. This can be useful for debugging and ensuring that the correct data is being sent without making an actual request.Impact of Changes
--dry-run
flag.Test Plan
--dry-run
flag with various combinations of patterns, contexts, and messages to ensure the correct output is displayed.--dry-run
flag is not used.Additional Notes
--dry-run
functionality.--dry-run
feature in future updates.