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

Error stream=True freeze screen and not response no error nothing in logs #3934

Closed
mutonby opened this issue Jun 12, 2024 · 1 comment
Closed
Assignees
Labels
api: vertex-ai Issues related to the googleapis/python-aiplatform API.

Comments

@mutonby
Copy link

mutonby commented Jun 12, 2024

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

If you are still having issues, please be sure to include as much information as possible:

Environment details

  • OS type and version: Docker with image: python:3.10.10

  • Python version: 3.10.10

  • google-cloud-aiplatform version: 1.54.1

Steps to reproduce

Run the code with stream =True and not answer, the api running freeze, I am using the same example of documentation in the sandbox works but in my api no. And with stream=False is working well

I am using docker compose,and socketio for the endpoint

Code example

responses = model.generate_content(prompt, stream=True)
    log("LOG", "Gemini responde:", responses)
    full_response = ""

    for response in responses:
        log("LOG", "Gemini response:", response.text)
        print(response.text, end="")

Stack trace

Not show logs inside of for loop is freeze forever,  only before:

[Gemini responde:]: <generator object _GenerativeModel._generate_content_streaming at 0x4025fbbf40>

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

@product-auto-label product-auto-label bot added the api: vertex-ai Issues related to the googleapis/python-aiplatform API. label Jun 12, 2024
@jaycee-li jaycee-li self-assigned this Jun 25, 2024
@jaycee-li
Copy link
Contributor

Hi @mutonby, just wanted to check which model you were using and if you're still having the issue you mentioned. I tried gemini-1.0-pro in Colab today and it's working without any problems on my end.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: vertex-ai Issues related to the googleapis/python-aiplatform API.
Projects
None yet
Development

No branches or pull requests

2 participants