Nothing Special   »   [go: up one dir, main page]

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

qg not working 2024 #44

Open
andre-macdonald opened this issue Jul 30, 2024 · 2 comments
Open

qg not working 2024 #44

andre-macdonald opened this issue Jul 30, 2024 · 2 comments

Comments

@andre-macdonald
Copy link
andre-macdonald commented Jul 30, 2024

T2T error 2nd try
@artitw
Please Help?

@artitw
Copy link
Owner
artitw commented Jul 30, 2024

We're deprecating that way in favor of

import text2text as t2t
asst = t2t.Assistant()

# Streaming example
chat_history = [
    {"role": "user",  "content": """
    Generate quiz questions for the following facts:
    (1) I will go to school today and take my math exam.
    (2) I will go to school today and take my math exam.
    (3) Tomorrow is my cousin's birthday. He will turn 24 years old.
    (4) Tomorrow is my cousin's birthday. He will turn 24 years old. (Answer is 24 years old.)
    """}
]

result = asst.chat_completion(chat_history, stream=True)
for chunk in result:
  print(chunk['message']['content'], end='', flush=True)

Can you try this and let us know if it works?

@andre-macdonald
Copy link
Author

Working! Thank you so much.

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

2 participants