Additional groq models

modified:   README.rst
	modified:   app.py
This commit is contained in:
Russell Ballestrini 2024-04-21 09:46:35 -04:00
parent a11df86f6c
commit dbcdad6838
2 changed files with 19 additions and 0 deletions

View file

@ -106,6 +106,8 @@ To interact with the various language models, you can use the following commands
- For Together Solar, send a message with ``together/solar`` and include your prompt.
- For Groq Mixtral, send a message with ``groq/mixtral`` and include your prompt.
- For Groq Llama-2, send a message with ``groq/llama2`` and include your prompt.
- For Groq Llama-3, send a message with ``groq/llama3`` and include your prompt.
- For Groq Gemma, send a message with ``groq/gemma`` and include your prompt.
- For vLLM OpenChat, send a message with ``vllm/openchat`` and include your prompt.
- For vLLM OpenHermes, send a message with ``vllm/openhermes`` and include your prompt.
- For Dall-e-3, send a message with ``dall-e-3`` and include your prompt.

17
app.py
View file

@ -50,6 +50,8 @@ system_users = [
"mistralai/Mistral-7B-Instruct-v0.1",
"mixtral-8x7b-32768",
"llama2-70b-4096",
"llama3-70b-8192",
"gemma-7b-it",
"openchat/openchat-3.5-1210",
"openchat/openchat-3.5-0106",
"upstage/SOLAR-10.7B-Instruct-v1.0",
@ -360,6 +362,20 @@ def handle_message(data):
room.name,
model_name="llama2-70b-4096",
)
if "groq/llama3" in data["message"]:
gevent.spawn(
chat_groq,
data["username"],
room.name,
model_name="llama3-70b-8192",
)
if "groq/gemma" in data["message"]:
gevent.spawn(
chat_groq,
data["username"],
room.name,
model_name="gemma-7b-it",
)
if "vllm/openchat" in data["message"]:
gevent.spawn(
chat_gpt,
@ -908,6 +924,7 @@ def chat_together(
def chat_groq(username, room_name, model_name="mixtral-8x7b-32768"):
# https://console.groq.com/docs/models
_limit = 15
if "mixtral" in model_name:
_limit = 50