Skip to content

corticalstack/langchain-basics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 LangChain Basics

A comprehensive collection of examples and utilities for working with LangChain, a framework for building applications powered by large language models (LLMs).

📚 Description

This repository serves as a practical guide and reference for developers looking to leverage the LangChain framework. It contains numerous examples demonstrating various LangChain components and capabilities, from simple chains to complex agents and applications.

The examples cover a wide range of use cases, including:

  • Building conversational agents
  • Creating document-based question answering systems
  • Implementing memory for contextual conversations
  • Working with different output formats
  • Processing and analyzing various data sources
  • Building complete applications

✨ Features

🔧 Prerequisites

  • Python 3.8+
  • OpenAI API key (for most examples)
  • Various API keys depending on the example (Google, WolframAlpha, etc.)

🛠️ Setup

  1. Clone the repository:
git clone https://github.com/yourusername/langchain-basics.git
cd langchain-basics
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Create a .env file in the root directory with your API keys:
OPENAI_API_KEY=your_openai_api_key
GOOGLE_API_KEY=your_google_api_key
GOOGLE_CSE_ID=your_google_cse_id
WOLFRAM_ALPHA_APPID=your_wolfram_alpha_appid
ACTIVELOOP_TOKEN=your_activeloop_token
ACTIVELOOP_ORG_NAME=your_activeloop_org_name

🚀 Usage

Each Python file in the repository is a standalone example that demonstrates a specific LangChain feature or concept. To run an example, simply execute the Python file:

python simple_chain.py

For the Streamlit applications, navigate to the application directory and run:

cd chat-with-any-data
streamlit run app.py

📚 Resources

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published