1
0
Fork 0
GPT4FREE/you_test.py

32 lines
572 B
Python
Raw Normal View History

2023-04-09 23:03:55 +00:00
import you
# simple request with links and details
response = you.Completion.create(
prompt = "hello world",
detailed = True,
2023-04-25 17:40:17 +00:00
includelinks = True)
2023-04-09 23:03:55 +00:00
print(response)
# {
# "response": "...",
# "links": [...],
# "extra": {...},
# "slots": {...}
# }
# }
#chatbot
chat = []
while True:
prompt = input("You: ")
response = you.Completion.create(
prompt = prompt,
chat = chat)
print("Bot:", response["response"])
chat.append({"question": prompt, "answer": response["response"]})