Skip to content

Commit

Permalink
give bots logos
Browse files Browse the repository at this point in the history
  • Loading branch information
genekogan committed Oct 17, 2023
1 parent 204e999 commit 05cd8ef
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
20 changes: 18 additions & 2 deletions bots/eden_bot/eden_bot.py
Expand Up @@ -27,6 +27,22 @@
from . import settings




# experimental

from logos.scenarios import QAChat
from logos.sample_data.docs import get_sample_docs

docs = get_sample_docs()
print(docs)
qa = QAChat(docs)
print("QA")
print(qa)




EDEN_API_URL = "https://api.eden.art" # os.getenv("EDEN_API_URL")
EDEN_API_KEY = os.getenv("EDEN_API_KEY")
EDEN_API_SECRET = os.getenv("EDEN_API_SECRET")
Expand Down Expand Up @@ -506,13 +522,13 @@ async def on_message(self, message: discord.Message) -> None:
):
return

trigger_reply = False # is_mentioned(message, self.bot.user) and message.attachments
trigger_reply = is_mentioned(message, self.bot.user)

if trigger_reply:
ctx = await self.bot.get_context(message)
async with ctx.channel.typing():
prompt = self.message_preprocessor(message)
response = ":)"
response = await qa.query(prompt)
await message.reply(response)

except Exception as e:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Expand Up @@ -13,3 +13,4 @@ watchdog==2.1.9; python_version >= "3.6"

git+https://github.com/abraham-ai/marsbots-core.git
git+https://github.com/abraham-ai/marsbots-eden.git
git+https://github.com/edenartlab/logos.git

0 comments on commit 05cd8ef

Please sign in to comment.