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

Old Document Issues #567

Open
minomizuha opened this issue Aug 30, 2024 · 0 comments
Open

Old Document Issues #567

minomizuha opened this issue Aug 30, 2024 · 0 comments

Comments

@minomizuha
Copy link

minomizuha commented Aug 30, 2024

for event in stream:
    if event.event_type == "text-generation":
        print(event.text, end='')

Then, apparently, I will throw up an error.
It worked when I made it look like the following, but is the document still old...?
You don't have to reply, but please confirm when you have time.

if stream and hasattr(response, 'text'):
     generated_text = response.text
else:
     generated_text = "Error: The expected response was not returned. "

By any chance, if was the problem...?
Is it probably like this?

if stream and hasattr(response, 'text'):
     generated_text = response.text
else:
     generated_text = "Error: The expected response was not returned. "
print(generated_text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant