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

@@ -25,7 +25,7 @@ class ModalLLM(LLM):
)
response.raise_for_status()
async def _generate(self, prompt: str, schema: str | None, **kwargs):
async def _generate(self, prompt: str, schema: dict | None, **kwargs):
json_payload = {"prompt": prompt}
if schema:
json_payload["schema"] = json.dumps(schema)