Skip to content

Commit

Permalink
feat: Add groq model provider (#916)
Browse files Browse the repository at this point in the history
Can now add groq model provider in the admin UI and select groq models to power agents
  • Loading branch information
sanjay920 authored Dec 17, 2024
1 parent 6a6d869 commit 65e74ba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const translateUserFriendlyLabel = (label: string) => {
"OBOT_ANTHROPIC_MODEL_PROVIDER",
"OBOT_OLLAMA_MODEL_PROVIDER",
"OBOT_VOYAGE_MODEL_PROVIDER",
"OBOT_GROQ_MODEL_PROVIDER",
];

return fieldsToStrip
Expand Down
9 changes: 9 additions & 0 deletions ui/admin/app/components/model-providers/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export const CommonModelProviderIds = {
OLLAMA: "ollama-model-provider",
GROQ: "groq-model-provider",
VOYAGE: "voyage-model-provider",
ANTHROPIC: "anthropic-model-provider",
OPENAI: "openai-model-provider",
Expand All @@ -9,6 +10,7 @@ export const CommonModelProviderIds = {
export const ModelProviderLinks = {
[CommonModelProviderIds.VOYAGE]: "https://www.voyageai.com/",
[CommonModelProviderIds.OLLAMA]: "https://ollama.com/",
[CommonModelProviderIds.GROQ]: "https://groq.com/",
[CommonModelProviderIds.AZURE_OPENAI]:
"https://azure.microsoft.com/en-us/explore/",
[CommonModelProviderIds.ANTHROPIC]: "https://www.anthropic.com",
Expand All @@ -33,6 +35,10 @@ export const ModelProviderRequiredTooltips: {
[CommonModelProviderIds.OLLAMA]: {
Host: "IP Address for the ollama server (eg. 127.0.0.1:1234)",
},
[CommonModelProviderIds.GROQ]: {
"Api Key":
"Groq API Key. Can be created and fetched from https://console.groq.com/keys",
},
[CommonModelProviderIds.AZURE_OPENAI]: {
Endpoint:
"Endpoint for the Azure OpenAI service (eg. https://<resource-name>.<region>.api.cognitive.microsoft.com/)",
Expand Down Expand Up @@ -70,4 +76,7 @@ export const ModelProviderSensitiveFields: Record<string, boolean | undefined> =

// Ollama
OBOT_OLLAMA_MODEL_PROVIDER_HOST: true,

// Groq
OBOT_GROQ_MODEL_PROVIDER_API_KEY: true,
};
1 change: 1 addition & 0 deletions ui/admin/app/routes/_auth.model-providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const sortModelProviders = (modelProviders: ModelProvider[]) => {
CommonModelProviderIds.ANTHROPIC,
CommonModelProviderIds.OLLAMA,
CommonModelProviderIds.VOYAGE,
CommonModelProviderIds.GROQ,
];
const aIndex = preferredOrder.indexOf(a.id);
const bIndex = preferredOrder.indexOf(b.id);
Expand Down

0 comments on commit 65e74ba

Please sign in to comment.