(self, openai_api_key, all_tools, stream_output=False, llm='ChatGPT')
| 34 | """Use multiple tools to answer a question. Basically pass a natural question to |
| 35 | """ |
| 36 | def __init__(self, openai_api_key, all_tools, stream_output=False, llm='ChatGPT'): |
| 37 | if len(openai_api_key) < 3: # not valid key (TODO: more rigorous checking) |
| 38 | openai_api_key = os.environ.get('OPENAI_API_KEY') |
| 39 | self.openai_api_key = openai_api_key |
| 40 | self.stream_output = stream_output |
| 41 | self.llm_model = llm |
| 42 | self.set_openai_api_key(openai_api_key) |
| 43 | self.load_tools(all_tools) |
| 44 | |
| 45 | def set_openai_api_key(self, key): |
| 46 | logger.info("Using {}".format(self.llm_model)) |
nothing calls this directly
no test coverage detected