pyBegin / projects / gpt-and-langchain
🐍

OpenAI and Langchain

+ About + Getting Started

52 lines🖥 Desktop only

OpenAI and Langchain

Table of Contents

About

Is LangChain using OpenAI? Generative AI Applications with LangChain and OpenAI API LangChain offers an OpenAI chat interface to call the model APIs into your application and create a question/answer pipeline that answers users' queries based on given context or input documents. It basically performs a vectorized search to find the most similar answer to the question

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

.\.venv\Scripts\activate
pip  install -r requirements.txt

API Documentation

Get API KEY from Telegram Bot

Get API KEY from OPenAI

Get API KEY from Notion Database

Get API KEY from Serapi

BOT_TOKEN= 'Telegram Bot Token'
OPENAI_API_KEY = 'API Key'
NOTION_TOKEN = 'Notion Token'
DATABASE_ID = 'Notion Database ID'
SERPAPI_API_KEY = 'SERP API Key'

Runnning in local Host

py telegram-bot.py

Pyodide-runnable

No — it runs a Telegram bot and calls the OpenAI, Notion, and SerpAPI services over the network, none of which is available in a browser sandbox.