id stringlengths 6 6 | text stringlengths 20 17.2k | title stringclasses 1
value |
|---|---|---|
161128 | """Milvus vector store index.
An index that is built within Milvus.
"""
import logging
from typing import Any, Dict, List, Optional, Union
from llama_index.legacy.schema import BaseNode, TextNode
from llama_index.legacy.vector_stores.types import (
MetadataFilters,
VectorStore,
VectorStoreQuery,
Vec... | |
161132 | def __init__(
self,
search_or_index_client: Any,
id_field_key: str,
chunk_field_key: str,
embedding_field_key: str,
metadata_string_field_key: str,
doc_id_field_key: str,
filterable_metadata_field_keys: Optional[
Union[
List[str... | |
161181 | """DeepLake vector store index.
An index that is built within DeepLake.
"""
import logging
from typing import Any, List, Optional, cast
from llama_index.legacy.bridge.pydantic import PrivateAttr
from llama_index.legacy.schema import BaseNode, MetadataMode
from llama_index.legacy.vector_stores.types import (
Bas... | |
161218 | from typing import Any, List, Literal, Optional
import fsspec
from llama_index.legacy.vector_stores.docarray.base import DocArrayVectorStore
class DocArrayInMemoryVectorStore(DocArrayVectorStore):
"""Class representing a DocArray In-Memory vector store.
This class is a document index provided by Docarray t... | |
161244 | """LlamaIndex data structures."""
# indices
from llama_index.legacy.indices.composability.graph import ComposableGraph
from llama_index.legacy.indices.document_summary import (
DocumentSummaryIndex,
GPTDocumentSummaryIndex,
)
from llama_index.legacy.indices.document_summary.base import DocumentSummaryIndex
fro... | |
161249 | class PromptHelper(BaseComponent):
"""Prompt helper.
General prompt helper that can help deal with LLM context window token limitations.
At its core, it calculates available context size by starting with the context
window size of an LLM and reserve token space for the prompt template, and the
out... | |
161259 | ## 🌲 Tree Index
Currently the tree index refers to the `TreeIndex` class. It organizes external data into a tree structure that can be queried.
### Index Construction
The `TreeIndex` first takes in a set of text documents as input. It then builds up a tree-index in a bottom-up fashion; each parent node is able to s... | |
161327 | def delete_nodes(
self,
node_ids: List[str],
delete_from_docstore: bool = False,
**delete_kwargs: Any,
) -> None:
"""Delete a list of nodes from the index.
Args:
node_ids (List[str]): A list of node_ids from the nodes to delete
"""
raise ... | |
161328 | """Base vector store index query."""
from typing import Any, Dict, List, Optional
from llama_index.legacy.callbacks.base import CallbackManager
from llama_index.legacy.constants import DEFAULT_SIMILARITY_TOP_K
from llama_index.legacy.core.base_retriever import BaseRetriever
from llama_index.legacy.data_structs.data_s... | |
161386 | """Retriever tool."""
from typing import TYPE_CHECKING, Any, Optional
from llama_index.legacy.core.base_retriever import BaseRetriever
if TYPE_CHECKING:
from llama_index.legacy.langchain_helpers.agents.tools import LlamaIndexTool
from llama_index.legacy.schema import MetadataMode
from llama_index.legacy.tools.ty... | |
161421 | """OpenAI embeddings file."""
from enum import Enum
from typing import Any, Dict, List, Optional, Tuple
import httpx
from openai import AsyncOpenAI, OpenAI
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks.base import CallbackManager
from llama_index.legacy.embedding... | |
161431 | """Langchain Embedding Wrapper Module."""
from typing import TYPE_CHECKING, List, Optional
from llama_index.legacy.bridge.pydantic import PrivateAttr
from llama_index.legacy.callbacks import CallbackManager
from llama_index.legacy.core.embeddings.base import (
DEFAULT_EMBED_BATCH_SIZE,
BaseEmbedding,
)
if TY... | |
161462 | """Token splitter."""
import logging
from typing import Callable, List, Optional
from llama_index.legacy.bridge.pydantic import Field, PrivateAttr
from llama_index.legacy.callbacks.base import CallbackManager
from llama_index.legacy.callbacks.schema import CBEventType, EventPayload
from llama_index.legacy.constants i... | |
161524 | class WandbCallbackHandler(BaseCallbackHandler):
"""Callback handler that logs events to wandb.
NOTE: this is a beta feature. The usage within our codebase, and the interface
may change.
Use the `WandbCallbackHandler` to log trace events to wandb. This handler is
useful for debugging and visualizi... | |
161545 | try:
import pydantic.v1 as pydantic
from pydantic.v1 import (
BaseConfig,
BaseModel,
Field,
PrivateAttr,
StrictFloat,
StrictInt,
StrictStr,
create_model,
root_validator,
validator,
)
from pydantic.v1.error_wrappers import Va... | |
161546 | import langchain
from langchain.agents import AgentExecutor, AgentType, initialize_agent
# agents and tools
from langchain.agents.agent_toolkits.base import BaseToolkit
from langchain.base_language import BaseLanguageModel
# callback
from langchain.callbacks.base import BaseCallbackHandler, BaseCallbackManager
from l... | |
161679 | """Init file for langchain helpers."""
try:
import langchain # noqa
except ImportError:
raise ImportError(
"langchain not installed. "
"Please install langchain with `pip install llama_index[langchain]`."
) | |
161681 | from queue import Queue
from threading import Event
from typing import Any, Generator, List, Optional
from uuid import UUID
from llama_index.legacy.bridge.langchain import BaseCallbackHandler, LLMResult
class StreamingGeneratorCallbackHandler(BaseCallbackHandler):
"""Streaming callback handler."""
def __ini... | |
161750 | """SQL wrapper around SQLDatabase in langchain."""
from typing import Any, Dict, Iterable, List, Optional, Tuple
from sqlalchemy import MetaData, create_engine, insert, inspect, text
from sqlalchemy.engine import Engine
from sqlalchemy.exc import OperationalError, ProgrammingError
class SQLDatabase:
"""SQL Datab... | |
161756 | """Pydantic output parser."""
import json
from typing import Any, List, Optional, Type
from llama_index.legacy.output_parsers.base import ChainableOutputParser
from llama_index.legacy.output_parsers.utils import extract_json_str
from llama_index.legacy.types import Model
PYDANTIC_FORMAT_TMPL = """
Here's a JSON sche... | |
161813 | class ChatPromptTemplate(BasePromptTemplate):
message_templates: List[ChatMessage]
def __init__(
self,
message_templates: List[ChatMessage],
prompt_type: str = PromptType.CUSTOM,
output_parser: Optional[BaseOutputParser] = None,
metadata: Optional[Dict[str, Any]] = None,... | |
161886 | import asyncio
import logging
import queue
from abc import ABC, abstractmethod
from dataclasses import dataclass, field
from enum import Enum
from threading import Event
from typing import AsyncGenerator, Generator, List, Optional, Union
from llama_index.legacy.core.llms.types import (
ChatMessage,
ChatRespons... | |
161904 | """Qdrant reader."""
from typing import Dict, List, Optional, cast
from llama_index.legacy.readers.base import BaseReader
from llama_index.legacy.schema import Document
class QdrantReader(BaseReader):
"""Qdrant reader.
Retrieve documents from existing Qdrant collections.
Args:
location:
... | |
161915 | """DeepLake reader."""
from typing import List, Optional, Union
import numpy as np
from llama_index.legacy.readers.base import BaseReader
from llama_index.legacy.schema import Document
distance_metric_map = {
"l2": lambda a, b: np.linalg.norm(a - b, axis=1, ord=2),
"l1": lambda a, b: np.linalg.norm(a - b, a... | |
161921 | """Chroma Reader."""
from typing import Any, List, Optional, Union
from llama_index.legacy.readers.base import BaseReader
from llama_index.legacy.schema import Document
class ChromaReader(BaseReader):
"""Chroma reader.
Retrieve documents from existing persisted Chroma collections.
Args:
collec... | |
161935 | """Tabular parser.
Contains parsers for tabular data files.
"""
from pathlib import Path
from typing import Any, Dict, List, Optional
import pandas as pd
from llama_index.legacy.readers.base import BaseReader
from llama_index.legacy.schema import Document
class CSVReader(BaseReader):
"""CSV parser.
Args... | |
161960 | """Weaviate reader."""
from typing import Any, List, Optional
from llama_index.legacy.readers.base import BaseReader
from llama_index.legacy.schema import Document
class WeaviateReader(BaseReader):
"""Weaviate reader.
Retrieves documents from Weaviate through vector lookup. Allows option
to concatenate... | |
161983 | import logging
from typing import Any, Callable, Dict, List, Optional, Sequence, Type
from openai.resources import Completions
from tenacity import (
before_sleep_log,
retry,
retry_if_exception_type,
stop_after_attempt,
wait_exponential,
)
from llama_index.legacy.bridge.pydantic import BaseModel
f... | |
162008 | def _stream_complete(self, prompt: str, **kwargs: Any) -> CompletionResponseGen:
url = f"{self.api_base}/chat/completions"
payload = {
"model": self.model,
"prompt": prompt,
"stream": True,
**self._get_all_kwargs(**kwargs),
}
def gen() -> ... | |
162038 | import logging
import os
import time
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Type, Union
import openai
from deprecated import deprecated
from openai.types.chat import ChatCompletionMessageParam, ChatCompletionMessageToolCall
from openai.types.chat.chat_completion_chunk import ChoiceDel... | |
162168 | import os
from typing import Dict, List
import pytest
from llama_index.legacy.schema import NodeRelationship, RelatedNodeInfo, TextNode
from llama_index.legacy.vector_stores import ChromaVectorStore
from llama_index.legacy.vector_stores.types import VectorStoreQuery
##
# Start chromadb locally
# cd tests
# docker-com... | |
162178 | """Test MongoDB Atlas Vector Search functionality."""
from __future__ import annotations
import os
from time import sleep
from typing import List
import pytest
try:
from pymongo import MongoClient
INDEX_NAME = "llamaindex-test-index"
NAMESPACE = "llamaindex_test_db.llamaindex_test_collection"
CONNE... | |
162180 | from typing import List
import numpy as np
import pandas as pd
from llama_index.legacy.vector_stores.lancedb import _to_llama_similarities
data_stub = {
"id": [1, 2, 3],
"doc_id": ["doc1", "doc2", "doc3"],
"vector": [np.array([0.1, 0.2]), np.array([0.3, 0.4]), np.array([0.5, 0.6])],
"text": ["text1", ... | |
162269 | """Test deeplake indexes."""
from typing import List
import pytest
from llama_index.legacy.indices.vector_store.base import VectorStoreIndex
from llama_index.legacy.schema import Document, TextNode
from llama_index.legacy.service_context import ServiceContext
from llama_index.legacy.storage.storage_context import Sto... | |
162326 | from llama_index.legacy.node_parser.file.json import JSONNodeParser
from llama_index.legacy.schema import Document
def test_split_empty_text() -> None:
json_splitter = JSONNodeParser()
input_text = Document(text="")
result = json_splitter.get_nodes_from_documents([input_text])
assert result == []
de... | |
162328 | def test_complex_md() -> None:
test_data = Document(
text="""
# Using LLMs
## Concept
Picking the proper Large Language Model (LLM) is one of the first steps you need to consider when building any LLM application over your data.
LLMs are a core component of LlamaIndex. They can be used as standalone modu... | |
162459 | """Test pydantic output parser."""
import pytest
from llama_index.legacy.bridge.pydantic import BaseModel
from llama_index.legacy.output_parsers.pydantic import PydanticOutputParser
class AttrDict(BaseModel):
test_attr: str
foo: int
class TestModel(BaseModel):
__test__ = False
title: str
attr_d... | |
162622 | ]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"response: In the summer of 1995, Steve Jobs was involved in the process of returning to Apple after his departure from the company a decade e... | |
163404 | than four function calls in ReAct, which often lead to divergent behavior, show less than 10% accuracy in ReAct.
On the other hand, when these examples are processed with LLMCompiler, they achieve around 50% accuracy by
circumventing repetitive calls. It is worth noting that there are instances with three function call... | |
163445 | # Sentence Window Retriever
This LlamaPack provides an example of our sentence window retriever.
This specific template shows the e2e process of building this. It loads
a document, chunks it up, adds surrounding context as metadata to each chunk,
and during retrieval inserts the context back into each chunk for respo... | |
163449 | """Sentence window retriever."""
from typing import Any, Dict, List
from llama_index.core import Settings, VectorStoreIndex
from llama_index.core.llama_pack.base import BaseLlamaPack
from llama_index.core.node_parser import (
SentenceWindowNodeParser,
)
from llama_index.core.postprocessor import MetadataReplaceme... | |
163771 | 3-08-25
### New Features
- Added support for `MonsterLLM` using MonsterAPI (#7343)
- Support comments fields in NebulaGraphStore and int type VID (#7402)
- Added configurable endpoint for DynamoDB (#6777)
- Add structured answer filtering for Refine response synthesizer (#7317)
### Bug Fixes / Nits
- Use `utf-8` fo... | |
163777 | <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
# Welcome to LlamaIndex 🦙 !
LlamaIndex is a framework for building context-augmented generative AI applications with [LLMs](https://en.wikipedia.org/wiki/Large_language_model) including [agents](./understanding/agent/basic_agent/) and [workflo... | |
163793 | # Deprecated Terms
As LlamaIndex continues to evolve, many class names and APIs have been adjusted, improved, and deprecated.
The following is a list of previously popular terms that have been deprecated, with links to their replacements.
## GPTSimpleVectorIndex
This has been renamed to `VectorStoreIndex`, as well ... | |
163796 | # Using LLMs
!!! tip
For a list of our supported LLMs and a comparison of their functionality, check out our [LLM module guide](../../module_guides/models/llms.md).
One of the first steps when building an LLM-based application is which LLM to use; you can also use more than one if you wish.
LLMs are used at mult... | |
163801 | # Cost Analysis
## Concept
Each call to an LLM will cost some amount of money - for instance, OpenAI's gpt-3.5-turbo costs $0.002 / 1k tokens. The cost of building an index and querying depends on
- the type of LLM used
- the type of data structure used
- parameters used during building
- parameters used during quer... | |
163802 | # Basic workflow
## Getting started
Workflows are built into LlamaIndex core, so to use them all you need is
```
pip install llama-index-core
```
During development you will probably find it helpful to visualize your workflow; you can use our built-in visualizer for this by installing it:
```
pip install llama-ind... | |
163818 | # Storing
Once you have data [loaded](../loading/loading.md) and [indexed](../indexing/indexing.md), you will probably want to store it to avoid the time and cost of re-indexing it. By default, your indexed data is stored only in memory.
## Persisting to disk
The simplest way to store your indexed data is to use the... | |
163823 | # Indexing
With your data loaded, you now have a list of Document objects (or a list of Nodes). It's time to build an `Index` over these objects so you can start querying them.
## What is an Index?
In LlamaIndex terms, an `Index` is a data structure composed of `Document` objects, designed to enable querying by an L... | |
163826 | # Agents
Putting together an agent in LlamaIndex can be done by defining a set of tools and providing them to our ReActAgent implementation. We're using it here with OpenAI, but it can be used with any sufficiently capable LLM:
```python
from llama_index.core.tools import FunctionTool
from llama_index.llms.openai imp... | |
163828 | acted Terms
Now that we can extract terms, we need to put them somewhere so that we can query for them later. A `VectorStoreIndex` should be a perfect choice for now! But in addition, our app should also keep track of which terms are inserted into the index so that we can inspect them later. Using `st.session_state`, ... | |
163829 | #1 - Create a Starting Index
With our base app working, it might feel like a lot of work to build up a useful index. What if we gave the user some kind of starting point to show off the app's query capabilities? We can do just that! First, let's make a small change to our app so that we save the index to disk after ev... | |
163830 | #3 - Image Support
Llama index also supports images! Using Llama Index, we can upload images of documents (papers, letters, etc.), and Llama Index handles extracting the text. We can leverage this to also allow users to upload images of their documents and extract terms and definitions from them.
If you get an import... | |
163837 | # How to Build a Chatbot
LlamaIndex serves as a bridge between your data and Large Language Models (LLMs), providing a toolkit that enables you to establish a query interface around your data for a variety of tasks, such as question-answering and summarization.
In this tutorial, we'll walk you through building a cont... | |
164007 | ::: llama_index.embeddings.langchain
options:
members:
- LangchainEmbedding | |
164044 | ::: llama_index.core.memory.chat_memory_buffer | |
164759 | "show list of text ['file_path: data/paul_graham/paul_graham_essay.txt People who see the responses to essays I write sometimes tell me how sorry they feel for me, but I\\'m not exaggerating when I reply that it has always been like this, since the very beginning. It comes with the territory. An essay must tell reader... | |
164792 | " fused_sim = alpha * (sparse_sim + dense_sim)\n",
" fused_similarities.append((fused_sim, all_nodes_dict[node_id]))\n",
"\n",
" fused_similarities.sort(key=lambda x: x[0], reverse=True)\n",
" fused_similarities = fused_similarities[:top_k]\n",
"\n",
" # create final respo... | |
164907 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# DuckDB\n",
"\n",
">[DuckDB](https://duckdb.org/docs/api/python/overview) is a fast in-process analytical database. DuckDB is under an MIT license.\n",
"\n",
"In this notebook we are going to show how to use DuckDB as ... | |
164935 | {
"cells": [
{
"cell_type": "markdown",
"id": "714eb664",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/vector_stores/PineconeIndexDemo.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/c... | |
164954 | {
"cells": [
{
"cell_type": "markdown",
"id": "f5860e4e-3775-41b9-8329-46a6d9568056",
"metadata": {},
"source": [
"## Couchbase Vector Store\n",
"[Couchbase](https://couchbase.com/) is an award-winning distributed NoSQL cloud database that delivers unmatched versatility, performance, scalability,... | |
165063 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Hybrid Search with Qdrant BM42\n",
"\n",
"Qdrant recently released a new lightweight approach to sparse embeddings, [BM42](https://qdrant.tech/articles/bm42/).\n",
"\n",
"In this notebook, we walk through how to use B... | |
165064 | " embed_model=OpenAIEmbedding(\n",
" model_name=\"text-embedding-3-small\", api_key=\"sk-proj-...\"\n",
" ),\n",
" storage_context=storage_context,\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"As we can see, both the dense and sparse embeddings... | |
165184 | "chroma_client = chromadb.EphemeralClient()\n",
"chroma_collection = chroma_client.create_collection(\"quickstart\")\n",
"\n",
"# define embedding function\n",
"embed_model = HuggingFaceEmbedding(model_name=\"BAAI/bge-base-en-v1.5\")\n",
"\n",
"# load documents\n",
"documents = SimpleDirecto... | |
165194 | {
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "1496f9de",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/vector_stores/MilvusIndexDemo.ipynb\" target=\"_parent\"><img src=\"https://colab.research... | |
165197 | {
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/vector_stores/AzureAISearchIndexDemo.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/as... | |
165270 | {
"cells": [
{
"cell_type": "markdown",
"id": "0d6aba5a-abde-4e41-8a54-ef7e0de9e8a3",
"metadata": {},
"source": [
"# Query Pipeline over Pandas DataFrames\n",
"\n",
"This is a simple example that builds a query pipeline that can perform structured operations over a Pandas DataFrame to satisfy... | |
165280 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Query Pipeline Chat Engine\n",
"\n",
"By combining a query pipeline with a memory buffer, we can design our own custom chat engine loop."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
... | |
165283 | {
"cells": [
{
"cell_type": "markdown",
"id": "cd032bcb-fefb-48ec-94da-08d49ac26120",
"metadata": {},
"source": [
"# Query Pipeline with Async/Parallel Execution\n",
"\n",
"Here we showcase our query pipeline with async + parallel execution.\n",
"\n",
"We do this by setting up a RAG p... | |
165291 | },
{
"cell_type": "code",
"execution_count": null,
"id": "de0e3aa5",
"metadata": {},
"outputs": [],
"source": [
"db = chromadb.PersistentClient(path=\"./chroma_db\")\n",
"chroma_collection = db.get_or_create_collection(\"dense_vectors\")\n",
"vector_store = ChromaVectorStore(chroma_colle... | |
165314 | "Doc 8 (node score, doc similarity, full similarity): (0.5672766061523489, 0.24827341793941335, 0.4077750120458811)\n",
"Doc 9 (node score, doc similarity, full similarity): (0.5671131641337652, 0.24827341793941335, 0.4076932910365893)\n",
"The LLM interface is a unified interface provided by LlamaIndex for... | |
165535 | {
"cells": [
{
"cell_type": "markdown",
"id": "6340e329",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/llm/azure_openai.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\... | |
165605 | {
"cells": [
{
"cell_type": "markdown",
"id": "3ac9adb4",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/llm/llama_2_llama_cpp.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge... | |
165672 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/embeddings/custom_embeddings.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"O... | |
165675 | {
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/embeddings/huggingface.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-bad... | |
165706 | {
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# LangChain Embeddings\n",
"\n",
"This guide shows you how to use embedding models from [LangChain](https://python.langchain.com/docs/integrations/text_embedding/).\n",
"\n",
"<a href=\"https://col... | |
165710 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/embeddings/OpenAI.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Cola... | |
165721 | {
"cells": [
{
"cell_type": "markdown",
"id": "c62c1447-0afb-4fad-8dc6-389949c3496e",
"metadata": {},
"source": [
"# Chat Summary Memory Buffer\n",
"In this demo, we use the new *ChatSummaryMemoryBuffer* to limit the chat history to a certain token length, and iteratively summarize all messages t... | |
165847 | {
"cells": [
{
"cell_type": "markdown",
"id": "7ae43f8b",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/customization/llms/SimpleIndexDemo-ChatGPT.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.c... | |
165853 | {
"cells": [
{
"cell_type": "markdown",
"id": "9af12a30",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/customization/llms/AzureOpenAI.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/co... | |
165923 | {
"cells": [
{
"cell_type": "markdown",
"id": "30815a85",
"metadata": {},
"source": [
"# LLM Pydantic Program - NVIDIA"
]
},
{
"cell_type": "markdown",
"id": "311e16cb",
"metadata": {},
"source": [
"This guide shows you how to generate structured data with our `LLMTextCompletio... | |
165941 | "Cell \u001b[0;32mIn[31], line 5\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[39mfrom\u001b[39;00m \u001b[39mllama_index\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mvector_stores\u001b[39;00m\u001b[39m.\u001b[39;00m\u001b[39mchroma\u001b[39;00m \u001b[39mimport\u001b[39;00m ChromaVectorStore\n\u001b[1;32m 3\u00... | |
165943 | "File \u001b[0;32m~/giant_change/llama_index/venv/lib/python3.10/site-packages/chromadb/config.py:382\u001b[0m, in \u001b[0;36mSystem.instance\u001b[0;34m(self, type)\u001b[0m\n\u001b[1;32m 379\u001b[0m \u001b[39mtype\u001b[39m \u001b[39m=\u001b[39m get_class(fqn, \u001b[39mtype\u001b[39m)\n\u001b[1;32m 381\u... | |
165963 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Controlling Agent Reasoning Loop with Return Direct Tools\n",
"\n",
"All tools have an option for `return_direct` -- if this is set to `True`, and the associated tool is called (without any other tools being called), the agen... | |
166142 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# NebulaGraph Property Graph Index\n",
"\n",
"NebulaGraph is an open-source distributed graph database built for super large-scale graphs with milliseconds of latency.\n",
"\n",
"If you already have an existing graph, p... | |
166381 | "[NodeWithScore(node=TextNode(id_='d18bb1f1-466a-443d-98d9-6217bf71ee5a', embedding=None, metadata={'filename': 'README.md', 'category': 'codebase'}, excluded_embed_metadata_keys=[], excluded_llm_metadata_keys=[], relationships={<NodeRelationship.SOURCE: '1'>: RelatedNodeInfo(node_id='e4c638ce-6757-482e-baed-0965745506... | |
166406 | {
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "2ffc6a2b",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/low_level/oss_ingestion_retrieval.ipynb\" target=\"_parent\"><img src=\"https://colab.rese... | |
166440 | {
"cells": [
{
"cell_type": "markdown",
"id": "57c676db",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/low_level/ingestion.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.s... | |
166462 | "7182e98f-1b8a-4aba-af18-3982b862c794\n",
"2024-05-06 14:00:35.931813\n",
"BaseEmbedding.get_text_embedding_batch-632972aa-3345-49cb-ae2f-46f3166e3afc\n",
"Event type: EmbeddingStartEvent\n",
"{'model_name': 'text-embedding-ada-002', 'embed_batch_size': 100, 'num_workers': None, 'additional_kwar... | |
166479 | {
"cells": [
{
"cell_type": "markdown",
"id": "dd006f66",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/node_parsers/topic_parser.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-b... | |
166495 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/workflow/router_query_engine.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"O... | |
166694 | {
"cells": [
{
"cell_type": "markdown",
"id": "8ea05db5-944c-4bad-80a6-54841ccc0d42",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/multi_modal/llava_multi_modal_tesla_10q.ipynb\" target=\"_parent\"><img src=\"https:... | |
166866 | "cell_type": "code",
"execution_count": null,
"id": "958515ad-af10-4163-89bb-0ceb12ca48d8",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The potential risks associated with the use of Llama 2, as mentioned in the context, include the generatio... | |
166996 | {
"cells": [
{
"cell_type": "markdown",
"id": "23e5dc2d",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/chat_engine/chat_engine_openai.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/co... | |
167000 | {
"cells": [
{
"cell_type": "markdown",
"id": "d89ae951",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/chat_engine/chat_engine_best.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/cola... | |
167009 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/query_engine/knowledge_graph_rag_query_engine.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-ba... | |
167062 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/query_engine/knowledge_graph_query_engine.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.... | |
167318 | {
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "27bc87b7",
"metadata": {},
"source": [
"# Nebula Graph Store"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "bde39e3e",
"metadata": {},
"outputs": [],
"source": [
"%pip install llama-index-l... | |
167327 | {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# TiDB Graph Store"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%pip install llama-index-llms-openai\n",
"%pip install llama-index-graph-stores-tidb\n",... | |
167469 | {
"cells": [
{
"cell_type": "markdown",
"id": "27bc87b7",
"metadata": {},
"source": [
"# Neo4j Graph Store"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "78b60432",
"metadata": {},
"outputs": [],
"source": [
"%pip install llama-index-llms-openai\n",
"%pi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.