Skip to content

Vrundali-R/langchain-chat-models

Repository files navigation

LangChain Chat Models

A clean and modular collection of LangChain chat model integrations using multiple LLM providers including OpenAI, Google Gemini, Anthropic Claude, and Hugging Face.

Tech Stack

  • Python
  • LangChain
  • OpenAI API
  • Google Gemini API
  • Anthropic API
  • Hugging Face
  • Transformers
  • python-dotenv

Project Structure

langchain-chat-models/
│
├── models/
│   ├── openai_chat_model.py
│   ├── gemini_chat_model.py
│   ├── anthropic_chat_model.py
│   ├── huggingface_endpoint.py
│   └── huggingface_pipeline.py
│
├── screenshots/
├── .env.example
├── .gitignore
├── requirements.txt
└── README.md

Features

  • Multi-provider LLM integration
  • API-based and local model execution
  • LangChain chat model abstraction
  • Environment variable management
  • Clean and beginner-friendly implementation

Installation

Clone the repository

git clone https://github.com/your-username/langchain-chat-models.git

Navigate to the project directory

cd langchain-chat-models

Install dependencies

pip install -r requirements.txt

Environment Variables

Create a .env file and add the following keys:

OPENAI_API_KEY=your_openai_api_key
GOOGLE_API_KEY=your_google_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key
HUGGINGFACEHUB_API_TOKEN=your_huggingface_api_token

Running the Project

Example:

python models/openai_chat_model.py

Similarly, you can run:

  • gemini_chat_model.py
  • anthropic_chat_model.py
  • huggingface_endpoint.py
  • huggingface_pipeline.py

Learning Outcomes

  • LangChain chat model integrations
  • Prompt invocation using .invoke()
  • Working with multiple LLM providers
  • Hugging Face endpoints and pipelines
  • API key and environment management

Author

Vrundali Rahangdale

About

A modular LangChain project demonstrating integrations with OpenAI, Gemini, Anthropic Claude, and Hugging Face LLMs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages