SwatGarg commited on
Commit
cbe9938
·
verified ·
1 Parent(s): 9f4d926

Update agents.py

Browse files
Files changed (1) hide show
  1. agents.py +9 -4
agents.py CHANGED
@@ -6,16 +6,21 @@ from tools.image_generation_tools import ImageGenerationTools
6
 
7
  load_dotenv()
8
  secret_token = os.getenv("content")
9
- groq_api_key = os.getenv("groq_api_key")
10
 
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
- # Assuming there's a Groq client you need to import and set up
14
- from groq import GroqClient
 
 
 
 
 
15
 
16
  class ContentAgents:
17
  def __init__(self):
18
- self.llm = GroqClient(api_key=groq_api_key, model_name="Olamma")
19
  self.image_generator = ImageGenerationTools()
20
 
21
  def generate_image_for_section(self, section_title, topic):
 
6
 
7
  load_dotenv()
8
  secret_token = os.getenv("content")
9
+
10
 
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=groq_api_key, model_name="llama3-8b-8192")
24
  self.image_generator = ImageGenerationTools()
25
 
26
  def generate_image_for_section(self, section_title, topic):