Skip to content

chore: Add support for mode Groq models #294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/giant-trees-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-llama": patch
---

Add more Groq models
13 changes: 12 additions & 1 deletion helpers/providers/groq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,18 @@ import prompts from "prompts";
import { ModelConfigParams } from ".";
import { questionHandlers, toChoice } from "../../questions";

const MODELS = ["llama3-8b", "llama3-70b", "mixtral-8x7b"];
const MODELS = [
"llama3-8b",
"llama3-70b",
"mixtral-8x7b",
"llama-3.1-70b",
"llama-3.1-8b",
"llama3-groq-70b-tool-use",
"llama3-groq-8b-tool-use",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

llama3-groq-8b-tool-use this model is not working well with ReAct agent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INFO:     Started server process [31412]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Creating chat engine with filters: filters=[MetadataFilter(key='private', value='true', operator=<FilterOperator.NE: '!='>)] condition=<FilterCondition.AND: 'and'>
> Running step 2e32ecc0-a18b-49ac-a4c9-180ddf9ca65e. Step input: What is the current status of Long Thanh airport? Use the tools
Observation: Error: Could not parse output. Please follow the thought-action-input format. Try again.
> Running step b2e926fa-5e74-4ddd-98b6-d34e04adbee5. Step input: None
Observation: Error: Could not parse output. Please follow the thought-action-input format. Try again.
> Running step 13ff9ef8-dc41-4ef2-8ba0-c00bf4194497. Step input: None
Observation: Error: Could not parse output. Please follow the thought-action-input format. Try again.
> Running step ff0b6ac4-623b-4352-8937-b96fddfc39a8. Step input: None
INFO:     127.0.0.1:60539 - "POST /api/chat HTTP/1.1" 200 OK

"gemma2-9b-it",
"gemma-7b-it",
"llava-v1.5-7b",
];
const DEFAULT_MODEL = MODELS[0];

// Use huggingface embedding models for now as Groq doesn't support embedding models
Expand Down
2 changes: 1 addition & 1 deletion helpers/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const supportedTools: Tool[] = [
dependencies: [
{
name: "duckduckgo-search",
version: "6.1.7",
version: "6.2.11",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small update for duckduckgo-search

},
],
supportedFrameworks: ["fastapi", "nextjs", "express"],
Expand Down
7 changes: 7 additions & 0 deletions templates/components/settings/python/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ def init_groq():
"llama3-8b": "llama3-8b-8192",
"llama3-70b": "llama3-70b-8192",
"mixtral-8x7b": "mixtral-8x7b-32768",
"llama-3.1-70b": "llama-3.1-70b-versatile",
"llama-3.1-8b": "llama-3.1-8b-instant",
"llama3-groq-70b-tool-use": "llama3-groq-70b-8192-tool-use-preview",
"llama3-groq-8b-tool-use": "llama3-groq-8b-8192-tool-use-preview",
"gemma2-9b-it": "gemma2-9b-it",
"gemma-7b-it": "gemma-7b-it",
"llava-v1.5-7b": "llava-v1.5-7b-4096-preview",
}

Settings.llm = Groq(model=model_map[os.getenv("MODEL")])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ function initGroq() {
"llama3-8b": "llama3-8b-8192",
"llama3-70b": "llama3-70b-8192",
"mixtral-8x7b": "mixtral-8x7b-32768",
"llama-3.1-70b": "llama-3.1-70b-versatile",
"llama-3.1-8b": "llama-3.1-8b-instant",
"llama3-groq-70b-tool-use": "llama3-groq-70b-8192-tool-use-preview",
"llama3-groq-8b-tool-use": "llama3-groq-8b-8192-tool-use-preview",
"gemma2-9b-it": "gemma2-9b-it",
"gemma-7b-it": "gemma-7b-it",
"llava-v1.5-7b": "llava-v1.5-7b-4096-preview",
};

Settings.llm = new Groq({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ function initGroq() {
"llama3-8b": "llama3-8b-8192",
"llama3-70b": "llama3-70b-8192",
"mixtral-8x7b": "mixtral-8x7b-32768",
"llama-3.1-70b": "llama-3.1-70b-versatile",
"llama-3.1-8b": "llama-3.1-8b-instant",
"llama3-groq-70b-tool-use": "llama3-groq-70b-8192-tool-use-preview",
"llama3-groq-8b-tool-use": "llama3-groq-8b-8192-tool-use-preview",
"gemma2-9b-it": "gemma2-9b-it",
"gemma-7b-it": "gemma-7b-it",
"llava-v1.5-7b": "llava-v1.5-7b-4096-preview",
};

Settings.llm = new Groq({
Expand Down
Loading