aichat/scripts/completions/aichat.nu

69 lines
2.7 KiB
Plaintext
Raw Normal View History

2024-04-13 11:50:10 +00:00
module completions {
def "nu-complete aichat completions" [] {
[ "bash" "zsh" "fish" "powershell" "nushell" ]
}
def "nu-complete aichat model" [] {
^aichat --list-models |
| lines
| parse "{value}"
}
def "nu-complete aichat role" [] {
^aichat --list-roles |
| lines
| parse "{value}"
}
def "nu-complete aichat session" [] {
^aichat --list-sessions |
| lines
| parse "{value}"
}
2024-06-21 22:54:03 +00:00
def "nu-complete aichat agent" [] {
^aichat --list-agents |
| lines
| parse "{value}"
}
def "nu-complete aichat rag" [] {
^aichat --list-rags |
| lines
| parse "{value}"
}
2024-04-13 11:50:10 +00:00
# All-in-one chat and copilot CLI that integrates 10+ AI platforms
export extern aichat [
--model(-m): string@"nu-complete aichat model" # Select a LLM model
--prompt # Use the system prompt
--role(-r): string@"nu-complete aichat role" # Select a role
--session(-s): string@"nu-complete aichat session" # Start or join a session
--save-session # Forces the session to be saved
--agent(-a): string@"nu-complete aichat agent" # Start a agent
--rag(-R): 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
--file(-f): string # Include files with the message
--no-stream(-S) # Turn off stream mode
--wrap(-w): string # Control text wrapping (no, auto, <max-width>)
--no-highlight(-H) # Turn off syntax highlighting
--light-theme # Use light theme
--dry-run # Display the message without sending it
--info # Display information
--list-models # List all available chat models
--list-roles # List all roles
--list-sessions # List all sessions
--list-agents # List all agents
--list-rags # List all RAGs
...text: string # Input text
--help(-h) # Print help
--version(-V) # Print version
2024-04-13 11:50:10 +00:00
]
}
export use completions *