Rauhan commited on
Commit
9e36d1d
·
verified ·
1 Parent(s): 1c322e9

Update src/components/summaryEngine.py

Browse files
Files changed (1) hide show
  1. src/components/summaryEngine.py +3 -3
src/components/summaryEngine.py CHANGED
@@ -21,15 +21,15 @@ class SummaryEngine:
21
  logger.info("Summarizing the details extracted from the images")
22
  allSummaries = "\n".join(texts)
23
  completion = litellm.completion(
24
- model = self.config["SUMMARIZER"]["LLM"],
25
  api_key = os.environ["GROQ_API_KEY"],
26
  api_base = self.config["GROQ CONFIG"]["BASEURL"],
27
  messages = [
28
  {"role": "system", "content": self.prompts["summaryEnginePrompt"]},
29
  {"role": "user", "content": f"AGGEREGATED SUMMARIES: {allSummaries}"}
30
  ],
31
- max_tokens = self.config["SUMMARIZER"]["MAXTOKENS"],
32
- temperature = self.config["SUMMARIZER"]["TEMPERATURE"]
33
  )
34
  response = completion["choices"][0]["message"]["content"]
35
  logger.info("Summary generated successfully")
 
21
  logger.info("Summarizing the details extracted from the images")
22
  allSummaries = "\n".join(texts)
23
  completion = litellm.completion(
24
+ model = self.config.get("SUMMARIZER", "LLM"),
25
  api_key = os.environ["GROQ_API_KEY"],
26
  api_base = self.config["GROQ CONFIG"]["BASEURL"],
27
  messages = [
28
  {"role": "system", "content": self.prompts["summaryEnginePrompt"]},
29
  {"role": "user", "content": f"AGGEREGATED SUMMARIES: {allSummaries}"}
30
  ],
31
+ max_tokens = self.config.getint("SUMMARIZER", "MAXTOKENS"),
32
+ temperature = self.config.getfloat("SUMMARIZER", "TEMPERATURE")
33
  )
34
  response = completion["choices"][0]["message"]["content"]
35
  logger.info("Summary generated successfully")