File size: 770 Bytes
b58a992
026aeba
 
 
c433668
 
0ea6d19
bcc15bd
c433668
b58a992
5184c29
b58a992
f7c2fa3
 
 
bcc15bd
c433668
b58a992
5184c29
b58a992
026aeba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import logging
import os
from langchain_groq import ChatGroq

from config import ConfigConstants

def initialize_generation_llm():
    os.environ["GROQ_API_KEY"] = "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"
    model_name = ConfigConstants.GENERATION_MODEL_NAME
    llm = ChatGroq(model=model_name, temperature=0.7)
    llm.name = model_name
    logging.info(f'Generation LLM {model_name} initialized')
    return llm

def initialize_validation_llm():
    os.environ["GROQ_API_KEY"] = "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"
    model_name = ConfigConstants.VALIDATION_MODEL_NAME
    llm = ChatGroq(model=model_name, temperature=0.7)
    llm.name = model_name
    logging.info(f'Validation LLM {model_name} initialized')
    return llm