Fixed more or less reading import, attempted to do listening
This commit is contained in:
@@ -2,6 +2,9 @@ import json
|
||||
import re
|
||||
import logging
|
||||
from typing import List, Optional, Callable, TypeVar
|
||||
|
||||
from numba.core.transforms import consolidate_multi_exit_withs
|
||||
from numba.cuda import const
|
||||
from openai import AsyncOpenAI
|
||||
from openai.types.chat import ChatCompletionMessageParam
|
||||
|
||||
@@ -123,7 +126,9 @@ class OpenAI(ILLMService):
|
||||
while attempt < 3:
|
||||
result = await self._client.chat.completions.create(**params)
|
||||
result_content = result.choices[0].message.content
|
||||
|
||||
try:
|
||||
print(result_content)
|
||||
result_json = json.loads(result_content)
|
||||
return map_to_model(result_json)
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user