text2text
text2text copied to clipboard
qg not working 2024
@artitw
Please Help?
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?
Working! Thank you so much.