aipotheosis-labs / aipotheosis-labs/aci

AI returns empty response when multiple GMAIL functions are selected

Abierto
#337 0 comentarios 0 reacciones 1 asignado Reclamado por @jiwei-aipolabs Ver en GitHub
Lenguaje dominante
Python
Estrellas
4.9k
Forks
484
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.