MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / init_model

Method init_model

bmtools/agent/translator.py:26–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

24 self.init_flag = False
25
26 def init_model(self):
27 llm = self.create_openai_model(self.openai_api_key, self.model_name)
28 prompt = self.create_prompt()
29 self.chain = LLMChain(llm=llm, prompt=prompt)
30 self.init_flag = True
31
32 def __call__(self, inputs: Dict[str, str]) -> Dict[str, str]:
33 if not self.init_flag:

Callers 1

__call__Method · 0.95

Calls 2

create_openai_modelMethod · 0.95
create_promptMethod · 0.95

Tested by

no test coverage detected