Project Overview: Groq2API
Groq2API is a versatile project that simplifies the interaction with natural language processing models through an easy-to-use API. The project has been designed to provide flexible deployment options and straightforward usage, making it accessible for various applications where advanced language models can be utilized.
Installation Instructions
To get started with Groq2API, users can quickly deploy it using Docker by executing the following command:
docker run -d -p 8080:8080 ghcr.io/star-studio-develop/groq2api:latest
Deployment Options
Groq2API offers a variety of deployment methods, allowing users to choose the platform that best suits their needs:
-
Vercel Deployment: Click the button below to clone and deploy the project using Vercel.
-
Railway Deployment: Use Railway for a seamless deployment experience.
Usage Guide
Groq2API allows users to interact with various pre-configured models through a simple API. Each model offers different capabilities based on its configuration:
-
Model Options:
gemma-7b-it
mixtral-8x7b-32768
llama2-70b-4096
llama3-8b-8192
llama3-70b-8192
-
Streaming Capabilities: Users can choose between streaming (
true
) and non-streaming (false
) responses. -
Token Limit Configuration: Depending on requirements, users can set the maximum number of tokens for generated outputs:
4096
forllama2-70b-4096
8192
forgemma-7b-it
32768
formixtral-8x7b-32768
-
Message Structure:
role
: Determines the sender of the message (eitheruser
orassistant
).
Example Usage with CURL
Users can interact with the API using a simple POST request. Below is an example command using CURL to connect with the Groq2API service:
curl --request POST \
--url http://127.0.0.1:8080/v1/chat/completions \
--header 'Authorization: Bearer stytch_session' \
--data '{
"messages": [
{
"role": "user",
"content": "hi"
}
],
"model": "mixtral-8x7b-32768",
"max_tokens": 4096,
"stream": true
}'
Acquiring stytch_session
For authentication purposes, acquiring a stytch_session
is necessary, which serves as a token for authorized access.
Groq2API is robust and versatile, offering advanced functionalities through a straightforward interface, making it an excellent tool for developers and businesses looking to leverage the capabilities of state-of-the-art language models.