{"id":25531692,"url":"https://github.com/04bhavyaa/langchain-models","last_synced_at":"2026-04-28T17:35:05.104Z","repository":{"id":277865385,"uuid":"933756864","full_name":"04bhavyaa/langchain-models","owner":"04bhavyaa","description":"This project explores various LLMs and embedding models using LangChain, integrating OpenAI, Hugging Face, Google Gemini, and Anthropic. It includes chat models, document similarity search, and embeddings with cosine similarity for retrieval. The setup is simple, making it easy to experiment with LLMs and vector search. 🚀 (Big Thankyou to CampusX)","archived":false,"fork":false,"pushed_at":"2025-02-16T16:35:36.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"Main","last_synced_at":"2025-05-22T10:56:52.697Z","etag":null,"topics":["anthropic-claude","chatmodel","embedding-models","embeddings","google-generative-ai","huggingface","langchain","langchain-models","llm-model","openai-api","vectorization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/04bhavyaa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-16T16:16:32.000Z","updated_at":"2025-05-06T13:36:05.000Z","dependencies_parsed_at":"2025-02-16T17:51:25.057Z","dependency_job_id":null,"html_url":"https://github.com/04bhavyaa/langchain-models","commit_stats":null,"previous_names":["04bhavyaa/langchain-models"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/04bhavyaa/langchain-models","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/04bhavyaa%2Flangchain-models","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/04bhavyaa%2Flangchain-models/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/04bhavyaa%2Flangchain-models/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/04bhavyaa%2Flangchain-models/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/04bhavyaa","download_url":"https://codeload.github.com/04bhavyaa/langchain-models/tar.gz/refs/heads/Main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/04bhavyaa%2Flangchain-models/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32392300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic-claude","chatmodel","embedding-models","embeddings","google-generative-ai","huggingface","langchain","langchain-models","llm-model","openai-api","vectorization"],"created_at":"2025-02-20T01:19:33.374Z","updated_at":"2026-04-28T17:35:05.088Z","avatar_url":"https://github.com/04bhavyaa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LangChain Models\n\nThis repository contains implementations of various **Language Models (LLMs)**, **Chat Models** and **Embedding Models** using LangChain. It demonstrates different model integrations for LLMs and embeddings, including OpenAI, Hugging Face, Google, Sentence Transformers and Anthropic.\n\n## 📂 Directory Structure\n```plaintext\n04bhavyaa-langchain-models/\n├── README.md                  # Project documentation\n├── requirements.txt           # Required dependencies\n├── LLMs/\n│   └── llm_demo.py            # Basic LLM demonstration\n├── chat-models/               # Various chat models\n│   ├── chatmodel_anthropic.py # Anthropic's Claude integration\n│   ├── chatmodel_google.py    # Google Gemini (PaLM) integration\n│   ├── chatmodel_hf_api.py    # Hugging Face API integration\n│   ├── chatmodel_hf_local.py  # Local Hugging Face LLM integration\n│   └── chatmodel_openai.py    # OpenAI ChatGPT integration\n└── embedding-models/          # Embedding models for similarity search\n    ├── document_similarity.py # Cosine similarity for document search\n    ├── embedding_hf_local.py  # Local Hugging Face embeddings\n    ├── embedding_openai_docs.py # OpenAI document embeddings\n    └── embedding_openai_query.py # OpenAI query embeddings\n```\n\n## ⚡ Tech Stack\n- **LangChain** (Core framework for chaining LLMs)\n- **OpenAI API** (ChatGPT \u0026 Embeddings)\n- **Anthropic API** (Claude models)\n- **Google Generative AI** (Gemini/PaLM models)\n- **Hugging Face** (Transformer-based LLMs \u0026 embeddings)\n- **Scikit-learn** (Cosine similarity for document search)\n- **Pandas \u0026 NumPy** (Data processing utilities)\n\n## 🧠 Theory Behind LangChain Models\n- **LLMs:** These are large-scale neural networks trained on vast text corpora. LangChain provides a structured way to interact with them.\n- **Chat Models:** Variants of LLMs optimized for dialogue, such as OpenAI's ChatGPT, Claude, and Gemini.\n- **Embedding Models:** Convert text into high-dimensional vectors to perform similarity search, useful for document retrieval and semantic search.\n\n## 🔧 Setup Instructions\n### 1. Clone the repository:\n```\ngit clone https://github.com/yourusername/04bhavyaa-langchain-models.git\ncd 04bhavyaa-langchain-models\n```\n### 2. Create and activate a virtual environment:\n```\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n```\n### 3. Install dependencies:\n```\npip install -r requirements.txt\n```\n### 4. Set Up Environment Variables\nCreate a `.env` file and add your API keys:\n```\nOPENAI_API_KEY=your_openai_api_key\nANTHROPIC_API_KEY=your_anthropic_api_key\nGOOGLE_API_KEY=your_google_api_key\nHUGGINGFACEHUB_API_TOKEN=your_huggingface_api_key\n```\n### 5. Run the Models\nExample usage for document similarity:\n```bash\npython embedding-models/document_similarity.py\n```\nSample Output:\n![image](https://github.com/user-attachments/assets/924c9bd4-bef3-4ac6-8e94-7c2034c0b42d)\n\n---\n💡 **Contributions are welcome!** Feel free to fork, open issues, or submit PRs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F04bhavyaa%2Flangchain-models","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F04bhavyaa%2Flangchain-models","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F04bhavyaa%2Flangchain-models/lists"}