fix: disable text gen
Some checks failed
black-action / runner / black formatter (push) Failing after 3s
Some checks failed
black-action / runner / black formatter (push) Failing after 3s
This commit is contained in:
parent
bd94823d9e
commit
a0b8fe3e15
@ -11,7 +11,7 @@ USERNAME = os.environ.get("MATRIX_USERNAME", "ai")
|
|||||||
SERVER = os.environ.get("MATRIX_SERVER", "https://matrix.projectsegfau.lt")
|
SERVER = os.environ.get("MATRIX_SERVER", "https://matrix.projectsegfau.lt")
|
||||||
PASSWORD = os.environ.get("MATRIX_PASSWORD", None)
|
PASSWORD = os.environ.get("MATRIX_PASSWORD", None)
|
||||||
|
|
||||||
ENABLE_AI_COMMAND = os.environ.get("ENABLE_AI_COMMAND", True)
|
ENABLE_AI_COMMAND = os.environ.get("ENABLE_AI_COMMAND", False)
|
||||||
ENABLE_IMAGE_COMMAND = os.environ.get("ENABLE_IMAGE_COMMAND", True)
|
ENABLE_IMAGE_COMMAND = os.environ.get("ENABLE_IMAGE_COMMAND", True)
|
||||||
ENABLE_INSPIRE_COMMAND = os.environ.get("ENABLE_INSPIRE_COMMAND", True)
|
ENABLE_INSPIRE_COMMAND = os.environ.get("ENABLE_INSPIRE_COMMAND", True)
|
||||||
|
|
||||||
@ -209,41 +209,26 @@ def run():
|
|||||||
styles = ", ".join([style.name for style in Style])
|
styles = ", ".join([style.name for style in Style])
|
||||||
ratios = ", ".join([ratio.name for ratio in Ratio])
|
ratios = ", ".join([ratio.name for ratio in Ratio])
|
||||||
inspirations = "- ".join([f"{inspiration.name}={inspiration.value[0]}\n" for inspiration in Inspiration])
|
inspirations = "- ".join([f"{inspiration.name}={inspiration.value[0]}\n" for inspiration in Inspiration])
|
||||||
|
# ask:
|
||||||
|
# command: {", ".join(AI_COMMAND_ALIASES)}
|
||||||
|
# description: ask gpt a question
|
||||||
bot_help_message = f"""
|
bot_help_message = f"""
|
||||||
Help Message:
|
# Help of `@ai:psf.lt`
|
||||||
prefix: {PREFIX}
|
|
||||||
commands:
|
|
||||||
help:
|
|
||||||
command: help, ?, h
|
|
||||||
description: display help command
|
|
||||||
ask:
|
|
||||||
command: {", ".join(AI_COMMAND_ALIASES)}
|
|
||||||
description: ask gpt a question
|
|
||||||
img:
|
|
||||||
command: {", ".join(IMAGE_COMMAND_ALIASES)}
|
|
||||||
description: generate an image from a prompt
|
|
||||||
options:
|
|
||||||
neg:
|
|
||||||
description: negative prompt
|
|
||||||
example: neg=low
|
|
||||||
style:
|
|
||||||
description: style of image
|
|
||||||
example: style=IMAGINE_V3
|
|
||||||
values: {styles}
|
|
||||||
ratio:
|
|
||||||
description: ratio of image
|
|
||||||
example: ratio=RATIO_1X1
|
|
||||||
values: {ratios}
|
|
||||||
inspire:
|
|
||||||
command: {", ".join(INSPIRE_COMMAND_ALIASES)}
|
|
||||||
description: generate an image from an inspiration
|
|
||||||
options:
|
|
||||||
inspiration:
|
|
||||||
description: inspiration of image
|
|
||||||
example: INSPIRATION_01
|
|
||||||
values: {inspirations}
|
|
||||||
|
|
||||||
"""
|
- `!help`, `!?`, `!h`: display help command
|
||||||
|
- `{"`, `".join(IMAGE_COMMAND_ALIASES)}`: generate an image from a prompt
|
||||||
|
options:
|
||||||
|
- `neg`: negative prompt
|
||||||
|
example: `neg=low`
|
||||||
|
- `style`: style of image
|
||||||
|
example: `style=IMAGINE_V3`
|
||||||
|
values: {styles}
|
||||||
|
- `ratio`: ratio of image
|
||||||
|
example: `ratio=RATIO_1X1`
|
||||||
|
values: {ratios}
|
||||||
|
|
||||||
|
For text generation, invite `@ai:psf.lt`
|
||||||
|
"""
|
||||||
match = botlib.MessageMatch(room, message, bot, PREFIX)
|
match = botlib.MessageMatch(room, message, bot, PREFIX)
|
||||||
if (
|
if (
|
||||||
match.is_not_from_this_bot()
|
match.is_not_from_this_bot()
|
||||||
|
Loading…
Reference in New Issue
Block a user