SwatGarg commited on
Commit
ff776cc
·
verified ·
1 Parent(s): 15551d7

Update agents.py

Browse files
Files changed (1) hide show
  1. agents.py +6 -2
agents.py CHANGED
@@ -12,13 +12,17 @@ repo_id = "mistralai/Mistral-7B-Instruct-v0.3"
12
  mistral = HuggingFaceEndpoint(repo_id=repo_id, huggingfacehub_api_token=secret_token, max_new_tokens=28000, temperature=0.3, repetition_penalty=1.1)
13
 
14
  from langchain_groq import ChatGroq
 
 
 
15
  # Initialize the Tools
 
16
  web_search_tools = WebSearchTools()
17
 
18
  class ContentAgents:
19
  def __init__(self):
20
- self.llm = ChatGroq(temperature=0.6, groq_api_key=os.environ.get("groq_api_key"), model_name="llama3-8b-8192")
21
- self.image_generator = ImageGenerationTools()
22
 
23
  def generate_image_for_section(self, section_title, topic):
24
  prompt = f"{section_title} illustration for {topic}"
 
12
  mistral = HuggingFaceEndpoint(repo_id=repo_id, huggingfacehub_api_token=secret_token, max_new_tokens=28000, temperature=0.3, repetition_penalty=1.1)
13
 
14
  from langchain_groq import ChatGroq
15
+ # Initialize the Groq LLM
16
+ groq_llm = ChatGroq(temperature=0.6, groq_api_key=os.environ.get("groq_api_key"), model_name="llama3-8b-8192")
17
+
18
  # Initialize the Tools
19
+ image_generation_tools = ImageGenerationTools()
20
  web_search_tools = WebSearchTools()
21
 
22
  class ContentAgents:
23
  def __init__(self):
24
+ self.llm = groq_llm
25
+ self.image_generator = image_generation_tools
26
 
27
  def generate_image_for_section(self, section_title, topic):
28
  prompt = f"{section_title} illustration for {topic}"