Spaces:
Runtime error
Runtime error
starsnatched
commited on
Commit
·
834003a
1
Parent(s):
4eed6cb
Update Discord bot intents to use all available intents and modify chat stream query in run.py
Browse files- bot/discord_bot.py +1 -3
- run.py +2 -2
bot/discord_bot.py
CHANGED
@@ -16,9 +16,7 @@ _LOG = get_logger(__name__, level=logging.INFO)
|
|
16 |
|
17 |
|
18 |
def _create_bot() -> commands.Bot:
|
19 |
-
intents = discord.Intents.
|
20 |
-
intents.messages = True
|
21 |
-
intents.message_content = True
|
22 |
return commands.Bot(command_prefix="!", intents=intents)
|
23 |
|
24 |
|
|
|
16 |
|
17 |
|
18 |
def _create_bot() -> commands.Bot:
|
19 |
+
intents = discord.Intents.all()
|
|
|
|
|
20 |
return commands.Bot(command_prefix="!", intents=intents)
|
21 |
|
22 |
|
run.py
CHANGED
@@ -7,10 +7,10 @@ from src.chat import ChatSession
|
|
7 |
|
8 |
async def _main() -> None:
|
9 |
async with ChatSession(user="demo_user", session="demo_session") as chat:
|
10 |
-
doc_path = chat.upload_document("test.txt")
|
11 |
# print(f"Document uploaded to VM at: {doc_path}")
|
12 |
# answer = await chat.chat(f"Remove all contents of test.txt and add the text 'Hello, World!' to it.")
|
13 |
-
async for resp in chat.chat_stream("What is in
|
14 |
print("\n>>>", resp)
|
15 |
|
16 |
|
|
|
7 |
|
8 |
async def _main() -> None:
|
9 |
async with ChatSession(user="demo_user", session="demo_session") as chat:
|
10 |
+
# doc_path = chat.upload_document("test.txt")
|
11 |
# print(f"Document uploaded to VM at: {doc_path}")
|
12 |
# answer = await chat.chat(f"Remove all contents of test.txt and add the text 'Hello, World!' to it.")
|
13 |
+
async for resp in chat.chat_stream("What is in test.txt file?"):
|
14 |
print("\n>>>", resp)
|
15 |
|
16 |
|