from langchain.llms import OpenAI
from callback import MyCallbackHandler
from langchain.callbacks.base import BaseCallbackManager

class QaLlm():

    def __init__(self) -> None:
        manager = BaseCallbackManager([MyCallbackHandler()])
        self.llm = OpenAI(temperature=0, callback_manager=manager, model_name="gpt-3.5-turbo")

    def get_llm(self):
        return self.llm
langchain.llms.OpenAI
[((259, 334), 'langchain.llms.OpenAI', 'OpenAI', ([], {'temperature': '(0)', 'callback_manager': 'manager', 'model_name': '"""gpt-3.5-turbo"""'}), "(temperature=0, callback_manager=manager, model_name='gpt-3.5-turbo')\n", (265, 334), False, 'from langchain.llms import OpenAI\n'), ((218, 237), 'callback.MyCallbackHandler', 'MyCallbackHandler', ([], {}), '()\n', (235, 237), False, 'from callback import MyCallbackHandler\n')]