Skip to content
Merged
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
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ graphviz = "0.20.1"
google = "3.0.0"
minify-html = "0.15.0"
free-proxy = "1.1.1"
langchain-groq = "0.1.3"

[tool.poetry.dev-dependencies]
pytest = "8.0.0"
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ python-dotenv==1.0.1
tiktoken>=0.5.2,<0.6.0
tqdm==4.66.1
minify-html==0.15.0
free-proxy==1.1.1
langchain-groq==0.1.3
free-proxy==1.1.1
21 changes: 21 additions & 0 deletions scrapegraphai/models/groq.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"""
Groq module configuration
"""

from langchain_groq import ChatGroq


class Groq(ChatGroq):
"""Class for wrapping Groq module"""

def __init__(self, llm_config: dict):
"""
A wrapper for the Groq class that provides default configuration
and could be extended with additional methods if needed.

Args:
llm_config (dict): Configuration parameters for the language model.
such as model="llama3-70b-8192" and api_key
"""
# Initialize the superclass (ChatOpenAI) with provided config parameters
super().__init__(**llm_config)