Fixed listening import

This commit is contained in:
Carlos-Mesquita
2024-11-15 02:47:37 +00:00
parent e99eda485e
commit 18103c931e
4 changed files with 148 additions and 56 deletions

View File

@@ -22,7 +22,7 @@ class OpenAI(ILLMService):
def __init__(self, client: AsyncOpenAI):
self._client = client
self._logger = logging.getLogger(__name__)
self._default_model = "gpt-4o-2024-08-06"
self._default_model = "gpt-4o"
async def prediction(
self,
@@ -125,8 +125,8 @@ class OpenAI(ILLMService):
result_content = result.choices[0].message.content
try:
print(result_content)
result_json = json.loads(result_content)
print(str(result_json))
return map_to_model(result_json)
except Exception as e:
attempt += 1