aipotheosis-labs / aipotheosis-labs/aci

AI returns empty response when multiple GMAIL functions are selected

Ouverte
#337 0 commentaires 0 réactions 1 personne assignée Réclamée par @jiwei-aipolabs Voir sur GitHub
Langage dominant
Python
Étoiles
4.9k
Forks
484
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### 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)

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.