correct schema typing from str to dict

This commit is contained in:
Gokul Mohanarangan
2023-08-17 20:57:31 +05:30
parent 9103c8cca8
commit b08724a191
7 changed files with 12 additions and 8 deletions

View File

@@ -15,7 +15,7 @@ class OpenAILLM(LLM):
self.max_tokens = settings.LLM_MAX_TOKENS
logger.info(f"LLM use openai backend at {self.openai_url}")
async def _generate(self, prompt: str, schema: str | None, **kwargs) -> str:
async def _generate(self, prompt: str, schema: dict | None, **kwargs) -> str:
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {self.openai_key}",