Skip to content

Commit

Permalink
more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
genekogan committed Dec 20, 2023
1 parent cf25f74 commit 28dd61f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/cogs/LogosCharacterCog.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ async def on_message(self, message: discord.Message) -> None:
credentials=self.eden_credentials,
)

print("ASISSTANT")
print(assistant)
print("CONCEPT")
print(concept)

interaction = {
"character_id": self.characterId,
"session_id": str(message.author.id) + str(message.channel.id),
Expand All @@ -82,7 +87,12 @@ async def on_message(self, message: discord.Message) -> None:
print("THE INTERACTION")
print(interaction)


print(LOGOS_URL)

response = request_logos_assistant(LOGOS_URL, assistant, interaction)
print("RESPONSE")
print(response)
reply = response.get("message")[:2000]
reply_message = await message.reply(reply)

Expand Down
8 changes: 7 additions & 1 deletion src/common/logos.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,21 @@ def request_logos_assistant(api_url: str, assistant: dict, interaction: dict):
print("----")
print(assistant)
print(interaction)
print(api_url)
print("----")

print("--> 1")
print("GET KEYS")
print(assistant.keys())
print(interaction.keys())
print("--> 2")
response = requests.post(
f"{api_url}/interact",
json={
"assistant": assistant,
"interaction": interaction,
},
)
print("--> 3")
print(response.json())

return response.json()

0 comments on commit 28dd61f

Please sign in to comment.