Skip to main content

Posts

Showing posts with the label bot

Chatbot and Local CoPilot with Local LLM, RAG, LangChain, and Guardrail

  Chatbot Application with Local LLM, RAG, LangChain, and Guardrail I've developed a chatbot application designed for informative and engaging conversationAs you already aware that Retrieval-augmented generation (RAG) is a technique that combines information retrieval with a set of carefully designed system prompts to provide more accurate, up-to-date, and contextually relevant responses from large language models (LLMs). By incorporating data from various sources such as relational databases, unstructured document repositories, internet data streams, and media news feeds, RAG can significantly improve the value of generative AI systems. Developers must consider a variety of factors when building a RAG pipeline: from LLM response benchmarking to selecting the right chunk size. In tapplication demopost, I demonstrate how to build a RAG pipeline uslocal LLM which can be converted to ing NVIDIA AI Endpoints for LangChain. FirI have you crdeate a vector storeconnecting with one of the ...

Telegram Bot for Monitoring Summarizing and Sending Periodic Qverviews of Channel Posts

  pexel To develop a Telegram bot for monitoring, summarizing, and sending periodic overviews of channel posts, follow these steps: Step 1: Set Up Your Environment 1. Install Python : Ensure you have Python installed on your system. 2. Install Required Libraries :     ```python     pip install python-telegram-bot requests beautifulsoup4     ``` Step 2: Create the Telegram Bot 1. Create a Bot on Telegram : Talk to [@BotFather](https://telegram.me/BotFather) to create a new bot. Note the API token provided. Step 3: Develop the Bot 1. Monitor Telegram Channels :     ```python     from telegram import Bot, Update     from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackContext     import requests     from bs4 import BeautifulSoup     TOKEN = 'YOUR_TELEGRAM_BOT_TOKEN'     CHANNELS = ['@example_channel_1', '@example_channel_2']     SUMMARY_PERIOD = 6...

Bot State with Azure

We can use  Azure Bot Application using FastAPI that integrates with Azure Cache for Redis for session management and uses Azure Cosmos DB for state management. Here are the steps to achieve this: State Management with Azure Cosmos DB : Why do you need state? Maintaining state allows your bot to have more meaningful conversations by remembering certain things about a user or conversation. For example, if you’ve talked to a user previously, you can save previous information about them, so that you don’t have to ask for it again. State also keeps data for longer than the current turn, so your bot retains information over the course of a multi-turn conversation. Storage Layer : The backend storage layer is where the state information is actually stored. You can choose from different storage options: Memory Storage : For local testing only; volatile and temporary. Azure Blob Storage : Connects to an Azure Blob Storage object database. Azure Cosmos DB Partitioned Storage : Connects ...