Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
green flag: IRAS bot will never get annoyed at you for asking the same questions every tax season 😅 Got a tax question? Use the IRAS bot to get help any time you need. 😉
https://www.iras.gov.sg/digital-services/others/iras-bot
#chatbot#irassg
Air Canada Ordered to Honor Chatbot's Impromptu Refund Policy
Hello everybody! In a landmark decision, Air Canada has been directed by Canada's Civil Resolution Tribunal to uphold a refund policy cited by its customer service chatbot. The ruling sets a potential precedent for similar cases involving automated customer service platforms.
The saga began when Jake Moffatt sought bereavement fares following his grandmother's passing in November 2022. Engaging with Air Canada's chatbot, he was informed of a retroactive refund option for reduced bereavement rates. Despite Air Canada's insistence that the chatbot's actions were independent, the tribunal ruled in Moffatt's favor, deeming the airline accountable for the chatbot's representations.
This decision not only obligates Air Canada to refund Moffatt's fare but also underscores the significance of accuracy and accountability in automated customer interactions. As chatbots become increasingly prevalent in customer service, the ruling highlights the need for companies to ensure consistency and reliability in their AI-driven communications.
#AirCanada#Chatbot
🧠 Google Gemini endi eski suhbatlaringizni eslab qoladi! 💾
Endi Gemini istalgan suhbatni eslab qoladi va kerak bo‘lsa, eski suhbatlaringizga o‘zi murojaat qiladi!😱
🔹RAG tizimi ishlaydi – oldingi chatlaringizdan ma’lumotni topish va ulardan foydalanish imkoniyati!
🔹Mavzuga mos bo‘lsa, AI o‘zi eslab qoladi va sizga kerakli faktlarni taqdim etadi.
🔹Siz istalgan suhbatga murojaat qilishingiz mumkin, hatto u uzoq vaqt oldin bo‘lsa ham!
📌Bitta muhim narsa:
🛑Cheksiz xotirani faollashtirish uchunGemini Advanced obunasi kerak.
🛑Hozircha faqat Flash modeli bilan ishlaydi.
🔮OpenAI ham shunday funksiyani ishlab chiqayotganini aytgandi… Ko‘ramiz, kim birinchi bo‘ladi!🚀
#Gemini#AI#Google#Chatbot
Shhh! Close the curtain quickly!
We don't want the neighbors to see anything! 🤫👀💥
Chat and see more selfies:
📲(iOS)
📲(Android)
#stepsis#aigirlfriend#chatbot
All of your image creations, all in one place.
Introducing the new library for your ChatGPT image creations—rolling out now to all Free, Plus, and Pro users.
➖➖➖➖🔻
💎@Chatgpt_OfficialNews – Stay Updated! ⚡️
🧠 BOT: @Chatgpt_OfficialBOT
#️⃣#OpenAI#AI#GPT#ChatGPT#Chatbot
➖➖➖➖🔺