SwatGarg commited on
Commit
cf84cf6
·
verified ·
1 Parent(s): 323073f

Update agents.py

Browse files
Files changed (1) hide show
  1. agents.py +2 -6
agents.py CHANGED
@@ -11,16 +11,12 @@ secret_token = os.getenv("content")
11
  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 groq import Groq
15
-
16
- client = Groq(
17
- api_key=os.environ.get("groq_api_key"),
18
- )
19
 
20
 
21
  class ContentAgents:
22
  def __init__(self):
23
- self.llm = client(api_key=os.environ.get("groq_api_key"), model_name="llama3-8b-8192")
24
  self.image_generator = ImageGenerationTools()
25
 
26
  def generate_image_for_section(self, section_title, topic):
 
11
  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
 
16
 
17
  class ContentAgents:
18
  def __init__(self):
19
+ self.llm = ChatGroq(temperature=0.6, groq_api_key=os.environ.get("groq_api_key"), model_name="llama3-8b-8192")
20
  self.image_generator = ImageGenerationTools()
21
 
22
  def generate_image_for_section(self, section_title, topic):