Private
Public Access
1
0

Add validation to command line flags + update system prompt handling

Renamed `applyPromptFlags` to `applyGenerationFlags` and added
`validateGenerationFlags`
This commit is contained in:
2024-06-23 04:47:47 +00:00
parent 677cfcfebf
commit f89cc7b410
11 changed files with 90 additions and 44 deletions

View File

@@ -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
}