Skip to content

Commit 7dd5b1a

Browse files
lurenssgioCarBo
andcommitted
feat: base groq + requirements + toml update with groq
Co-Authored-By: gioCarBo <109686531+giocarbo@users.noreply.github.com>
1 parent 0999708 commit 7dd5b1a

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ graphviz = "0.20.1"
3838
google = "3.0.0"
3939
minify-html = "0.15.0"
4040
free-proxy = "1.1.1"
41+
langchain-groq = "0.1.3"
4142

4243
[tool.poetry.dev-dependencies]
4344
pytest = "8.0.0"

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ python-dotenv==1.0.1
1111
tiktoken>=0.5.2,<0.6.0
1212
tqdm==4.66.1
1313
minify-html==0.15.0
14+
langchain-groq==0.1.3

scrapegraphai/models/groq.py

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"""
2+
Groq module configuration
3+
"""
4+
5+
from langchain_groq import ChatGroq
6+
7+
8+
class Groq(ChatGroq):
9+
"""Class for wrapping Groq module"""
10+
11+
def __init__(self, llm_config: dict):
12+
"""
13+
A wrapper for the Groq class that provides default configuration
14+
and could be extended with additional methods if needed.
15+
16+
Args:
17+
llm_config (dict): Configuration parameters for the language model.
18+
such as model="llama3-70b-8192" and api_key
19+
"""
20+
# Initialize the superclass (ChatOpenAI) with provided config parameters
21+
super().__init__(**llm_config)

0 commit comments

Comments
 (0)