
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Асинхронный фреймворк для разработки навыков Алисы из Яндекс.Диалогов
Based on aiogram v3
Рекомендуется иметь опыт работы с asyncio перед использованием aliceio
Как получить skill_id
и подключить навык к Алисе можно прочитать тут.
from aliceio import Dispatcher, Skill
from aliceio.types import Message
from aliceio.webhook.yandex_functions import OneSkillYandexFunctionsRequestHandler
dp = Dispatcher()
skill = Skill(skill_id="...")
requests_handler = OneSkillYandexFunctionsRequestHandler(dispatcher=dp, skill=skill)
@dp.message()
async def hello(message: Message) -> str:
return f"Привет, {message.session.application.application_id}!"
async def main(event, context):
return await requests_handler(event, context)
from aiohttp import web
from aliceio import Dispatcher, Skill
from aliceio.types import Message
from aliceio.webhook.aiohttp_server import OneSkillAiohttpRequestHandler, setup_application
dp = Dispatcher()
skill = Skill(skill_id="...")
@dp.message()
async def hello(message: Message) -> str:
return f"Привет, {message.session.application.application_id}!"
def main() -> None:
app = web.Application()
requests_handler = OneSkillAiohttpRequestHandler(dispatcher=dp, skill=skill)
WEB_SERVER_HOST = "127.0.0.1"
WEB_SERVER_PORT = 80
WEBHOOK_PATH = "/alice"
requests_handler.register(app, path=WEBHOOK_PATH)
setup_application(app, dp, skill=skill)
web.run_app(app, host=WEB_SERVER_HOST, port=WEB_SERVER_PORT)
if __name__ == "__main__":
main()
Если у вас есть вопросы, вы можете задать их в Телеграм чате
Copyright © 2023-2024 K1rL3s and ZloyKobra
Этот проект использует MIT лицензию
FAQs
Asynchronous framework for Alice from Yandex Dialogs
We found that aliceio demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.