id stringlengths 6 6 | text stringlengths 20 17.2k | title stringclasses 1
value |
|---|---|---|
150153 | "LangGraph comes with a simple [in-memory checkpointer](https://langchain-ai.github.io/langgraph/reference/checkpoints/#memorysaver), which we use below. See its documentation for more detail, including how to use different persistence backends (e.g., SQLite or Postgres).\n",
"\n",
"For a detailed walkthrough o... | |
150158 | "To explore different types of retrievers and retrieval strategies, visit the [retrievers](/docs/how_to#retrievers) section of the how-to guides.\n",
"\n",
"For a detailed walkthrough of LangChain's conversation memory abstractions, visit the [How to add message history (memory)](/docs/how_to/message_history) L... | |
150175 | "1. We will add similarity scores to the metadata of the corresponding \"sub-documents\" using the `similarity_search_with_score` method of the underlying vector store as above;\n",
"2. We will include a list of these sub-documents in the metadata of the retrieved parent document. This surfaces what snippets of tex... | |
150192 | {
"cells": [
{
"cell_type": "markdown",
"id": "1b79ff35-50a3-40cd-86d9-703f1f8cd2c5",
"metadata": {},
"source": [
"# How to get a RAG application to add citations\n",
"\n",
"This guide reviews methods to get a model to cite which parts of the source documents it referenced in generating its r... | |
150197 | "Another approach is to post-process our retrieved documents to compress the content, so that the source content is already minimal enough that we don't need the model to cite specific sources or spans. For example, we could break up each document into a sentence or two, embed those and keep only the most relevant ones... | |
150208 | ---
sidebar_position: 2
---
# How to install LangChain packages
The LangChain ecosystem is split into different packages, which allow you to choose exactly which pieces of
functionality to install.
## Official release
To install the main `langchain` package, run:
import Tabs from '@theme/Tabs';
import TabItem from... | |
150215 | "INFO: Processing entire page OCR with tesseract...\n",
"INFO: Processing entire page OCR with tesseract...\n",
"INFO: Processing entire page OCR with tesseract...\n",
"INFO: Processing entire page OCR with tesseract...\n",
"INFO: Processing entire page OCR with tesseract...\n",
"INFO: Pro... | |
150216 | {
"cells": [
{
"cell_type": "markdown",
"id": "c95fcd15cd52c944",
"metadata": {
"collapsed": false,
"jupyter": {
"outputs_hidden": false
}
},
"source": [
"# How to split by HTML header \n",
"## Description and motivation\n",
"\n",
"[HTMLHeaderTextSplitter](https://pyth... | |
150219 | {
"cells": [
{
"cell_type": "raw",
"id": "52976910",
"metadata": {
"vscode": {
"languageId": "raw"
}
},
"source": [
"---\n",
"keywords: [recursivecharactertextsplitter]\n",
"---"
]
},
{
"cell_type": "markdown",
"id": "a678d550",
"metadata": {},
"source": [
... | |
150220 | {
"cells": [
{
"cell_type": "raw",
"id": "38831021-76ed-48b3-9f62-d1241a68b6ad",
"metadata": {},
"source": [
"---\n",
"sidebar_position: 3\n",
"---"
]
},
{
"cell_type": "markdown",
"id": "a745f98b-c495-44f6-a882-757c38992d76",
"metadata": {},
"source": [
"# How to use o... | |
150223 | "id": "aebd704a",
"metadata": {
"execution": {
"iopub.execute_input": "2024-09-11T02:34:54.701556Z",
"iopub.status.busy": "2024-09-11T02:34:54.701465Z",
"iopub.status.idle": "2024-09-11T02:34:55.179986Z",
"shell.execute_reply": "2024-09-11T02:34:55.179640Z"
}
},
"outputs": [],
"s... | |
150226 | {
"cells": [
{
"cell_type": "markdown",
"id": "bf4061ce",
"metadata": {},
"source": [
"# Caching\n",
"\n",
"Embeddings can be stored or temporarily cached to avoid needing to recompute them.\n",
"\n",
"Caching embeddings can be done using a `CacheBackedEmbeddings`. The cache backed em... | |
150228 | {
"cells": [
{
"cell_type": "markdown",
"id": "4ef893cf-eac1-45e6-9eb6-72e9ca043200",
"metadata": {},
"source": [
"# How to stream results from your RAG application\n",
"\n",
"This guide explains how to stream results from a RAG application. It covers streaming tokens from the final output as... | |
150235 | {
"cells": [
{
"cell_type": "raw",
"id": "c47f5b2f-e14c-43e7-a0ab-d71562636624",
"metadata": {},
"source": [
"---\n",
"sidebar_position: 3\n",
"keywords: [summarize, summarization, map reduce]\n",
"---"
]
},
{
"cell_type": "markdown",
"id": "682a4f53-27db-43ef-a909-dd9ded7605... | |
150236 | "id": "dafedc2e-feeb-44bc-9f38-e55394953de5",
"metadata": {},
"outputs": [],
"source": [
"import operator\n",
"from typing import Annotated, List, Literal, TypedDict\n",
"\n",
"from langchain.chains.combine_documents.reduce import (\n",
" acollapse_docs,\n",
" split_list_of_docs,\... | |
150238 | # How to load JSON
[JSON (JavaScript Object Notation)](https://en.wikipedia.org/wiki/JSON) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other serializable values).
[JSON Lines](https://js... | |
150240 | ```python
loader = JSONLoader(
file_path=file_path,
jq_schema=".data[]",
content_key=".attributes.message",
is_content_key_jq_parsable=True,
)
data = loader.load()
```
```python
pprint(data)
```
```output
[Document(page_content='message1', metadata={'source': '/path/to/sample.json', 'seq_num': 1}... | |
150241 | ```python
pprint(data)
```
```output
[Document(page_content='Bye!', metadata={'source': 'langchain/docs/modules/indexes/document_loaders/examples/example_data/facebook_chat.json', 'seq_num': 1, 'sender_name': 'User 2', 'timestamp_ms': 1675597571851}),
Document(page_content='Oh no worries! Bye', metadata={'sou... | |
150306 | {
"cells": [
{
"cell_type": "markdown",
"id": "ed47bb62",
"metadata": {},
"source": [
"# Hugging Face\n",
"Let's load the Hugging Face Embedding class."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "16b20335-da1d-46ba-aa23-fbf3e2c6fe60",
"metadata": {},
"output... | |
150354 | {
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "278b6c63",
"metadata": {},
"source": [
"# LocalAI\n",
"\n",
"Let's load the LocalAI Embedding class. In order to use the LocalAI Embedding class, you need to have the LocalAI service hosted somewhere and configure the embedd... | |
150372 | {
"cells": [
{
"cell_type": "raw",
"id": "afaf8039",
"metadata": {},
"source": [
"---\n",
"sidebar_label: AzureOpenAI\n",
"---"
]
},
{
"cell_type": "markdown",
"id": "9a3d6f34",
"metadata": {},
"source": [
"# AzureOpenAIEmbeddings\n",
"\n",
"This will help you g... | |
150388 | "cell_type": "code",
"execution_count": null,
"metadata": {
"id": "zn_zeRGP64DJ"
},
"outputs": [],
"source": [
"%pip install --upgrade --quiet langchain faiss-cpu tiktoken langchain_community\n",
"\n",
"from operator import itemgetter\n",
"\n",
"from langchain_community.vectorsto... | |
150389 | {
"cells": [
{
"cell_type": "markdown",
"id": "1f83f273",
"metadata": {},
"source": [
"# SageMaker\n",
"\n",
"Let's load the `SageMaker Endpoints Embeddings` class. The class can be used if you host, e.g. your own Hugging Face model on SageMaker.\n",
"\n",
"For instructions on how to ... | |
150392 | {
"cells": [
{
"cell_type": "raw",
"id": "afaf8039",
"metadata": {},
"source": [
"---\n",
"sidebar_label: OpenAI\n",
"keywords: [openaiembeddings]\n",
"---"
]
},
{
"cell_type": "markdown",
"id": "9a3d6f34",
"metadata": {},
"source": [
"# OpenAIEmbeddings\n",
"\n... | |
150437 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Outline\n",
"\n",
">[Outline](https://www.getoutline.com/) is an open-source collaborative knowledge base platform designed for team information sharing.\n",
"\n",
"This notebook shows how to retrieve documents from y... | |
150438 | " Document(page_content='Quickstart\\n\\nIn this quickstart we\\'ll show you how to:\\n\\nGet setup with LangChain, LangSmith and LangServe\\n\\nUse the most basic and common components of LangChain: prompt templates, models, and output parsers\\n\\nUse LangChain Expression Language, the protocol that LangChain is buil... | |
150439 | " Document(page_content='This walkthrough showcases using an agent to implement the [ReAct](https://react-lm.github.io/) logic.\\n\\n```javascript\\nfrom langchain.agents import AgentType, initialize_agent, load_tools\\nfrom langchain_openai import OpenAI\\n```\\n\\nFirst, let\\'s load the language model we\\'re going ... | |
150447 | {
"cells": [
{
"cell_type": "markdown",
"id": "a0eb506a-f52e-4a92-9204-63233c3eb5bd",
"metadata": {},
"source": [
"# DocArray\n",
"\n",
">[DocArray](https://github.com/docarray/docarray) is a versatile, open-source tool for managing your multi-modal data. It lets you shape your data however y... | |
150454 | "question = \"Show me all the items purchased from AstroTech Solutions\"\n",
"\n",
"prompt = ChatPromptTemplate.from_template(\n",
" \"\"\"Answer the question based only on the context provided.\n",
"\n",
" Context: {context}\n",
"\n",
" Question: {question}\"\"\"\n",
")\n",
... | |
150457 | {
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "fc0db1bc",
"metadata": {},
"source": [
"# LOTR (Merger Retriever)\n",
"\n",
">`Lord of the Retrievers (LOTR)`, also known as `MergerRetriever`, takes a list of retrievers as input and merges the results of their get_relevant... | |
150460 | ---
sidebar_position: 0
sidebar_class_name: hidden
---
import {CategoryTable, IndexTable} from '@theme/FeatureTables'
# Retrievers
A [retriever](/docs/concepts/#retrievers) is an interface that returns documents given an unstructured query.
It is more general than a vector store.
A retriever does not need to be able... | |
150467 | "Document 3:\n",
"\n",
"<ref#> let� Or between equal Let’ to protect, restore law accountable why the Justice Department cameras bannedhold and restricted its officers. <\n",
"----------------------------------------------------------------------------------------------------\n",
"Document 4:\n... | |
150497 | "output_type": "execute_result"
}
],
"source": [
"dense_embedding_func = OpenAIEmbeddings()\n",
"dense_dim = len(dense_embedding_func.embed_query(texts[1]))\n",
"dense_dim"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Initialize sparse embedding function.\n",
... | |
150512 | "llm = Cohere(temperature=0)\n",
"compressor = CohereRerank(model=\"rerank-english-v3.0\")\n",
"compression_retriever = ContextualCompressionRetriever(\n",
" base_compressor=compressor, base_retriever=retriever\n",
")\n",
"\n",
"compressed_docs = compression_retriever.invoke(\n",
" \"W... | |
150547 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Milvus\n",
"\n",
">[Milvus](https://milvus.io/docs/overview.md) is a database that stores, indexes, and manages massive embedding vectors generated by deep neural networks and other machine learning (ML) models.\n",
"\n",... | |
150552 | "query='women' filter=Comparison(comparator=<Comparator.EQ: 'eq'>, attribute='director', value='Greta Gerwig') limit=None\n"
]
},
{
"data": {
"text/plain": [
"[Document(page_content='A bunch of normal-sized women are supremely wholesome and some men pine after them', metadata={'year': 201... | |
150565 | {
"cells": [
{
"cell_type": "markdown",
"id": "13afcae7",
"metadata": {},
"source": [
"# Redis\n",
"\n",
">[Redis](https://redis.com) is an open-source key-value store that can be used as a cache, message broker, database, vector database and more.\n",
"\n",
"In the notebook, we'll de... | |
150684 | {
"cells": [
{
"cell_type": "markdown",
"id": "dc23c48e",
"metadata": {},
"source": [
"# Google Serper\n",
"\n",
"This notebook goes over how to use the `Google Serper` component to search the web. First you need to sign up for a free account at [serper.dev](https://serper.dev) and get your a... | |
150741 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "4x4kQ0VcodAC"
},
"source": [
"# Exa Search"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "V1x8wEUhodAH"
},
"source": [
"Exa is a search engine fully designed for use by LLMs. Search for documents on the... | |
150775 | {
"cells": [
{
"cell_type": "markdown",
"id": "0e499e90-7a6d-4fab-8aab-31a4df417601",
"metadata": {},
"source": [
"# SQLDatabase Toolkit\n",
"\n",
"This will help you getting started with the SQL Database [toolkit](/docs/concepts/#toolkits). For detailed documentation of all `SQLDatabaseToolk... | |
150791 | "execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import getpass\n",
"import os\n",
"\n",
"from langchain import hub\n",
"from langchain.agents import AgentExecutor, create_tool_calling_agent\n",
"from langchain_openai import AzureChatOp... | |
150819 | "metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"'https://web.archive.org/web/20230428133211/https://cnn.com/world'"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# If the agent wa... | |
150832 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Human as a tool\n",
"\n",
"Human are AGI so they can certainly be used as a tool to help out AI agent \n",
"when it is confused."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"ou... | |
150853 | {
"cells": [
{
"cell_type": "markdown",
"id": "c81da886",
"metadata": {},
"source": [
"# Pandas Dataframe\n",
"\n",
"This notebook shows how to use agents to interact with a `Pandas DataFrame`. It is mostly optimized for question answering.\n",
"\n",
"**NOTE: this agent calls the `Pyt... | |
150897 | "File \u001b[0;32m~/job/integrations/langchain/libs/partners/openai/langchain_openai/chat_models/__init__.py:1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mlangchain_openai\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mchat_models\u001b[39;00m\u001b[38;5;2... | |
150919 | {
"cells": [
{
"cell_type": "markdown",
"id": "91c6a7ef",
"metadata": {},
"source": [
"# Streamlit\n",
"\n",
">[Streamlit](https://docs.streamlit.io/) is an open-source Python library that makes it easy to create and share beautiful, \n",
"custom web apps for machine learning and data sci... | |
150957 | "We can [chain](/docs/how_to/sequence/) our model with a prompt template like so:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"AIMessage(content='Ich liebe das Programmieren.', response_metadata={'id': 'item0', 'par... | |
150967 | {
"cells": [
{
"cell_type": "raw",
"id": "71b5cfca",
"metadata": {},
"source": [
"---\n",
"sidebar_label: Llama API\n",
"---"
]
},
{
"cell_type": "markdown",
"id": "90a1faf2",
"metadata": {},
"source": [
"# ChatLlamaAPI\n",
"\n",
"This notebook shows how to use ... | |
150981 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# ChatHuggingFace\n",
"\n",
"This will help you getting started with `langchain_huggingface` [chat models](/docs/concepts/#chat-models). For detailed documentation of all `ChatHuggingFace` features and configurations head to th... | |
150983 | " load_in_4bit=True,\n",
" bnb_4bit_quant_type=\"nf4\",\n",
" bnb_4bit_compute_dtype=\"float16\",\n",
" bnb_4bit_use_double_quant=True,\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"and pass it to the `HuggingFacePipeline` as a part of its `model_kw... | |
150987 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Llama.cpp\n",
"\n",
">[llama.cpp python](https://github.com/abetlen/llama-cpp-python) library is a simple Python bindings for `@ggerganov`\n",
">[llama.cpp](https://github.com/ggerganov/llama.cpp).\n",
">\n",
">Th... | |
150990 | {
"cells": [
{
"cell_type": "markdown",
"id": "e49f1e0d",
"metadata": {},
"source": [
"# JinaChat\n",
"\n",
"This notebook covers how to get started with JinaChat chat models."
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "522686de",
"metadata": {
"tags": []
... | |
150998 | {
"cells": [
{
"cell_type": "raw",
"id": "eb65deaa",
"metadata": {},
"source": [
"---\n",
"sidebar_label: vLLM Chat\n",
"---"
]
},
{
"cell_type": "markdown",
"id": "8f82e243-f4ee-44e2-b417-099b6401ae3e",
"metadata": {},
"source": [
"# vLLM Chat\n",
"\n",
"vLLM c... | |
151017 | "metadata": {},
"output_type": "execute_result"
}
],
"source": [
"chat.invoke([system_message, human_message], temperature=0.7, max_tokens=10, top_p=0.95)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"> If you are going to place system prompt here, then it will ove... | |
151027 | {
"cells": [
{
"cell_type": "raw",
"id": "afaf8039",
"metadata": {},
"source": [
"---\n",
"sidebar_label: Ollama\n",
"---"
]
},
{
"cell_type": "markdown",
"id": "e49f1e0d",
"metadata": {},
"source": [
"# ChatOllama\n",
"\n",
"[Ollama](https://ollama.ai/) allows ... | |
151037 | {
"cells": [
{
"cell_type": "raw",
"id": "7320f16b",
"metadata": {},
"source": [
"---\n",
"sidebar_label: Llama 2 Chat\n",
"---"
]
},
{
"cell_type": "markdown",
"id": "90a1faf2",
"metadata": {},
"source": [
"# Llama2Chat\n",
"\n",
"This notebook shows how to aug... | |
151039 | {
"cells": [
{
"cell_type": "raw",
"id": "afaf8039",
"metadata": {},
"source": [
"---\n",
"sidebar_label: Azure OpenAI\n",
"---"
]
},
{
"cell_type": "markdown",
"id": "e49f1e0d",
"metadata": {},
"source": [
"# AzureChatOpenAI\n",
"\n",
"This guide will help you ... | |
151040 | "AIMessage(content=\"J'adore la programmation.\", response_metadata={'token_usage': {'completion_tokens': 8, 'prompt_tokens': 31, 'total_tokens': 39}, 'model_name': 'gpt-35-turbo', 'system_fingerprint': None, 'prompt_filter_results': [{'prompt_index': 0, 'content_filter_results': {'hate': {'filtered': False, 'severity'... | |
151079 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/integrations/callbacks/uptrain.ipynb\">\n",
" <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" ... | |
151142 | # C Transformers
This page covers how to use the [C Transformers](https://github.com/marella/ctransformers) library within LangChain.
It is broken into two parts: installation and setup, and then references to specific C Transformers wrappers.
## Installation and Setup
- Install the Python package with `pip install ... | |
151145 | # MongoDB Atlas
>[MongoDB Atlas](https://www.mongodb.com/docs/atlas/) is a fully-managed cloud
> database available in AWS, Azure, and GCP. It now has support for native
> Vector Search on the MongoDB document data.
## Installation and Setup
See [detail configuration instructions](/docs/integrations/vectorstores/m... | |
151215 | ---
keywords: [openai]
---
# OpenAI
All functionality related to OpenAI
>[OpenAI](https://en.wikipedia.org/wiki/OpenAI) is American artificial intelligence (AI) research laboratory
> consisting of the non-profit `OpenAI Incorporated`
> and its for-profit subsidiary corporation `OpenAI Limited Partnership`.
> `Open... | |
151223 | # Zep
> Recall, understand, and extract data from chat histories. Power personalized AI experiences.
>[Zep](https://www.getzep.com) is a long-term memory service for AI Assistant apps.
> With Zep, you can provide AI assistants with the ability to recall past conversations, no matter how distant,
> while also reducing ... | |
151227 | # Log10
This page covers how to use the [Log10](https://log10.io) within LangChain.
## What is Log10?
Log10 is an [open-source](https://github.com/log10-io/log10) proxiless LLM data management and application development platform that lets you log, debug and tag your Langchain calls.
## Quick start
1. Create your ... | |
151234 | # LangChain Decorators ✨
~~~
Disclaimer: `LangChain decorators` is not created by the LangChain team and is not supported by it.
~~~
>`LangChain decorators` is a layer on the top of LangChain that provides syntactic sugar 🍭 for writing custom langchain prompts and chains
>
>For Feedback, Issues, Contributions - plea... | |
151245 | # LocalAI
>[LocalAI](https://localai.io/) is the free, Open Source OpenAI alternative.
> `LocalAI` act as a drop-in replacement REST API that’s compatible with OpenAI API
> specifications for local inferencing. It allows you to run LLMs, generate images,
> audio (and not only) locally or on-prem with consumer grade... | |
151250 | # GPT4All
This page covers how to use the `GPT4All` wrapper within LangChain. The tutorial is divided into two parts: installation and setup, followed by usage with an example.
## Installation and Setup
- Install the Python package with `pip install gpt4all`
- Download a [GPT4All model](https://gpt4all.io/index.html... | |
151254 | # DocArray
> [DocArray](https://docarray.jina.ai/) is a library for nested, unstructured, multimodal data in transit,
> including text, image, audio, video, 3D mesh, etc. It allows deep-learning engineers to efficiently process,
> embed, search, recommend, store, and transfer multimodal data with a Pythonic API.
#... | |
151255 | # Airbyte
>[Airbyte](https://github.com/airbytehq/airbyte) is a data integration platform for ELT pipelines from APIs,
> databases & files to warehouses & lakes. It has the largest catalog of ELT connectors to data warehouses and databases.
## Installation and Setup
```bash
pip install -U langchain-airbyte
```
:::... | |
151265 | # LlamaIndex
>[LlamaIndex](https://www.llamaindex.ai/) is the leading data framework for building LLM applications
## Installation and Setup
You need to install the `llama-index` python package.
```bash
pip install llama-index
```
See the [installation instructions](https://docs.llamaindex.ai/en/stable/getting_st... | |
151285 | ---
keywords: [pinecone]
---
# Pinecone
>[Pinecone](https://docs.pinecone.io/docs/overview) is a vector database with broad functionality.
## Installation and Setup
Install the Python SDK:
```bash
pip install langchain-pinecone
```
## Vector store
There exists a wrapper around Pinecone indexes, allowing you to... | |
151288 | # Unstructured
>The `unstructured` package from
[Unstructured.IO](https://www.unstructured.io/) extracts clean text from raw source documents like
PDFs and Word documents.
This page covers how to use the [`unstructured`](https://github.com/Unstructured-IO/unstructured)
ecosystem within LangChain.
## Installation and ... | |
151291 | # Astra DB
> [DataStax Astra DB](https://docs.datastax.com/en/astra/home/astra.html) is a serverless
> vector-capable database built on `Apache Cassandra®`and made conveniently available
> through an easy-to-use JSON API.
See a [tutorial provided by DataStax](https://docs.datastax.com/en/astra/astra-db-vector/tutori... | |
151294 | # Motherduck
>[Motherduck](https://motherduck.com/) is a managed DuckDB-in-the-cloud service.
## Installation and Setup
First, you need to install `duckdb` python package.
```bash
pip install duckdb
```
You will also need to sign up for an account at [Motherduck](https://motherduck.com/)
After that, you should se... | |
151317 | # Llama.cpp
>[llama.cpp python](https://github.com/abetlen/llama-cpp-python) library is a simple Python bindings for `@ggerganov`
>[llama.cpp](https://github.com/ggerganov/llama.cpp).
>
>This package provides:
>
> - Low-level access to C API via ctypes interface.
> - High-level Python API for text completion
> - `Op... | |
151333 | # Google
All functionality related to [Google Cloud Platform](https://cloud.google.com/) and other `Google` products.
## Chat models
We recommend individual developers to start with Gemini API (`langchain-google-genai`) and move to Vertex AI (`langchain-google-vertexai`) when they need access to commercial support a... | |
151343 | Upstash offers developers serverless databases and messaging
platforms to build powerful applications without having to worry
about the operational complexity of running databases at scale.
One significant advantage of Upstash is that their databases support HTTP and all of their SDKs use HTTP.
This means that you ca... | |
151344 | {
"cells": [
{
"cell_type": "markdown",
"id": "cb0cea6a",
"metadata": {},
"source": [
"# Rebuff\n",
"\n",
">[Rebuff](https://docs.rebuff.ai/) is a self-hardening prompt injection detector.\n",
"It is designed to protect AI applications from prompt injection (PI) attacks through a multi-st... | |
151362 | # Flyte
> [Flyte](https://github.com/flyteorg/flyte) is an open-source orchestrator that facilitates building production-grade data and ML pipelines.
> It is built for scalability and reproducibility, leveraging Kubernetes as its underlying platform.
The purpose of this notebook is to demonstrate the integration of a... | |
151367 | ## Tool/Function Calling
LangChain PremAI supports tool/function calling. Tool/function calling allows a model to respond to a given prompt by generating output that matches a user-defined schema.
- You can learn all about tool calling in details [in our documentation here](https://docs.premai.io/get-started/functio... | |
151405 | # Chroma
>[Chroma](https://docs.trychroma.com/getting-started) is a database for building AI applications with embeddings.
## Installation and Setup
```bash
pip install langchain-chroma
```
## VectorStore
There exists a wrapper around Chroma vector databases, allowing you to use it as a vectorstore,
whether for s... | |
151409 | # Cohere
>[Cohere](https://cohere.ai/about) is a Canadian startup that provides natural language processing models
> that help companies improve human-machine interactions.
## Installation and Setup
- Install the Python SDK :
```bash
pip install langchain-cohere
```
Get a [Cohere api key](https://dashboard.cohere.ai... | |
151449 | # Dataherald
>[Dataherald](https://www.dataherald.com) is a natural language-to-SQL.
This page covers how to use the `Dataherald API` within LangChain.
## Installation and Setup
- Install requirements with
```bash
pip install dataherald
```
- Go to dataherald and sign up [here](https://www.dataherald.com)
- Create ... | |
151454 | # Portkey
[Portkey](https://portkey.ai) is the Control Panel for AI apps. With it's popular AI Gateway and Observability Suite, hundreds of teams ship **reliable**, **cost-efficient**, and **fast** apps.
## LLMOps for Langchain
Portkey brings production readiness to Langchain. With Portkey, you can
- [x] Connect to... | |
151455 | # Vectara
>[Vectara](https://vectara.com/) provides a Trusted Generative AI platform, allowing organizations to rapidly create a ChatGPT-like experience (an AI assistant)
> which is grounded in the data, documents, and knowledge that they have (technically, it is Retrieval-Augmented-Generation-as-a-service).
**Vecta... | |
151497 | " metadata={\"id\": 9, \"location\": \"library\", \"topic\": \"reading\"},\n",
" ),\n",
" Document(\n",
" page_content=\"a cooking class for beginners is offered at the community center\",\n",
" metadata={\"id\": 10, \"location\": \"community center\", \"topic\": \"classes\"},... | |
151499 | {
"cells": [
{
"cell_type": "markdown",
"id": "683953b3",
"metadata": {},
"source": [
"# Chroma\n",
"\n",
"This notebook covers how to get started with the `Chroma` vector store.\n",
"\n",
">[Chroma](https://docs.trychroma.com/getting-started) is a AI-native open-source vector databas... | |
151500 | ")\n",
"\n",
"document_7 = Document(\n",
" page_content=\"The top 10 soccer players in the world right now.\",\n",
" metadata={\"source\": \"website\"},\n",
" id=7,\n",
")\n",
"\n",
"document_8 = Document(\n",
" page_content=\"LangGraph is the best framework for building ... | |
151503 | "text/plain": [
"'Ketanji Brown Jackson is awesome'"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from langchain_community.document_loaders import TextLoader\n",
"from langchain_community.embeddings.sentence_transformer i... | |
151508 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# scikit-learn\n",
"\n",
">[scikit-learn](https://scikit-learn.org/stable/) is an open-source collection of machine learning algorithms, including some implementations of the [k nearest neighbors](https://scikit-learn.org/stabl... | |
151509 | {
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Timescale Vector (Postgres)\n",
"\n",
">[Timescale Vector](https://www.timescale.com/ai?utm_campaign=vectorlaunch&utm_source=langchain&utm_medium=referral) is `PostgreSQL++` vector database for AI applic... | |
151532 | {
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "683953b3",
"metadata": {},
"source": [
"# Qdrant\n",
"\n",
">[Qdrant](https://qdrant.tech/documentation/) (read: quadrant ) is a vector similarity search engine. It provides a production-ready service with a convenient API t... | |
151533 | "metadata": {
"ExecuteTime": {
"end_time": "2023-04-04T10:51:24.837599Z",
"start_time": "2023-04-04T10:51:24.834690Z"
}
},
"outputs": [],
"source": [
"url = \"<---qdrant cloud cluster url here --->\"\n",
"api_key = \"<---api key here--->\"\n",
"qdrant = QdrantVectorStore.from_docu... | |
151541 | {
"cells": [
{
"cell_type": "raw",
"id": "1957f5cb",
"metadata": {},
"source": [
"---\n",
"sidebar_label: Weaviate\n",
"---"
]
},
{
"cell_type": "markdown",
"id": "ef1f0986",
"metadata": {},
"source": [
"# Weaviate\n",
"\n",
"This notebook covers how to get star... | |
151543 | "id": "5f298bc0",
"metadata": {},
"source": [
"Any data added through `langchain-weaviate` will persist in Weaviate according to its configuration. \n",
"\n",
"WCS instances, for example, are configured to persist data indefinitely, and Docker instances can be set up to persist data in a volume. Read ... | |
151545 | "/workspaces/langchain-weaviate/.venv/lib/python3.12/site-packages/langchain_core/_api/deprecation.py:117: LangChainDeprecationWarning: The function `__call__` was deprecated in LangChain 0.1.0 and will be removed in 0.2.0. Use invoke instead.\n",
" warn_deprecated(\n",
"/workspaces/langchain-weaviate/.ven... | |
151561 | "id": "0bb2affb-48ca-410b-85c0-9e1275429bcb",
"metadata": {},
"source": [
"Search similar texts using similarity search function."
]
},
{
"cell_type": "code",
"execution_count": 31,
"id": "e755cdce",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[Documen... | |
151563 | {
"cells": [
{
"cell_type": "markdown",
"id": "683953b3",
"metadata": {},
"source": [
"# Intel's Visual Data Management System (VDMS)\n",
"\n",
">Intel's [VDMS](https://github.com/IntelLabs/vdms) is a storage solution for efficient access of big-”visual”-data that aims to achieve cloud scale ... | |
151578 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"# Azure AI Search\n",
"\n",
"[Azure AI Search](https://learn.microsoft.com/azure/search/search-what-is-azure-search) (formerly known as `Azure Search` and `Azure Cognitive Search`) is a cloud search s... | |
151579 | " 'NGM5N2NlZjgtMTc5Ny00OGEzLWI5YTgtNDFiZWE2MjBlMzA0',\n",
" 'OWQ4M2MyMTYtMmRkNi00ZDUxLWI0MDktOGE2NjMxNDFhYzFm',\n",
" 'YWZmZGJkOTAtOGM3My00MmNiLTg5OWUtZGMwMDQwYTk1N2Vj',\n",
" 'YTc3MTI2OTktYmVkMi00ZGU4LTgyNmUtNTY1YzZjMDg2YWI3',\n",
" 'MTQwMmVlYjEtNDI0MS00N2E0LWEyN2ItZjhhYWU0YjllMjRk',\n",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.