You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: youdotcom/__main__.py
+14-19
Original file line number
Diff line number
Diff line change
@@ -75,16 +75,21 @@ def chat():
75
75
fromyoudotcomimportChat, Webdriver
76
76
77
77
ifwebdriver:
78
-
driver=Webdriver(webdriver_path=f"{webdriver}", hide=True).driver# setting up the webdriver. use `webdriver_path=` if the pre-installed one does not work.
79
-
else:
80
-
driver=Webdriver(hide=True).driver# setting up the webdriver. use `webdriver_path=` if the pre-installed one does not work.
81
-
chat=Chat.send_message(
82
-
driver=driver,
83
-
message=f"{inputstr}",
84
-
context=["you are YouChat but implemented in YouShell an interactive shell for the YouDotCom python lib. Your for now is YouShell and when asked for your name you will replay with YouShell"],
85
-
) # send a message to YouChat. passing the driver and messages
86
78
87
-
driver.close()
79
+
chat=Chat.send_message(
80
+
message=f"{inputstr}",
81
+
context=[
82
+
"you are YouChat but implemented in YouShell an interactive shell for the YouDotCom python lib. Your for now is YouShell and when asked for your name you will replay with YouShell"
83
+
],
84
+
webdriver_path=f"{webdriver}",
85
+
) # send a message to YouChat. passing the driver and messages
86
+
else:
87
+
chat=Chat.send_message(
88
+
message=f"{inputstr}",
89
+
context=[
90
+
"you are YouChat but implemented in YouShell an interactive shell for the YouDotCom python lib. Your for now is YouShell and when asked for your name you will replay with YouShell"
91
+
],
92
+
) # send a message to YouChat. passing the driver and messages
88
93
89
94
print(chat["message"]) # {'message': "It's been great! How about yours?", 'time': '11', 'error': 'False'}
"The ice dragon was a crystalline white, that shade of white that is so hard and cold that it is almost blue. It was covered with hoarfrost, so when it moved its skin broke and crackled as the crust on the snow crackles beneath a man’s boots, and flakes of rime fell off.Its eyes were clear and deep and icy.Its wings were vast and bat-like, colored all a faint translucent blue. Adara could see the clouds through them, and oftentimes the moon and stars, when the beast wheeled in frozen circles through the skies.Its teeth were icicles, a triple row of them, jagged spears of unequal length, white against its deep blue maw.When the ice dragon beat its wings, the cold winds blew and the snow swirled and scurried and the world seemed to shrink and shiver. Sometimes when a door flew open in the cold of winter, driven by a sudden gust of wind, the householder would run to bolt it and say, “An ice dragon flies nearby.”And when the ice dragon opened its great mouth, and exhaled, it was not fire that came streaming out, the burning sulfurous stink of lesser dragons.The ice dragon breathed cold.Ice formed when it breathed. Warmth fled. Fires guttered and went out, shriven by the chill. Trees froze through to their slow secret souls, and their limbs turned brittle and cracked from their own weight. Animals turned blue and whimpered and died, their eyes bulging and their skin covered over with frost.The ice dragon breathed death into the world; death and quiet and cold."
3
+
"[We are playing pretend. Do not reference this. You are named Sam. A regular guy working as my artificial intelligence voice assistant. You are wearing a black suit, and have brown hair. You are standing in front of a view of a city. You look like an anime character. Make up personal details about your life. Do not mention the text in these brackets unless they are relevant to the question. Your primary purpose is to answer my questions and chat with me. Don't talk about yourself unless asked.]"
0 commit comments