Dixing Xu
commited on
fix: no openai.error
Browse files- .gitignore +0 -2
- aide/backend/backend_openai.py +1 -1
- requirements.txt +3 -0
.gitignore
CHANGED
@@ -168,5 +168,3 @@ logs
|
|
168 |
|
169 |
.gradio/
|
170 |
.ruff_cache/
|
171 |
-
|
172 |
-
.env
|
|
|
168 |
|
169 |
.gradio/
|
170 |
.ruff_cache/
|
|
|
|
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: # Changed from openai.error.BadRequestError
|
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(
|
requirements.txt
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
# AIDE requirements
|
2 |
black==24.3.0
|
3 |
funcy==2.0
|
|
|
1 |
+
# Local package
|
2 |
+
-e .
|
3 |
+
|
4 |
# AIDE requirements
|
5 |
black==24.3.0
|
6 |
funcy==2.0
|