Skip to content

Commit

Permalink
Add override model args
Browse files Browse the repository at this point in the history
  • Loading branch information
kznrluk committed Feb 8, 2024
1 parent a45cffa commit 8d2315a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/aski.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func Aski(cmd *cobra.Command, args []string) {
profileTarget, err := cmd.Flags().GetString("profile")
isRestMode, _ := cmd.Flags().GetBool("rest")
content, _ := cmd.Flags().GetString("content")
model, _ := cmd.Flags().GetString("model")
fileGlobs, _ := cmd.Flags().GetStringSlice("file")
restore, _ := cmd.Flags().GetString("restore")
verbose, _ := cmd.Flags().GetBool("verbose")
Expand All @@ -43,6 +44,10 @@ func Aski(cmd *cobra.Command, args []string) {
prof = config.InitialProfile()
}

if model != "" {
prof.Model = model
}

var ctx conv.Conversation
if restore != "" {
load, fileName, err := ReadFileFromPWDAndHistoryDir(restore)
Expand Down
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func main() {
rootCmd.PersistentFlags().StringSliceP("file", "f", []string{}, "Input file(s) to start dialog from. Can be specified multiple times.")
rootCmd.PersistentFlags().StringP("profile", "p", "", "Select the profile to use for this conversation, as defined in the .aski/config.yaml file.")
rootCmd.PersistentFlags().StringP("content", "c", "", "Input text to start dialog from command line")
rootCmd.PersistentFlags().StringP("model", "m", "", "Override the model to use for this conversation. This will override the model specified in the profile.")
rootCmd.PersistentFlags().StringP("restore", "r", "", "Restore conversations from history yaml files. Search pwd and .aski/history folders by default. Prefix match.")
rootCmd.PersistentFlags().BoolP("rest", "", false, "When you specify this flag, you will communicate with the REST API instead of streaming. This can be useful if the communication is unstable or if you are not receiving responses properly.")
rootCmd.PersistentFlags().BoolP("verbose", "v", false, "Debug logging")
Expand Down

0 comments on commit 8d2315a

Please sign in to comment.