Method
create_openai_model
(self, openai_api_key: str, model_name: str)
Source from the content-addressed store, hash-verified
| 48 | return inputs |
| 49 | |
| 50 | def create_openai_model(self, openai_api_key: str, model_name: str) -> OpenAI: |
| 51 | if openai_api_key is None: |
| 52 | openai_api_key = os.environ.get('OPENAI_API_KEY') |
| 53 | llm = OpenAI(model_name=model_name, |
| 54 | temperature=0.0, |
| 55 | openai_api_key=openai_api_key) |
| 56 | return llm |
| 57 | |
| 58 | def create_prompt(self) -> PromptTemplate: |
| 59 | template = """ |
Tested by
no test coverage detected