Add validation to command line flags + update system prompt handling
Renamed `applyPromptFlags` to `applyGenerationFlags` and added `validateGenerationFlags`
This commit is contained in:
@@ -22,6 +22,11 @@ func RetryCmd(ctx *lmcli.Context) *cobra.Command {
|
||||
return nil
|
||||
},
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
err := validateGenerationFlags(ctx, cmd)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
shortName := args[0]
|
||||
conversation := cmdutil.LookupConversation(ctx, shortName)
|
||||
|
||||
@@ -68,6 +73,6 @@ func RetryCmd(ctx *lmcli.Context) *cobra.Command {
|
||||
|
||||
cmd.Flags().Int("offset", 0, "Offset from the last message to retry from.")
|
||||
|
||||
applyPromptFlags(ctx, cmd)
|
||||
applyGenerationFlags(ctx, cmd)
|
||||
return cmd
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user