summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.example.yaml4
-rw-r--r--src/client/groq.rs13
-rw-r--r--src/client/mod.rs1
3 files changed, 18 insertions, 0 deletions
diff --git a/config.example.yaml b/config.example.yaml
index 1bf6763..10eeeaa 100644
--- a/config.example.yaml
+++ b/config.example.yaml
@@ -65,6 +65,10 @@ clients:
- type: cohere
api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ # See https://console.groq.com/docs/quickstart
+ - type: groq
+ api_key: gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
# Any openai-compatible API providers
- type: openai-compatible
name: localai
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),