play.vercel.ai

This commit is contained in:
t.me/xtekky
2023-04-26 10:41:24 +01:00
parent 0def87377b
commit d60d6fa355
4 changed files with 30 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
import phind
# set cf_clearance cookie ( not needed at the moment)
phind.cf_clearance = ''
phind.cf_clearance = 'MDzwnr3ZWk_ap8u.iwwMR5F3WccfOkhUy_zGNDpcF3s-1682497341-0-160'
phind.user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36'
prompt = 'hello world'

32
testing/you_test.py Normal file
View File

@@ -0,0 +1,32 @@
import you
# simple request with links and details
response = you.Completion.create(
prompt = "hello world",
detailed = True,
includelinks = True)
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"]})