⚡️ Build Your Own chatgpt Bot|🧀 Discord/Slack/Kook/Telegram |⛓ ToolCall|🔖 Plugin Support | 🌻 out-of-box | gpt-4-turbo
A more complete conversation experience, and the problem of repeated searches has been fixed.
Full Changelog: https://github.com/LlmKira/Openaibot/compare/pypi_1.0.3...app_4.0.4
Code Interpreter from e2b.dev
Support image as input
Full Changelog: https://github.com/LlmKira/Openaibot/compare/pypi_1.0.2...pypi_1.0.2
Check the readme for more info.
from llmkira.openapi.hook import resign_hook, Hook, Trigger, run_hook
@resign_hook()
class TestHook(Hook):
trigger: Trigger = Trigger.SENDER
async def trigger_hook(self, *args, **kwargs) -> bool:
print(f"Trigger {args} {kwargs}")
return True
async def hook_run(self, *args, **kwargs):
print(f"Running {args} {kwargs}")
return args, kwargs
@resign_hook()
class TestHook2(Hook):
trigger: Trigger = Trigger.SENDER
priority: int = 1
async def trigger_hook(self, *args, **kwargs) -> bool:
print(f"Trigger {args} {kwargs}")
return True
async def hook_run(self, *args, **kwargs):
print(f"Running {args} {kwargs}")
return args, kwargs
async def run_test():
print("Before running hook")
arg, kwarg = await run_hook(Trigger.SENDER, 2, 3, a=4, b=5)
print(f"After running hook {arg} {kwarg}")
import asyncio # noqa
asyncio.run(run_test())