diff --git a/README.md b/README.md
index e64f0ee37..5853363ad 100644
--- a/README.md
+++ b/README.md
@@ -10,13 +10,12 @@ Place order, inquire your balance and more through plugins.
Easily deploy via Docker on self-hosted platform or Paas.
-
+
-
-
-
-
-
+
+
+
+
diff --git a/tt/bot.py b/tt/bot.py
index 76008ffd7..0ac9548f3 100644
--- a/tt/bot.py
+++ b/tt/bot.py
@@ -61,4 +61,3 @@ async def webhook(request: Request):
host=settings.host,
port=int(settings.port),
log_level="critical")
-
diff --git a/tt/config.py b/tt/config.py
index 3a5bab4eb..8a74aa899 100644
--- a/tt/config.py
+++ b/tt/config.py
@@ -72,11 +72,12 @@ def loguru_setup():
loguru_logger.remove()
# log.configure(**config)
log_filters = {
- "discord": "INFO",
- "telethon": "INFO",
- "web3": "INFO",
- "apprise": "INFO",
- "urllib3": "INFO",
+ "discord": "ERROR",
+ "telethon": "ERROR",
+ # "web3": "ERROR",
+ # "apprise": "ERROR",
+ # "urllib3": "ERROR",
+ "asyncz": "ERROR",
}
logging.basicConfig(handlers=[InterceptHandler()], level=0, force=True)
loguru_logger.add(
diff --git a/tt/plugins/default_plugins/llm_plugin.py b/tt/plugins/default_plugins/llm_plugin.py
index 837635dec..117384429 100644
--- a/tt/plugins/default_plugins/llm_plugin.py
+++ b/tt/plugins/default_plugins/llm_plugin.py
@@ -4,10 +4,9 @@
"""
import os
-from myllm import MyLLM
+from myllm import MyLLM, version
-
-from tt.config import logger, settings
+from tt.config import settings
from tt.plugins.plugin_manager import BasePlugin
from tt.utils import send_notification
@@ -19,7 +18,7 @@ def __init__(self):
super().__init__()
self.enabled = settings.llm_enabled
if self.enabled:
- self.version = "🦾"
+ self.version = f"MyLLM v{version}"
self.help_message = settings.llm_commands
self.llm= MyLLM()
@@ -48,6 +47,7 @@ async def handle_message(self, msg):
settings.bot_command_help: self.get_llm_help,
settings.bot_command_info: self.get_llm_info,
settings.bot_command_question: lambda: self.get_llm_run(args),
+ settings.bot_command_topic: lambda: self.get_llm_chain(args),
}
if command in command_mapping:
function = command_mapping[command]
@@ -61,13 +61,18 @@ async def get_llm_info(self):
"""info Message"""
return self.version
- async def get_llm_run(self,llm_request):
+ async def get_llm_run(self,prompt):
"""
Gets the llm prompts response
"""
- return await self.llm.talk(llm_request)
-
+ return await self.llm.talk(prompt)
+ async def get_llm_chain(self,prompt):
+ """
+ Gets the llm prompts chain response
+ """
+
+ pass
diff --git a/tt/plugins/default_plugins/www_plugin.py b/tt/plugins/default_plugins/www_plugin.py
index 7d551dde2..a533ac7c2 100644
--- a/tt/plugins/default_plugins/www_plugin.py
+++ b/tt/plugins/default_plugins/www_plugin.py
@@ -4,9 +4,8 @@
"""
import os
-from playwright.async_api import async_playwright
-
-from tt.config import logger, settings
+# from playwright.async_api import async_playwright
+from tt.config import settings
from tt.plugins.plugin_manager import BasePlugin
from tt.utils import send_notification
@@ -61,11 +60,12 @@ async def get_www_run(self):
"""
Gets the screenshot
"""
- async with async_playwright() as p:
- browser = await p.chromium.launch()
- page = await browser.new_page()
- await page.goto(settings.www_url)
- logger.debug(await page.title())
- scr = await page.screenshot()
- await browser.close()
- return scr
+ pass
+ # async with async_playwright() as p:
+ # browser = await p.chromium.launch()
+ # page = await browser.new_page()
+ # await page.goto(settings.www_url)
+ # logger.debug(await page.title())
+ # scr = await page.screenshot()
+ # await browser.close()
+ # return scr?image=Yes
diff --git a/tt/talky_settings.toml b/tt/talky_settings.toml
index 9d9281d99..717f86743 100644
--- a/tt/talky_settings.toml
+++ b/tt/talky_settings.toml
@@ -119,7 +119,7 @@ ping = "8.8.8.8"
### WWW SETTINGS ###
########################################
-www_enabled = true
+www_enabled = false
www_commands = "📷 /src\n"
bot_command_screenshot = "scr"
www_url = "https://apod.nasa.gov/apod/astropix.html"
@@ -135,9 +135,9 @@ llm_provider = "g4f.Provider.Providers.ChatgptAi"
llm_host = ""
llm_auth_token = ""
llm_default_prompt = "write a tiny story"
-llm_commands = "🦾 /qq\n"
+llm_commands = "🦾 /qq\n /tq"
bot_command_question = "qq"
-
+bot_command_topic = "tq"
########################################
### FINDMYORDER SETTINGS ###
diff --git a/tt/utils.py b/tt/utils.py
index b77ce7d89..dc01b4368 100644
--- a/tt/utils.py
+++ b/tt/utils.py
@@ -16,6 +16,15 @@
async def send_notification(msg):
"""
💬 Notification via Apprise
+
+ Args:
+ msg (str): Message
+
+ Returns:
+ None
+
+ Refer to Apprise documentation for more information
+
"""
aobj = Apprise(settings.apprise_url)
msg_format = settings.apprise_format or NotifyFormat.MARKDOWN
@@ -27,6 +36,7 @@ async def send_notification(msg):
async def run_bot():
"""
🤖 Run the chat bot & the plugins.
+
"""
listener = Listener()
plugin_manager = PluginManager()