PR review comments

This commit is contained in:
Gokul Mohanarangan
2023-08-17 14:42:45 +05:30
parent 235ee73f46
commit a98a9853be
9 changed files with 17 additions and 20 deletions

View File

@@ -1,5 +1,4 @@
import json
from typing import Union
import httpx
from reflector.llm.base import LLM
@@ -26,7 +25,7 @@ class ModalLLM(LLM):
)
response.raise_for_status()
async def _generate(self, prompt: str, schema: Union[str | None], **kwargs):
async def _generate(self, prompt: str, schema: str | None, **kwargs):
json_payload = {"prompt": prompt}
if schema:
json_payload["schema"] = json.dumps(schema)