From 289d9f7de77cb81587b7d32954699345c88311e5 Mon Sep 17 00:00:00 2001 From: Yannic Kilcher Date: Sat, 24 Dec 2022 23:59:21 +0100 Subject: [PATCH] moved bot to discord-bot --- bot/templates/teaser_assistant_reply.msg | 3 --- bot/templates/teaser_initial_prompt.msg | 3 --- {bot => discord-bot}/.gitignore | 0 {bot => discord-bot}/README.md | 0 {bot => discord-bot}/__main__.py | 3 +-- {bot => discord-bot}/api_client.py | 0 {bot => discord-bot}/bot.py | 0 {bot => discord-bot}/bot_base.py | 0 {bot => discord-bot}/bot_settings.py | 0 {bot => discord-bot}/channel_handlers.py | 0 {bot => discord-bot}/message_templates.py | 0 {bot => discord-bot}/requirements.txt | 0 {bot => discord-bot}/task_handlers.py | 0 {bot => discord-bot}/templates/boot.msg | 0 {bot => discord-bot}/templates/help.msg | 4 ++-- {bot => discord-bot}/templates/task_assistant_reply.msg | 2 +- {bot => discord-bot}/templates/task_initial_prompt.msg | 2 +- .../templates/task_rank_conversation_replies.msg | 2 +- {bot => discord-bot}/templates/task_rank_initial_prompts.msg | 2 +- {bot => discord-bot}/templates/task_rate_summary.msg | 0 {bot => discord-bot}/templates/task_summarize_story.msg | 0 {bot => discord-bot}/templates/task_user_reply.msg | 2 +- discord-bot/templates/teaser_assistant_reply.msg | 3 +++ discord-bot/templates/teaser_initial_prompt.msg | 3 +++ .../templates/teaser_rank_conversation_replies.msg | 2 +- .../templates/teaser_rank_initial_prompts.msg | 2 +- {bot => discord-bot}/templates/teaser_rate_summary.msg | 2 +- {bot => discord-bot}/templates/teaser_summarize_story.msg | 2 +- {bot => discord-bot}/templates/teaser_user_reply.msg | 2 +- {bot => discord-bot}/templates/welcome.msg | 0 {bot => discord-bot}/utils.py | 0 31 files changed, 19 insertions(+), 20 deletions(-) delete mode 100644 bot/templates/teaser_assistant_reply.msg delete mode 100644 bot/templates/teaser_initial_prompt.msg rename {bot => discord-bot}/.gitignore (100%) rename {bot => discord-bot}/README.md (100%) rename {bot => discord-bot}/__main__.py (99%) rename {bot => discord-bot}/api_client.py (100%) rename {bot => discord-bot}/bot.py (100%) rename {bot => discord-bot}/bot_base.py (100%) rename {bot => discord-bot}/bot_settings.py (100%) rename {bot => discord-bot}/channel_handlers.py (100%) rename {bot => discord-bot}/message_templates.py (100%) rename {bot => discord-bot}/requirements.txt (100%) rename {bot => discord-bot}/task_handlers.py (100%) rename {bot => discord-bot}/templates/boot.msg (100%) rename {bot => discord-bot}/templates/help.msg (87%) rename {bot => discord-bot}/templates/task_assistant_reply.msg (85%) rename {bot => discord-bot}/templates/task_initial_prompt.msg (89%) rename {bot => discord-bot}/templates/task_rank_conversation_replies.msg (91%) rename {bot => discord-bot}/templates/task_rank_initial_prompts.msg (82%) rename {bot => discord-bot}/templates/task_rate_summary.msg (100%) rename {bot => discord-bot}/templates/task_summarize_story.msg (100%) rename {bot => discord-bot}/templates/task_user_reply.msg (96%) create mode 100644 discord-bot/templates/teaser_assistant_reply.msg create mode 100644 discord-bot/templates/teaser_initial_prompt.msg rename {bot => discord-bot}/templates/teaser_rank_conversation_replies.msg (70%) rename {bot => discord-bot}/templates/teaser_rank_initial_prompts.msg (71%) rename {bot => discord-bot}/templates/teaser_rate_summary.msg (70%) rename {bot => discord-bot}/templates/teaser_summarize_story.msg (70%) rename {bot => discord-bot}/templates/teaser_user_reply.msg (70%) rename {bot => discord-bot}/templates/welcome.msg (100%) rename {bot => discord-bot}/utils.py (100%) diff --git a/bot/templates/teaser_assistant_reply.msg b/bot/templates/teaser_assistant_reply.msg deleted file mode 100644 index 6975d41726..0000000000 --- a/bot/templates/teaser_assistant_reply.msg +++ /dev/null @@ -1,3 +0,0 @@ -:robot: **Challenge: Assistant Reply** - -:point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). \ No newline at end of file diff --git a/bot/templates/teaser_initial_prompt.msg b/bot/templates/teaser_initial_prompt.msg deleted file mode 100644 index e9ae5c7aca..0000000000 --- a/bot/templates/teaser_initial_prompt.msg +++ /dev/null @@ -1,3 +0,0 @@ -:microphone2: **Challenge: Initial Prompt** - -:point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). \ No newline at end of file diff --git a/bot/.gitignore b/discord-bot/.gitignore similarity index 100% rename from bot/.gitignore rename to discord-bot/.gitignore diff --git a/bot/README.md b/discord-bot/README.md similarity index 100% rename from bot/README.md rename to discord-bot/README.md diff --git a/bot/__main__.py b/discord-bot/__main__.py similarity index 99% rename from bot/__main__.py rename to discord-bot/__main__.py index 0047bce7d7..9e5e29c7e0 100644 --- a/bot/__main__.py +++ b/discord-bot/__main__.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- -from bot_settings import settings - from bot import OpenAssistantBot +from bot_settings import settings # invite bot url: https://discord.com/api/oauth2/authorize?client_id=1054078345542910022&permissions=1634235579456&scope=bot diff --git a/bot/api_client.py b/discord-bot/api_client.py similarity index 100% rename from bot/api_client.py rename to discord-bot/api_client.py diff --git a/bot/bot.py b/discord-bot/bot.py similarity index 100% rename from bot/bot.py rename to discord-bot/bot.py diff --git a/bot/bot_base.py b/discord-bot/bot_base.py similarity index 100% rename from bot/bot_base.py rename to discord-bot/bot_base.py diff --git a/bot/bot_settings.py b/discord-bot/bot_settings.py similarity index 100% rename from bot/bot_settings.py rename to discord-bot/bot_settings.py diff --git a/bot/channel_handlers.py b/discord-bot/channel_handlers.py similarity index 100% rename from bot/channel_handlers.py rename to discord-bot/channel_handlers.py diff --git a/bot/message_templates.py b/discord-bot/message_templates.py similarity index 100% rename from bot/message_templates.py rename to discord-bot/message_templates.py diff --git a/bot/requirements.txt b/discord-bot/requirements.txt similarity index 100% rename from bot/requirements.txt rename to discord-bot/requirements.txt diff --git a/bot/task_handlers.py b/discord-bot/task_handlers.py similarity index 100% rename from bot/task_handlers.py rename to discord-bot/task_handlers.py diff --git a/bot/templates/boot.msg b/discord-bot/templates/boot.msg similarity index 100% rename from bot/templates/boot.msg rename to discord-bot/templates/boot.msg diff --git a/bot/templates/help.msg b/discord-bot/templates/help.msg similarity index 87% rename from bot/templates/help.msg rename to discord-bot/templates/help.msg index ca033c476a..3fbfb50d38 100644 --- a/bot/templates/help.msg +++ b/discord-bot/templates/help.msg @@ -10,6 +10,6 @@ Commands for bot owners: `!sync` `!sync.guild` -`!sync.copy_global` +`!sync.copy_global` `!sync.clear_guild` -{% endif %} \ No newline at end of file +{% endif %} diff --git a/bot/templates/task_assistant_reply.msg b/discord-bot/templates/task_assistant_reply.msg similarity index 85% rename from bot/templates/task_assistant_reply.msg rename to discord-bot/templates/task_assistant_reply.msg index 3dfe84a3db..b7b8abef07 100644 --- a/bot/templates/task_assistant_reply.msg +++ b/discord-bot/templates/task_assistant_reply.msg @@ -9,4 +9,4 @@ Here is the conversation so far: **{{ message.text }}**" {% endif %} {% endfor %} -:robot: Assistant: { human, pls help me! ... } \ No newline at end of file +:robot: Assistant: { human, pls help me! ... } diff --git a/bot/templates/task_initial_prompt.msg b/discord-bot/templates/task_initial_prompt.msg similarity index 89% rename from bot/templates/task_initial_prompt.msg rename to discord-bot/templates/task_initial_prompt.msg index 47cf0f4527..fae963c21e 100644 --- a/bot/templates/task_initial_prompt.msg +++ b/discord-bot/templates/task_initial_prompt.msg @@ -1,4 +1,4 @@ Please provide an initial prompt to the assistant. {% if task.hint is not none %} Hint: {{task.hint}} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/bot/templates/task_rank_conversation_replies.msg b/discord-bot/templates/task_rank_conversation_replies.msg similarity index 91% rename from bot/templates/task_rank_conversation_replies.msg rename to discord-bot/templates/task_rank_conversation_replies.msg index c0c8bc8078..c2864e9f06 100644 --- a/bot/templates/task_rank_conversation_replies.msg +++ b/discord-bot/templates/task_rank_conversation_replies.msg @@ -10,4 +10,4 @@ Rank the following replies: {% for reply in task.replies %} {{loop.index}}: {{reply}}{% endfor %} -:scroll: Reply with the numbers of best to worst prompts separated by commas (example: "4,1,3,2"). \ No newline at end of file +:scroll: Reply with the numbers of best to worst prompts separated by commas (example: "4,1,3,2"). diff --git a/bot/templates/task_rank_initial_prompts.msg b/discord-bot/templates/task_rank_initial_prompts.msg similarity index 82% rename from bot/templates/task_rank_initial_prompts.msg rename to discord-bot/templates/task_rank_initial_prompts.msg index 5a75cbd157..3f84f24e29 100644 --- a/bot/templates/task_rank_initial_prompts.msg +++ b/discord-bot/templates/task_rank_initial_prompts.msg @@ -2,4 +2,4 @@ Rank the following prompts: {% for prompt in task.prompts %} {{loop.index}}: {{prompt}}{% endfor %} -:scroll: Reply with the numbers of best to worst prompts separated by commas (example: "4,1,3,2"). \ No newline at end of file +:scroll: Reply with the numbers of best to worst prompts separated by commas (example: "4,1,3,2"). diff --git a/bot/templates/task_rate_summary.msg b/discord-bot/templates/task_rate_summary.msg similarity index 100% rename from bot/templates/task_rate_summary.msg rename to discord-bot/templates/task_rate_summary.msg diff --git a/bot/templates/task_summarize_story.msg b/discord-bot/templates/task_summarize_story.msg similarity index 100% rename from bot/templates/task_summarize_story.msg rename to discord-bot/templates/task_summarize_story.msg diff --git a/bot/templates/task_user_reply.msg b/discord-bot/templates/task_user_reply.msg similarity index 96% rename from bot/templates/task_user_reply.msg rename to discord-bot/templates/task_user_reply.msg index c247daa5c6..7c0a047b60 100644 --- a/bot/templates/task_user_reply.msg +++ b/discord-bot/templates/task_user_reply.msg @@ -9,4 +9,4 @@ Here is the conversation so far: {% endif %}{% endfor %} {% if task.hint %} Hint: {{ task.hint }} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/discord-bot/templates/teaser_assistant_reply.msg b/discord-bot/templates/teaser_assistant_reply.msg new file mode 100644 index 0000000000..f86baa3c56 --- /dev/null +++ b/discord-bot/templates/teaser_assistant_reply.msg @@ -0,0 +1,3 @@ +:robot: **Challenge: Assistant Reply** + +:point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). diff --git a/discord-bot/templates/teaser_initial_prompt.msg b/discord-bot/templates/teaser_initial_prompt.msg new file mode 100644 index 0000000000..7aad81b447 --- /dev/null +++ b/discord-bot/templates/teaser_initial_prompt.msg @@ -0,0 +1,3 @@ +:microphone2: **Challenge: Initial Prompt** + +:point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). diff --git a/bot/templates/teaser_rank_conversation_replies.msg b/discord-bot/templates/teaser_rank_conversation_replies.msg similarity index 70% rename from bot/templates/teaser_rank_conversation_replies.msg rename to discord-bot/templates/teaser_rank_conversation_replies.msg index 744f7a76e1..366d86e5c9 100644 --- a/bot/templates/teaser_rank_conversation_replies.msg +++ b/discord-bot/templates/teaser_rank_conversation_replies.msg @@ -1,3 +1,3 @@ :bar_chart: **Challenge: Rank Replies** -:point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). \ No newline at end of file +:point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). diff --git a/bot/templates/teaser_rank_initial_prompts.msg b/discord-bot/templates/teaser_rank_initial_prompts.msg similarity index 71% rename from bot/templates/teaser_rank_initial_prompts.msg rename to discord-bot/templates/teaser_rank_initial_prompts.msg index 07399f5638..09f04ffa88 100644 --- a/bot/templates/teaser_rank_initial_prompts.msg +++ b/discord-bot/templates/teaser_rank_initial_prompts.msg @@ -1,3 +1,3 @@ :bar_chart: **Challenge: Rank Initial Prompts** -:point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). \ No newline at end of file +:point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). diff --git a/bot/templates/teaser_rate_summary.msg b/discord-bot/templates/teaser_rate_summary.msg similarity index 70% rename from bot/templates/teaser_rate_summary.msg rename to discord-bot/templates/teaser_rate_summary.msg index 41357b0648..284aae2609 100644 --- a/bot/templates/teaser_rate_summary.msg +++ b/discord-bot/templates/teaser_rate_summary.msg @@ -1,3 +1,3 @@ :ballot_box: **Challenge: Rate Summary** -:point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). \ No newline at end of file +:point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). diff --git a/bot/templates/teaser_summarize_story.msg b/discord-bot/templates/teaser_summarize_story.msg similarity index 70% rename from bot/templates/teaser_summarize_story.msg rename to discord-bot/templates/teaser_summarize_story.msg index 6e5ee5e558..52d4646262 100644 --- a/bot/templates/teaser_summarize_story.msg +++ b/discord-bot/templates/teaser_summarize_story.msg @@ -1,3 +1,3 @@ :books: **Challenge: Summarize Story** -:point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). \ No newline at end of file +:point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). diff --git a/bot/templates/teaser_user_reply.msg b/discord-bot/templates/teaser_user_reply.msg similarity index 70% rename from bot/templates/teaser_user_reply.msg rename to discord-bot/templates/teaser_user_reply.msg index 47ec8a2d4f..318272527f 100644 --- a/bot/templates/teaser_user_reply.msg +++ b/discord-bot/templates/teaser_user_reply.msg @@ -1,3 +1,3 @@ :person_red_hair: **Challenge: User Reply** -:point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). \ No newline at end of file +:point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). diff --git a/bot/templates/welcome.msg b/discord-bot/templates/welcome.msg similarity index 100% rename from bot/templates/welcome.msg rename to discord-bot/templates/welcome.msg diff --git a/bot/utils.py b/discord-bot/utils.py similarity index 100% rename from bot/utils.py rename to discord-bot/utils.py