From 8e0bf16c01a4e27f30312675a36296a02ba0cc25 Mon Sep 17 00:00:00 2001 From: Jamie Beck Date: Mon, 26 Aug 2024 15:16:31 -0400 Subject: [PATCH] bug fix add missing groq the groq model parsing code was missing. it is in known_models so I think this should exist --- scrapegraphai/graphs/abstract_graph.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scrapegraphai/graphs/abstract_graph.py b/scrapegraphai/graphs/abstract_graph.py index e76a2ed7..f88b2d1f 100644 --- a/scrapegraphai/graphs/abstract_graph.py +++ b/scrapegraphai/graphs/abstract_graph.py @@ -178,6 +178,11 @@ def handle_model(model_name, provider, token_key, default_token=8192): explicit_model_tokens = 8192 if "model_tokens" not in llm_params else llm_params["model_tokens"] return handle_model(model_name, "ollama", token_key, explicit_model_tokens) + elif "groq" in llm_params["model"]: + model_name = llm_params["model"].split("groq/")[-1] + explicit_model_tokens = 8192 if "model_tokens" not in llm_params else llm_params["model_tokens"] + return handle_model(model_name, "groq", None, explicit_model_tokens) + elif "claude-3-" in llm_params["model"]: return handle_model(llm_params["model"], "anthropic", "claude3")