Dixing (Dex) Xu
commited on
fix: no openai.error (#51)
Browse files
aide/backend/backend_openai.py
CHANGED
|
@@ -58,7 +58,7 @@ def query(
|
|
| 58 |
messages=messages,
|
| 59 |
**filtered_kwargs,
|
| 60 |
)
|
| 61 |
-
except openai.
|
| 62 |
# Check whether the error indicates that function calling is not supported
|
| 63 |
if "function calling" in str(e).lower() or "tools" in str(e).lower():
|
| 64 |
logger.warning(
|
|
|
|
| 58 |
messages=messages,
|
| 59 |
**filtered_kwargs,
|
| 60 |
)
|
| 61 |
+
except openai.BadRequestError as e:
|
| 62 |
# Check whether the error indicates that function calling is not supported
|
| 63 |
if "function calling" in str(e).lower() or "tools" in str(e).lower():
|
| 64 |
logger.warning(
|