diff options
| author | sigoden <sigoden@gmail.com> | 2024-04-25 20:59:56 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-25 20:59:56 +0800 |
| commit | 29a4ffd5146af917af3fba30c7d3b7739c7bad0c (patch) | |
| tree | 20ef465d84ff017063231a2e894111c7ff62d1e3 /src/client | |
| parent | e5432ff779641473dbd8e4466ac8307aae87de8d (diff) | |
| download | aichat-29a4ffd5146af917af3fba30c7d3b7739c7bad0c.tar.gz | |
feat: support groq (#441)
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/groq.rs | 13 | ||||
| -rw-r--r-- | src/client/mod.rs | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/client/groq.rs b/src/client/groq.rs new file mode 100644 index 0000000..3ff2a41 --- /dev/null +++ b/src/client/groq.rs @@ -0,0 +1,13 @@ +openai_compatible_module!( + GroqConfig, + GroqClient, + "https://api.groq.com/openai/v1", + [ + // https://console.groq.com/docs/models + ("llama3-8b-8192", "text", 8192), + ("llama3-70b-8192", "text", 8192), + ("llama2-70b-4096", "text", 4096), + ("mixtral-8x7b-32768", "text", 32768), + ("gemma-7b-it", "text", 8192), + ] +); diff --git a/src/client/mod.rs b/src/client/mod.rs index bd85e74..9de07d3 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -28,6 +28,7 @@ register_client!( (claude, "claude", ClaudeConfig, ClaudeClient), (mistral, "mistral", MistralConfig, MistralClient), (cohere, "cohere", CohereConfig, CohereClient), + (groq, "groq", GroqConfig, GroqClient), (ollama, "ollama", OllamaConfig, OllamaClient), (ernie, "ernie", ErnieConfig, ErnieClient), (qianwen, "qianwen", QianwenConfig, QianwenClient), |
