{"id":13754086,"url":"https://github.com/daveebbelaar/langchain-experiments","last_synced_at":"2025-04-08T11:09:39.869Z","repository":{"id":158580742,"uuid":"630487790","full_name":"daveebbelaar/langchain-experiments","owner":"daveebbelaar","description":"Building Apps with LLMs","archived":false,"fork":false,"pushed_at":"2024-02-11T11:23:23.000Z","size":5816,"stargazers_count":1014,"open_issues_count":6,"forks_count":621,"subscribers_count":44,"default_branch":"main","last_synced_at":"2025-04-01T09:33:20.312Z","etag":null,"topics":["ai","langchain","langchain-python","python","slack-bot"],"latest_commit_sha":null,"homepage":"https://datalumina.com","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daveebbelaar.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":"2023-04-20T13:42:17.000Z","updated_at":"2025-03-31T11:55:12.000Z","dependencies_parsed_at":"2023-12-21T15:34:00.809Z","dependency_job_id":"5524c15b-1901-4aa9-b3e0-2bf16c520037","html_url":"https://github.com/daveebbelaar/langchain-experiments","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daveebbelaar%2Flangchain-experiments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daveebbelaar%2Flangchain-experiments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daveebbelaar%2Flangchain-experiments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daveebbelaar%2Flangchain-experiments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daveebbelaar","download_url":"https://codeload.github.com/daveebbelaar/langchain-experiments/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247829498,"owners_count":21002996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ai","langchain","langchain-python","python","slack-bot"],"created_at":"2024-08-03T09:01:39.295Z","updated_at":"2025-04-08T11:09:39.847Z","avatar_url":"https://github.com/daveebbelaar.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook","A01_文本生成_文本对话"],"sub_categories":["大语言对话模型及数据"],"readme":"# LangChain Experiments\n\nThis repository focuses on experimenting with the LangChain library for building powerful applications with large language models (LLMs). By leveraging state-of-the-art language models like OpenAI's GPT-3.5 Turbo (and soon GPT-4), this project showcases how to create a searchable database from a YouTube video transcript, perform similarity search queries using the FAISS library, and respond to user questions with relevant and precise information.\n\nLangChain is a comprehensive framework designed for developing applications powered by language models. It goes beyond merely calling an LLM via an API, as the most advanced and differentiated applications are also data-aware and agentic, enabling language models to connect with other data sources and interact with their environment. The LangChain framework is specifically built to address these principles.\n\n## LangChain\n\nThe Python-specific portion of LangChain's documentation covers several main modules, each providing examples, how-to guides, reference docs, and conceptual guides. These modules include:\n\n1. Models: Various model types and model integrations supported by LangChain.\n3. Prompts: Prompt management, optimization, and serialization.\n3. Memory: State persistence between chain or agent calls, including a standard memory interface, memory implementations, and examples of chains and agents utilizing memory.\n4. Indexes: Combining LLMs with custom text data to enhance their capabilities.\n5. Chains: Sequences of calls, either to an LLM or a different utility, with a standard interface, integrations, and end-to-end chain examples.\n6. Agents: LLMs that make decisions about actions, observe the results, and repeat the process until completion, with a standard interface, agent selection, and end-to-end agent examples.\n\n## Use Cases\nWith LangChain, developers can create various applications, such as customer support chatbots, automated content generators, data analysis tools, and intelligent search engines. These applications can help businesses streamline their workflows, reduce manual labor, and improve customer experiences.\n\n## Service\nBy selling LangChain-based applications as a service to businesses, you can provide tailored solutions to meet their specific needs. For instance, companies can benefit from customizable chatbots that handle customer inquiries, personalized content creation tools for marketing, or internal data analysis systems that harness the power of LLMs to extract valuable insights. The possibilities are vast, and LangChain's flexible framework makes it the ideal choice for developing and deploying advanced language model applications in diverse industries.\n\n## Requirements\n\n- [Python 3.6 or higher](https://www.python.org/downloads/)\n- [LangChain library](https://python.langchain.com/en/latest/index.html)\n- [OpenAI API key](https://platform.openai.com/)\n- [SerpAPI API Key](https://serpapi.com/)\n\n## OpenAI API Models\nThe OpenAI API is powered by a diverse set of [models](https://platform.openai.com/docs/models) with different capabilities and price points. You can also make limited customizations to our original base models for your specific use case with fine-tuning.\n\n## Installation\n\n#### 1. Clone the repository\n\n```bash\ngit clone https://github.com/daveebbelaar/langchain-experiments.git\n```\n\n#### 2. Create a Python environment\n\nPython 3.6 or higher using `venv` or `conda`. Using `venv`:\n\n``` bash\ncd langchain-experiments\npython3 -m venv env\nsource env/bin/activate\n```\n\nUsing `conda`:\n``` bash\ncd langchain-experiments\nconda create -n langchain-env python=3.8\nconda activate langchain-env\n```\n\n#### 3. Install the required dependencies\n``` bash\npip install -r requirements.txt\n```\n\n#### 4. Set up the keys in a .env file\n\nFirst, create a `.env` file in the root directory of the project. Inside the file, add your OpenAI API key:\n\n```makefile\nOPENAI_API_KEY=\"your_api_key_here\"\n```\n\nSave the file and close it. In your Python script or Jupyter notebook, load the `.env` file using the following code:\n```python\nfrom dotenv import load_dotenv, find_dotenv\nload_dotenv(find_dotenv())\n```\n\nBy using the right naming convention for the environment variable, you don't have to manually store the key in a separate variable and pass it to the function. The library or package that requires the API key will automatically recognize the `OPENAI_API_KEY` environment variable and use its value.\n\nWhen needed, you can access the `OPENAI_API_KEY` as an environment variable:\n```python\nimport os\napi_key = os.environ['OPENAI_API_KEY']\n```\n\nNow your Python environment is set up, and you can proceed with running the experiments.\n\n## Datalumina\n\nThis document is provided to you by Datalumina. We help data analysts, engineers, and scientists launch and scale a successful freelance business — $100k+ /year, fun projects, happy clients. If you want to learn more about what we do, you can visit our [website](https://www.datalumina.io/) and subscribe to our [newsletter](https://www.datalumina.io/newsletter). Feel free to share this document with your data friends and colleagues.\n\n## Tutorials\nFor video tutorials on how to use the LangChain library and run experiments, visit the YouTube channel: [youtube.com/@daveebbelaar](https://youtube.com/@daveebbelaar)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaveebbelaar%2Flangchain-experiments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaveebbelaar%2Flangchain-experiments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaveebbelaar%2Flangchain-experiments/lists"}