aipotheosis-labs / aipotheosis-labs/aci

AI returns empty response when multiple GMAIL functions are selected

Đang mở
#337 0 bình luận 0 reaction 1 người được giao Được @jiwei-aipolabs nhận Xem trên GitHub
Ngôn ngữ chính
Python
Star
4.9k
Fork
484
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Required Pre-requisites

- [x] I have read the [Documentation](https://www.aci.dev/docs)
- [x] I have searched the [Issue Tracker](https://github.com/aipotheosis-labs/aci/issues) and [Discussions](https://github.com/aipotheosis-labs/aci/discussions) that this hasn't been reported yet.
- [x] Consider asking in [Discussions](https://github.com/aipotheosis-labs/aci/discussions) first

### Description

### **Description:**

When accessing the `/playground` endpoint and selecting **GMAIL** as the app while enabling all functions, the AI response encounters an exception. The backend throws an `openai.APIError` indicating a potential issue with the OpenAI API request. The error traceback points to the `openai_chat_stream` function in `aci/server/agent/prompt.py`.

Error log excerpt:

```
openai.APIError: There was an issue with your request. Please check your inputs and try again
```

---

### **Expected behavior:**

* Upon selecting **GMAIL** and all associated functions in the `/playground` endpoint, the API should successfully handle the GPT request and return the generated response data without any errors.

---

### **Actual behavior:**

* The API returns a 500 Internal Server Error with the following traceback:

```
server-1 | File "/workdir/.venv/lib/python3.12/site-packages/openai/_streaming.py", line 46, in __iter__
server-1 | for item in self._iterator:
server-1 | ^^^^^^^^^^^^^^
server-1 | File "/workdir/.venv/lib/python3.12/site-packages/openai/_streaming.py", line 91, in __stream__
server-1 | raise APIError(
server-1 | openai.APIError: There was an issue with your request. Please check your inputs and try again
```

---

### **Steps to reproduce:**

1. Navigate to `/playground`.
2. Select **GMAIL** as the app.
3. Enable **all available functions**.
4. Submit the request.
5. Observe the backend console for the error traceback.

---

![Image](https://github.com/user-attachments/assets/a3f28a0d-e0cb-49d7-8ca6-4c18927ecd52)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.