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,3 @@
from typing import Union
import httpx
from reflector.llm.base import LLM
from reflector.logger import logger
@@ -17,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: Union[str | None], **kwargs) -> str:
async def _generate(self, prompt: str, schema: str | None, **kwargs) -> str:
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {self.openai_key}",