Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket connection closes when gemini executes code using Matplotlib #182

Open
rkdlight opened this issue Jan 23, 2025 · 0 comments
Open
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@rkdlight
Copy link

I was working through Gemini live api and asking LLM to draw a graph based on some data. The model performed everything correctly and built a graph. But when I sent her the next request, the connection was lost. This is what is output in the logs:

2025-01-24 00:26:52 - DEBUG - websockets.client - < PONG 4b f2 5e d3 [binary, 4 bytes]
2025-01-24 00:26:52 - DEBUG - websockets.client - % received keepalive pong
2025-01-24 00:26:52 - DEBUG - websockets.client - < CLOSE 1008 (policy violation) Request trace id: 5abe86...: application/json isn't [125 bytes]
2025-01-24 00:26:52 - DEBUG - websockets.client - > CLOSE 1008 (policy violation) Request trace id: 5abe86...: application/json isn't [125 bytes]
2025-01-24 00:26:52 - DEBUG - websockets.client - = connection is CLOSING
2025-01-24 00:26:52 - DEBUG - websockets.client - < EOF
2025-01-24 00:26:52 - DEBUG - websockets.client - > EOF
2025-01-24 00:26:52 - DEBUG - websockets.client - = connection is CLOSED
2025-01-24 00:26:52 - DEBUG - websockets.client - x closing TCP connection

Then I decided to test the same thing through Google aistudio. Got the same result. The connection is terminated.
Moreover, when the model executes any other code, everything seems to be fine.

Steps to reproduce

  1. Ask the live model to draw any graph using random values
@rkdlight rkdlight added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jan 23, 2025
@sasha-gitg sasha-gitg self-assigned this Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants