From ca584ba879e1cc0ee4a02f2767fced0683af17c2 Mon Sep 17 00:00:00 2001 From: Shalom Yiblet Date: Wed, 7 Feb 2024 08:04:04 -0800 Subject: [PATCH] ref: set max tokens arg to `-t` and `--tokens` --- ask_cmd.go | 4 ++-- chat_cmd.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ask_cmd.go b/ask_cmd.go index 783d18a..8292fe9 100644 --- a/ask_cmd.go +++ b/ask_cmd.go @@ -28,8 +28,8 @@ chmod -R 644 /path/to/directory/ type askCmd struct { Question []string `arg:"positional"` - MaxTokens int `default:"0"` - Temperature float32 `default:"0.7"` + MaxTokens int `arg:"--tokens,-t" default:"0" help:"the maximum amount of tokens allowed in the output"` + Temperature float32 `arg:"--temp" default:"0.7"` Bash bool `arg:"--bash" help:"output only valid bash"` Model string `arg:"--model,-m" help:"set openai model"` Attach []string `arg:"--attach,-a,separate" help:"attach additional files at the end of the message. pass '-' to pass in stdin"` diff --git a/chat_cmd.go b/chat_cmd.go index b896c9d..3382e1a 100644 --- a/chat_cmd.go +++ b/chat_cmd.go @@ -16,8 +16,8 @@ import ( type chatCmd struct { File string `arg:"required,positional" help:"the input chat file, if you pass - the command will read from stdin"` Write *string `arg:"positional" help:"the output chat file, if you pass - the output will be the same as input"` - MaxTokens int `default:"0"` - Temperature float32 `default:"0.7"` + MaxTokens int `arg:"--tokens,-t" default:"0" help:"the maximum amount of tokens allowed in the output"` + Temperature float32 `-arg:"--temp" default:"0.7"` Color bool `default:"false"` Model string `arg:"--model,-m" help:"set openai model"` }