summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/needs_auth/Groq.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-06 01:05:00 +0200
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-06 01:05:00 +0200
commitd44b39b31c83c6a4bc636bea931275702c700feb (patch)
tree8967aa34d2e2f9fa7aa1d86131f524ddd3925ad8 /g4f/Provider/needs_auth/Groq.py
parentAdd authless OpenaiChat (diff)
downloadgpt4free-d44b39b31c83c6a4bc636bea931275702c700feb.tar
gpt4free-d44b39b31c83c6a4bc636bea931275702c700feb.tar.gz
gpt4free-d44b39b31c83c6a4bc636bea931275702c700feb.tar.bz2
gpt4free-d44b39b31c83c6a4bc636bea931275702c700feb.tar.lz
gpt4free-d44b39b31c83c6a4bc636bea931275702c700feb.tar.xz
gpt4free-d44b39b31c83c6a4bc636bea931275702c700feb.tar.zst
gpt4free-d44b39b31c83c6a4bc636bea931275702c700feb.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/needs_auth/Groq.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/g4f/Provider/needs_auth/Groq.py b/g4f/Provider/needs_auth/Groq.py
new file mode 100644
index 00000000..87e87e60
--- /dev/null
+++ b/g4f/Provider/needs_auth/Groq.py
@@ -0,0 +1,23 @@
+from __future__ import annotations
+
+from .Openai import Openai
+from ...typing import AsyncResult, Messages
+
+class Groq(Openai):
+ url = "https://console.groq.com/playground"
+ working = True
+ default_model = "mixtral-8x7b-32768"
+ models = ["mixtral-8x7b-32768", "llama2-70b-4096", "gemma-7b-it"]
+ model_aliases = {"mixtral-8x7b": "mixtral-8x7b-32768", "llama2-70b": "llama2-70b-4096"}
+
+ @classmethod
+ def create_async_generator(
+ cls,
+ model: str,
+ messages: Messages,
+ api_base: str = "https://api.groq.com/openai/v1",
+ **kwargs
+ ) -> AsyncResult:
+ return super().create_async_generator(
+ model, messages, api_base=api_base, **kwargs
+ ) \ No newline at end of file