From 8feaf2a93ddd096bda497980debce640f56589d3 Mon Sep 17 00:00:00 2001 From: sigoden Date: Wed, 10 Apr 2024 23:53:59 +0000 Subject: refactor: adjust client order --- Cargo.toml | 2 +- README.md | 46 ++++++++++++++++++++++++---------------------- src/client/mod.rs | 22 +++++++++++----------- 3 files changed, 36 insertions(+), 34 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 062cb58..98463f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "aichat" version = "0.15.0" edition = "2021" authors = ["sigoden "] -description = "All-in-one chat and copilot CLI for 10+ AI platforms" +description = "All-in-one chat and copilot CLI that integrates 10+ AI platforms" license = "MIT OR Apache-2.0" homepage = "https://github.com/sigoden/aichat" repository = "https://github.com/sigoden/aichat" diff --git a/README.md b/README.md index e847d8c..717ecde 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Crates](https://img.shields.io/crates/v/aichat.svg)](https://crates.io/crates/aichat) [![Discord](https://img.shields.io/discord/1226737085453701222?label=Discord)](https://discord.gg/NYmfN6CA) -All-in-one chat and copilot CLI for 10+ AI platforms. +All-in-one chat and copilot CLI that integrates 10+ AI platforms. Command Mode: @@ -16,27 +16,29 @@ Chat REPL mode: ## Features -- Support most of the LLM platforms - - OpenAI: GPT3.5/GPT4 (paid, vision) - - Gemini: Gemini-1.0/Gemini-1.5 (free, vision) - - Claude: Claude3 (paid) - - Mistral (paid) - - Cohere (paid) - - OpenAI-Compatible - - Ollama (free, local) - - Azure-OpenAI (paid) - - VertexAI (paid, vision) - - Ernie (paid) - - Qianwen (paid, vision) - - Moonshot (paid) -- Support two modes: [Command](#command) and [Chat-REPL](#chat-repl) -- Support [roles](#roles) -- Support sessions (context-aware conversation) -- Support image analysis (vision) +- Supports [chat-REPL](#chat-repl) +- Supports [roles](#roles) +- Supports sessions (context-aware conversation) +- Supports image analysis (vision) - [Shell commands](#shell-commands): Execute commands using natural language -- [Shell integration](#shell-integration): AI powered shell autocompletion +- [Shell integration](#shell-integration): AI-powered shell autocompletion - [Custom theme](https://github.com/sigoden/aichat/wiki/Custom-Theme) -- Stream/Non-stream output +- Stream/non-stream output + +## Integrated platforms + +- OpenAI: GPT3.5/GPT4 (paid, vision) +- Azure-OpenAI (paid) +- OpenAI-Compatible platforms +- Gemini: Gemini-1.0/Gemini-1.5 (free, vision) +- VertexAI (paid, vision) +- Claude: Claude3 (vision, paid) +- Mistral (paid) +- Cohere (paid) +- Ollama (free, local) +- Ernie (paid) +- Qianwen (paid, vision) +- Moonshot (paid) ## Install @@ -151,9 +153,9 @@ aichat --info # System info aichat -r role1 --info # Role info aichat -s session1 --info # Session info -cat data.toml | aichat -c to json > data.json # Pipe IO +cat data.toml | aichat -c to json > data.json # Pipe stdio/stdout -aichat --file a.png --file b.png diff images # Attach files +aichat -f a.png -f b.png diff images # Attach files ``` ### Shell commands diff --git a/src/client/mod.rs b/src/client/mod.rs index d66b282..fd5f4fa 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -9,24 +9,24 @@ pub use model::*; register_client!( (openai, "openai", OpenAIConfig, OpenAIClient), - (gemini, "gemini", GeminiConfig, GeminiClient), - (claude, "claude", ClaudeConfig, ClaudeClient), - (mistral, "mistral", MistralConfig, MistralClient), - (cohere, "cohere", CohereConfig, CohereClient), - ( - openai_compatible, - "openai-compatible", - OpenAICompatibleConfig, - OpenAICompatibleClient - ), - (ollama, "ollama", OllamaConfig, OllamaClient), ( azure_openai, "azure-openai", AzureOpenAIConfig, AzureOpenAIClient ), + ( + openai_compatible, + "openai-compatible", + OpenAICompatibleConfig, + OpenAICompatibleClient + ), + (gemini, "gemini", GeminiConfig, GeminiClient), (vertexai, "vertexai", VertexAIConfig, VertexAIClient), + (claude, "claude", ClaudeConfig, ClaudeClient), + (mistral, "mistral", MistralConfig, MistralClient), + (cohere, "cohere", CohereConfig, CohereClient), + (ollama, "ollama", OllamaConfig, OllamaClient), (ernie, "ernie", ErnieConfig, ErnieClient), (qianwen, "qianwen", QianwenConfig, QianwenClient), (moonshot, "moonshot", MoonshotConfig, MoonshotClient), -- cgit v1.2.3