diff options
| author | sigoden <sigoden@gmail.com> | 2024-12-01 11:35:12 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-01 11:35:12 +0800 |
| commit | 6b6413b02df588faf6557053751b7e9c591539f7 (patch) | |
| tree | 4f76e1a0eae6a4f762b24bae559167f8883bdf77 /scripts | |
| parent | 7e8e2a6ce6d96ffa31c202ead6f31f18dc73c618 (diff) | |
| download | aichat-6b6413b02df588faf6557053751b7e9c591539f7.tar.gz | |
feat: add cli option `--agent-variable <name> <value>` (#1027)
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/completions/aichat.bash | 2 | ||||
| -rw-r--r-- | scripts/completions/aichat.fish | 7 | ||||
| -rw-r--r-- | scripts/completions/aichat.nu | 3 | ||||
| -rw-r--r-- | scripts/completions/aichat.ps1 | 2 | ||||
| -rw-r--r-- | scripts/completions/aichat.zsh | 2 |
5 files changed, 9 insertions, 7 deletions
diff --git a/scripts/completions/aichat.bash b/scripts/completions/aichat.bash index 260a9d4..cfa7ec8 100644 --- a/scripts/completions/aichat.bash +++ b/scripts/completions/aichat.bash @@ -17,7 +17,7 @@ _aichat() { case "${cmd}" in aichat) - opts="-m -r -s -a -R -e -c -f -S -h -V --model --prompt --role --session --empty-session --save-session --agent --rag --serve --execute --code --file --no-stream --dry-run --info --list-models --list-roles --list-sessions --list-agents --list-rags --help --version" + opts="-m -r -s -a -e -c -f -S -h -V --model --prompt --role --session --empty-session --save-session --agent --agent-variable --rag --serve --execute --code --file --no-stream --dry-run --info --list-models --list-roles --list-sessions --list-agents --list-rags --help --version" if [[ ${cur} == -* || ${cword} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 diff --git a/scripts/completions/aichat.fish b/scripts/completions/aichat.fish index df902b3..19bf96e 100644 --- a/scripts/completions/aichat.fish +++ b/scripts/completions/aichat.fish @@ -1,11 +1,12 @@ complete -c aichat -s m -l model -x -a "(aichat --list-models)" -d 'Select a LLM model' -r complete -c aichat -l prompt -d 'Use the system prompt' complete -c aichat -s r -l role -x -a "(aichat --list-roles)" -d 'Select a role' -r -complete -c aichat -s s -l session -x -a"(aichat --list-sessions)" -d 'Start or join a session' -r +complete -c aichat -s s -l session -x -a "(aichat --list-sessions)" -d 'Start or join a session' -r complete -c aichat -l empty-session -d 'Ensure the session is empty' complete -c aichat -l save-session -d 'Ensure the new conversation is saved to the session' -complete -c aichat -s a -l agent -x -a"(aichat --list-agents)" -d 'Start a agent' -r -complete -c aichat -s R -l rag -x -a"(aichat --list-rags)" -d 'Start a RAG' -r +complete -c aichat -s a -l agent -x -a "(aichat --list-agents)" -d 'Start a agent' -r +complete -c aichat -l agent-variable -d 'Set agent variables' +complete -c aichat -l rag -x -a"(aichat --list-rags)" -d 'Start a RAG' -r complete -c aichat -l serve -d 'Serve the LLM API and WebAPP' complete -c aichat -s e -l execute -d 'Execute commands in natural language' complete -c aichat -s c -l code -d 'Output code only' diff --git a/scripts/completions/aichat.nu b/scripts/completions/aichat.nu index 382ee2d..447da49 100644 --- a/scripts/completions/aichat.nu +++ b/scripts/completions/aichat.nu @@ -43,7 +43,8 @@ module completions { --empty-session # Ensure the session is empty --save-session # Ensure the new conversation is saved to the session --agent(-a): string@"nu-complete aichat agent" # Start a agent - --rag(-R): string@"nu-complete aichat rag" # Start a RAG + --agent-variable # Set agent variables + --rag: string@"nu-complete aichat rag" # Start a RAG --serve # Serve the LLM API and WebAPP --execute(-e) # Execute commands in natural language --code(-c) # Output code only diff --git a/scripts/completions/aichat.ps1 b/scripts/completions/aichat.ps1 index e9a6259..7b3cc82 100644 --- a/scripts/completions/aichat.ps1 +++ b/scripts/completions/aichat.ps1 @@ -31,7 +31,7 @@ Register-ArgumentCompleter -Native -CommandName 'aichat' -ScriptBlock { [CompletionResult]::new('--save-session', '--save-session', [CompletionResultType]::ParameterName, 'Ensure the new conversation is saved to the session') [CompletionResult]::new('-a', '-a', [CompletionResultType]::ParameterName, 'Start a agent') [CompletionResult]::new('--agent', '--agent', [CompletionResultType]::ParameterName, 'Start a agent') - [CompletionResult]::new('-R', '-R', [CompletionResultType]::ParameterName, 'Start a RAG') + [CompletionResult]::new('--agent-variable', '--agent-variable', [CompletionResultType]::ParameterName, 'Set agent variables') [CompletionResult]::new('--rag', '--rag', [CompletionResultType]::ParameterName, 'Start a RAG') [CompletionResult]::new('--serve', '--serve', [CompletionResultType]::ParameterName, 'Serve the LLM API and WebAPP') [CompletionResult]::new('-e', '-e', [CompletionResultType]::ParameterName, 'Execute commands in natural language') diff --git a/scripts/completions/aichat.zsh b/scripts/completions/aichat.zsh index a8b1d0c..ed7627e 100644 --- a/scripts/completions/aichat.zsh +++ b/scripts/completions/aichat.zsh @@ -26,7 +26,7 @@ _aichat() { '--save-session[Ensure the new conversation is saved to the session]' \ '-a[Start a agent]:AGENT:->agents' \ '--agent[Start a agent]:AGENT:->agents' \ -'-R[Start a RAG]:RAG:->rags' \ +'--agent-variable[Set agent variables]' \ '--rag[Start a RAG]:RAG:->rags' \ '--serve[Serve the LLM API and WebAPP]' \ '-e[Execute commands in natural language]' \ |
