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

Method __init__

bmtools/agent/singletool.py:68–76  ·  view source on GitHub ↗
(self, openai_api_key = "", stream_output=False, llm='ChatGPT')

Source from the content-addressed store, hash-verified

66
67class STQuestionAnswerer:
68 def __init__(self, openai_api_key = "", stream_output=False, llm='ChatGPT'):
69 if len(openai_api_key) < 3: # not valid key (TODO: more rigorous checking)
70 openai_api_key = os.environ.get('OPENAI_API_KEY')
71
72 self.openai_api_key = openai_api_key
73 self.llm_model = llm
74
75 self.set_openai_api_key(openai_api_key)
76 self.stream_output = stream_output
77
78
79

Callers

nothing calls this directly

Calls 1

set_openai_api_keyMethod · 0.95

Tested by

no test coverage detected