Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

V1 Developer API - repeated response? #761

Answered by acheong08
jjmpsp asked this question in Q&A
Discussion options

You must be logged in to vote

while True:
prompt = get_input("\nYou:\n")
if prompt.startswith("!"):
if handle_commands(prompt):
continue
print("Chatbot: ")
prev_text = ""
for data in chatbot.ask(
prompt,
):
message = data["message"][len(prev_text) :]
print(message, end="", flush=True)
prev_text = data["message"]
print()
# print(message["message"])

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jjmpsp
Comment options

Answer selected by jjmpsp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants