semvec/pypi-packages huggingface dataset:
llama-index-readers-microsoft-outlook 0.4.1
llama-index readers microsoft outlook integration
Requires Python: <4.0,>=3.9
Keywords: calendar, outlook

# Outlook Local Calendar Loader

```bash
pip install llama-index-readers-microsoft-outlook
```

This loader reads your past and upcoming Calendar events from your local Outlook .ost or .pst and parses the relevant info into `Documents`.

It runs on Windows only and has only been tested with Windows 11. It has been designed to have a supoerset of the functionality of the Google Calendar reader.

## Usage

Here's an example usage of the OutlookCalendar Reader. It will retrieve up to 100 future events, unless an optional `number_of_results` argument is passed. It will also retrieve only future events, unless an optional `start_date` argument is passed. Optionally events can be restricted to those which occur on or before a specific date by specifying the optional `end-date` parameter. By default, `end-date` is 2199-01-01.

It always returns Start, End, Subject, Location, and Organizer attributes and optionally returns additional attributes specified in the `more_attributes` parameter, which, if specified, must be a list of strings eg. ['Body','someotherattribute',...]. Attributes which don't exist in a calendar entry are ignored without warning.

```python
from llama_index.readers.microsoft_outlook import OutlookLocalCalendarReader

loader = OutlookCalendarReader()
documents = loader.load_data()
```

## Example

This loader is designed to be used as a way to load data into [LlamaIndex](https://github.com/run-llama/llama_index/).

### LlamaIndex

```python
from llama_index.core import VectorStoreIndex, download_loader

from llama_index.readers.microsoft_outlook import OutlookLocalCalendarReader

loader = OutlookCalendarReader(
    start_date="2022-01-01", number_of_documents=1000
)

documents = loader.load_data()
index = VectorStoreIndex.from_documents(documents)
index.query("When did I last see George Guava? When do I see him again?")
```

Note: it is actually better to give a structured prompt with this data and be sure to it is clear what today's date is and whether you want any data besides the indexed data used in answering the prompt.
llama-index-llms-vertex 0.6.1
llama-index llms vertex integration
Requires Python: <4.0,>=3.9

# LlamaIndex Llms Integration: Vertex

**NOTE:** Gemini has largely been replaced by Google GenAI. Visit the [Google GenAI page](https://docs.llamaindex.ai/en/stable/examples/llm/google_genai/) for the latest examples and documentation.
llama-index-readers-obsidian 0.6.1
llama-index readers obsidian integration
Requires Python: <4.0,>=3.9

# LlamaIndex Readers Integration: Obsidian

## Overview

Pass in the path to an Obsidian vault and it will parse all markdown
files into a List of Documents. Documents are split by header in
the Markdown Reader we use.

Each document will contain the following metadata:

- file_name: the name of the markdown file
- folder_path: the full path to the folder containing the file
- folder_name: the relative path to the folder containing the file
- note_name: the name of the note (without the .md extension)
- wikilinks: a list of all wikilinks found in the document
- backlinks: a list of all notes that link to this note

Optionally, tasks can be extracted from the text and stored in metadata.

### Usage

```python
from llama_index.readers.obsidian import ObsidianReader

# Initialize ObsidianReader with the path to the Obsidian vault
reader = ObsidianReader(
    input_dir="<Path to Obsidian Vault>",
    extract_tasks=False,
    remove_tasks_from_text=False,
)

# Load data from the Obsidian vault
documents = reader.load_data()
```

##### Arguments

- **input_dir** (str): Path to the Obsidian vault.
- **extract_tasks** (bool): If True, extract tasks from the text and store them in metadata. Default is False.
- **remove_tasks_from_text** (bool): If True and extract_tasks is True, remove the task lines from the main document text. Default is False.

Implementation for Obsidian reader can be found [here](https://docs.llamaindex.ai/en/stable/examples/data_connectors/ObsidianReaderDemo/)

This loader is designed to be used as a way to load data into
[LlamaIndex](https://github.com/run-llama/llama_index/tree/main/llama_index) and/or subsequently
used as a Tool in a [LangChain](https://github.com/hwchase17/langchain) Agent.
llama-index-postprocessor-bedrock-rerank 0.5.1
llama-index postprocessor bedrock rerank integration
Requires Python: <4.0,>=3.9

# LlamaIndex Postprocessor Integration: AWS Bedrock Rerankers

## Sample Usage

```python
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
from llama_index.postprocessor.bedrock_rerank import BedrockRerank


documents = SimpleDirectoryReader("./data/paul_graham/").load_data()
index = VectorStoreIndex.from_documents(documents=documents)
reranker = BedrockRerank(
    top_n=3,
    rerank_model_name="cohere.rerank-v3-5:0",
    region_name="us-west-2",
)
query_engine = index.as_query_engine(
    similarity_top_k=10,
    node_postprocessors=[reranker],
)
response = query_engine.query(
    "What did Sam Altman do in this essay?",
)

print(response)

print(response.source_nodes)
```
llama-index-readers-hwp 0.4.1
llama-index readers hwp integration
Requires Python: <4.0,>=3.9

# HWP Loader

```bash
pip install llama-index-readers-file
```

This loader reads the HWP file, which is the format of many official documents in South Korea.

## Usage

To use this loader, you need to pass in a file name. It's fine whether the file is compressed or not.

```python
from llama_index.readers.file import HWPReader
from pathlib import Path

hwp_path = Path("/path/to/hwp")
reader = HWPReader()
documents = reader.load_data(file=hwp_path)
```
llama-index-node-parser-alibabacloud-aisearch 0.3.1
llama-index node_parser alibabacloud_aisearch integration
Requires Python: <4.0,>=3.9

# LlamaIndex Node_Parser Integration: Alibabacloud_Aisearch

## Installation

```
pip install llama-index-node-parser-alibabacloud-aisearch
```

## Optional Installation

For automatic parsing of image slices, you can optionally install `llama-index-readers-alibabacloud-aisearch`.

```
pip install llama-index-readers-alibabacloud-aisearch
```

## Usage

For further details, please visit [document-split-api-details](https://help.aliyun.com/zh/open-search/search-platform/developer-reference/document-split-api-details).

You can specify the `endpoint` and `aisearch_api_key` in the constructor, or set the environment variables `AISEARCH_ENDPOINT` and `AISEARCH_API_KEY`.

```python
from llama_index.node_parser.alibabacloud_aisearch import (
    AlibabaCloudAISearchNodeParser,
)
from llama_index.core import Document

try:
    from llama_index.readers.alibabacloud_aisearch import (
        AlibabaCloudAISearchImageReader,
    )

    image_reader = AlibabaCloudAISearchImageReader(
        service_id="ops-image-analyze-vlm-001"
    )
except ImportError:
    image_reader = None
node_parser = AlibabaCloudAISearchNodeParser(
    chunk_size=1024, image_reader=image_reader
)
nodes = node_parser(
    [
        Document(text="content1", mimetype="text/markdown"),
        Document(
            text="content2 ![IMAGE](https://img.alicdn.com/imgextra/i1/O1CN01WksnF41hlhBFsXDNB_!!6000000004318-0-tps-1000-1400.jpg)",
            mimetype="text/markdown",
        ),
    ],
    show_progress=True,
)
for i, node in enumerate(nodes):
    print(f"[SPLIT#{i}]:\n{node.get_content()}")
    print("-" * 80)
```
llama-index-readers-metal 0.4.1
llama-index readers metal integration
Requires Python: <4.0,>=3.9
Keywords: metal, retriever, storage

# LlamaIndex Readers Integration: Metal

## Overview

Metal Reader is designed to load data from the Metal Vector store, which provides search functionality based on query embeddings and filters. It retrieves documents from the Metal index associated with the provided API key, client ID, and index ID.

### Installation

You can install Metal Reader via pip:

```bash
pip install llama-index-readers-metal
```

To use Metal Reader, you must have a vector store first. Follow this to create a metal vector store, [Setup Metal Vector Store](https://docs.llamaindex.ai/en/stable/examples/vector_stores/MetalIndexDemo/)

### Usage

```python
from llama_index.readers.metal import MetalReader

# Initialize MetalReader
reader = MetalReader(
    api_key="<Metal API Key>",
    client_id="<Metal Client ID>",
    index_id="<Metal Index ID>",
)

# Load data from Metal
documents = reader.load_data(
    limit=10,  # Number of results to return
    query_embedding=[0.1, 0.2, 0.3],  # Query embedding for search
    filters={"field": "value"},  # Filters to apply to the search
    separate_documents=True,  # Whether to return separate documents
)
```

This loader is designed to be used as a way to load data into
[LlamaIndex](https://github.com/run-llama/llama_index/tree/main/llama_index) and/or subsequently
used as a Tool in a [LangChain](https://github.com/hwchase17/langchain) Agent.
llama-index-llms-cloudflare-ai-gateway 0.2.1
llama-index llms cloudflare ai gateway integration
Requires Python: <4.0,>=3.10
Keywords: ai, cloudflare, gateway

# LlamaIndex LLM Integration for Cloudflare AI Gateway

This package provides integration between LlamaIndex and Cloudflare AI Gateway, allowing you to use multiple AI models from different providers with automatic fallback.

## Features

- **Multiple Providers**: Use OpenAI, Anthropic, Mistral, Groq, and more
- **Automatic Fallback**: If one provider fails, automatically tries the next
- **Streaming Support**: Both chat and completion streaming
- **Async Support**: Full async/await support
- **Caching**: Built-in request caching with Cloudflare AI Gateway

## Installation

```bash
pip install llama-index-llms-cloudflare-ai-gateway
```

## Quick Start

```python
from llama_index.llms.cloudflare_ai_gateway import CloudflareAIGateway
from llama_index.llms.openai import OpenAI
from llama_index.llms.anthropic import Anthropic
from llama_index.core.llms import ChatMessage

# Create LLM instances
openai_llm = OpenAI(model="gpt-4o-mini", api_key="your-openai-key")
anthropic_llm = Anthropic(
    model="claude-3-5-sonnet-20241022", api_key="your-anthropic-key"
)

# Create Cloudflare AI Gateway LLM
llm = CloudflareAIGateway(
    llms=[openai_llm, anthropic_llm],  # Try OpenAI first, then Anthropic
    account_id="your-cloudflare-account-id",
    gateway="your-ai-gateway-name",
    api_key="your-cloudflare-api-key",
)

# Use the LLM
messages = [ChatMessage(role="user", content="What is 2+2?")]
response = llm.chat(messages)
print(response.message.content)
```

## Supported Providers

- OpenAI
- Anthropic
- Mistral AI
- Groq
- DeepSeek
- Perplexity
- Replicate
- Grok
- Azure OpenAI

## Testing

```bash
# Set environment variables
export OPENAI_API_KEY="your-key"
export ANTHROPIC_API_KEY="your-key"
export CLOUDFLARE_ACCOUNT_ID="your-id"
export CLOUDFLARE_API_KEY="your-key"
export CLOUDFLARE_GATEWAY="your-gateway"

# Run tests
uv run pytest tests/
```
llama-index-readers-pdf-table 0.4.1
llama-index readers pdf_table integration
Requires Python: <4.0,>=3.9
Keywords: pdf, pdf table, table

# PDF Table Loader

```bash
pip install llama-index-readers-pdf-table
```

This loader reads the tables included in the PDF.

Users can input the PDF `file` and the `pages` from which they want to extract tables, and they can read the tables included on those pages.

## Usage

Here's an example usage of the PDFTableReader.
`pages` parameter is the same as camelot's `pages`. Therefore, you can use patterns such as `all`, `1,2,3`, `10-20`, and so on.

```python
from llama_index.readers.pdf_table import PDFTableReader
from pathlib import Path

reader = PDFTableReader()
pdf_path = Path("/path/to/pdf")
documents = reader.load_data(file=pdf_path, pages="80-90")
```

## Example

This loader is designed to be used as a way to load data into [LlamaIndex](https://github.com/run-llama/llama_index/).
llama-index-vector-stores-wordlift 0.6.1
llama-index vector_stores wordlift integration
Requires Python: <4.0,>=3.9

<picture>
  <img alt="#WordLift" width="200" src="https://wordlift.io/wp-content/uploads/2022/12/logo.svg" style="margin-bottom: 25px;">
</picture>

# LlamaIndex Vector_Stores Integration: WordLift

WordLift is an AI-powered SEO platform. With our AI we build your own knowledge graph for your business with entities marked up by the different topics, categories and regions. Using this graph, search engines will be able to understand the structure of your content faster and more precisely. To access a WordLift key and unlock our AI-powered SEO tools, visit [WordLift](https://wordlift.io/).

This integration enables the use of WordLift as a vector store for LlamaIndex, allowing you to work with your knowledge graph directly from your codebase.

## Features

- Perform retrieval-augmented generation (RAG) using your knowledge graph data directly in your codebase.
- Add new nodes and search within your knowledge graph effortlessly.

## Usage

Please refer to the [notebook](./examples/wordlift_vector_store_demo.ipynb) for usage of WordLift as vector store in LlamaIndex.

WordLift Knowledge Graphs are built on the principles of fully Linked Data, where each entity is assigned a permanent dereferentiable URI.\
When adding nodes to an existing Knowledge Graph, it's essential to include an "entity_id" in the metadata of each loaded document.\
For further insights into Fully Linked Data, explore these resources:
[W3C Linked Data](https://www.w3.org/DesignIssues/LinkedData.html),
[5 Star Data](https://5stardata.info/en/).
llama-index-storage-docstore-azure 0.4.1
llama-index docstore Azure integration
Requires Python: <4.0,>=3.9

# LlamaIndex Docstore Integration: Azure Table Storage

`AzureDocumentStore` allows you to use any compatible Azure Table Storage or CosmosDB as a document store for LlamaIndex.

## Installation

Before using the `AzureDocumentStore`, ensure you have Python installed and then proceed to install the required packages:

```bash
pip install llama-index-storage-docstore-azure
pip install azure-data-tables
pip install azure-identity  # Only needed for AAD token authentication
```

## Initializing `AzureDocumentStore`

`AzureDocumentStore` can be initialized in several ways depending on the authentication method and the Azure service (Table Storage or Cosmos DB) you are using:

### 1. Using a Connection String

```py
from llama_index.storage.docstore.azure import AzureDocumentStore
from llama_index.storage.kvstore.azure.base import ServiceMode

store = AzureDocumentStore.from_connection_string(
    connection_string="your_connection_string_here",
    namespace="your_namespace",
    service_mode=ServiceMode.STORAGE,  # or ServiceMode.COSMOS
)
```

### 2. Using Account Name and Key

```py
store = AzureDocumentStore.from_account_and_key(
    account_name="your_account_name",
    account_key="your_account_key",
    service_mode=ServiceMode.STORAGE,  # or ServiceMode.COSMOS
)
```

### 3. Using SAS Token

```py
store = AzureDocumentStore.from_sas_token(
    endpoint="your_endpoint",
    sas_token="your_sas_token",
    service_mode=ServiceMode.STORAGE,  # or ServiceMode.COSMOS
)
```

### 4. Using Azure Active Directory (AAD) Token

```py
store = AzureDocumentStore.from_aad_token(
    endpoint="your_endpoint",
    service_mode=ServiceMode.STORAGE,  # or ServiceMode.COSMOS
)
```

## End-to-end example:

```py
from llama_index.core import SimpleDirectoryReader, StorageContext
from llama_index.core.node_parser import SentenceSplitter
from llama_index.core import VectorStoreIndex, SimpleKeywordTableIndex

reader = SimpleDirectoryReader("./data/paul_graham/")
documents = reader.load_data()
nodes = SentenceSplitter().get_nodes_from_documents(documents)

storage_context = StorageContext.from_defaults(
    docstore=AzureDocumentStore.from_account_and_key(
        "your_account_name",
        "your_account_key",
        service_mode=ServiceMode.STORAGE,
    ),
)

vector_index = VectorStoreIndex(nodes, storage_context=storage_context)

storage_context.docstore.add_documents(nodes)
```
llama-index-llms-heroku 0.1.1
llama-index llms heroku managed inference integration
Requires Python: <4.0,>=3.9

# Heroku Managed Inference

The `llama-index-llms-heroku` package contains LlamaIndex integrations for building applications with models on Heroku's Managed Inference platform. This integration allows you to easily connect to and use AI models deployed on Heroku's infrastructure.

## Installation

```shell
pip install llama-index-llms-heroku
```

## Setup

### 1. Create a Heroku App

First, create an app in Heroku:

```bash
heroku create $APP_NAME
```

### 2. Create and Attach AI Models

Create and attach a chat model to your app:

```bash
heroku ai:models:create -a $APP_NAME claude-3-5-haiku
```

### 3. Export Configuration Variables

Export the required configuration variables:

```bash
export INFERENCE_KEY=$(heroku config:get INFERENCE_KEY -a $APP_NAME)
export INFERENCE_MODEL_ID=$(heroku config:get INFERENCE_MODEL_ID -a $APP_NAME)
export INFERENCE_URL=$(heroku config:get INFERENCE_URL -a $APP_NAME)
```

## Usage

### Basic Usage

```python
from llama_index.llms.heroku import Heroku
from llama_index.core.llms import ChatMessage, MessageRole

# Initialize the Heroku LLM
llm = Heroku()

# Create chat messages
messages = [
    ChatMessage(
        role=MessageRole.SYSTEM, content="You are a helpful assistant."
    ),
    ChatMessage(
        role=MessageRole.USER,
        content="What are the most popular house pets in North America?",
    ),
]

# Get response
response = llm.chat(messages)
print(response)
```

### Using Environment Variables

The integration automatically reads from environment variables:

```python
import os

# Set environment variables
os.environ["INFERENCE_KEY"] = "your-inference-key"
os.environ["INFERENCE_URL"] = "https://us.inference.heroku.com"
os.environ["INFERENCE_MODEL_ID"] = "claude-3-5-haiku"

# Initialize without parameters
llm = Heroku()
```

### Using Parameters

You can also pass parameters directly:

```python
import os

llm = Heroku(
    model=os.getenv("INFERENCE_MODEL_ID", "claude-3-5-haiku"),
    api_key=os.getenv("INFERENCE_KEY", "your-inference-key"),
    inference_url=os.getenv(
        "INFERENCE_URL", "https://us.inference.heroku.com"
    ),
    max_tokens=1024,
)
```

### Text Completion

```python
# Simple text completion
response = llm.complete("Explain the importance of open source LLMs")
print(response.text)
```

## Available Models

For a complete list of available models, see the [Heroku Managed Inference documentation](https://devcenter.heroku.com/articles/heroku-inference#available-models).

## Error Handling

The integration includes proper error handling for common issues:

- Missing API key
- Invalid inference URL
- Missing model configuration

## Additional Information

For more information about Heroku Managed Inference, visit the [official documentation](https://devcenter.heroku.com/articles/heroku-inference).
llama-index-node-parser-slide 0.2.1
llama-index node_parser slide node parser integration
Requires Python: <4.0,>=3.9

# LlamaIndex Node_Parser Integration: SlideNodeParser

Implements the SLIDE node parser described in the paper [SLIDE: Sliding Localized Information for Document Extraction](https://arxiv.org/abs/2503.17952), which introduces a chunking strategy that enriches segments with localized context from neighboring text. This improves downstream retrieval and question-answering tasks by preserving important contextual signals that might be lost with naive splitting.

`SlideNodeParser` implements a faithful adaptation of this technique using LLMs to generate a short context for each chunk based on its surrounding window.

Here's a summary of the method from the paper:

```
Traditional document chunking methods often truncate local context, weakening the semantic integrity of each chunk.
SLIDE introduces a sliding window approach that augments each chunk with a compact, LLM-generated summary of its surrounding context.

The process begins by greedily grouping sentences into base chunks based on a target token limit.
Then, for each chunk, a sliding window of neighboring chunks is selected (e.g., 5 before and after),
and the LLM is prompted to generate a brief context that situates the chunk within the overall document.

This context is then attached as metadata to each chunk, improving the quality of retrieval and generation tasks downstream, especially in Graph Retrieval Augmented generartion systems

Results from the research paper show that a single glean of the SlideNodeParser with default values (chunk_size=1200tokens, window_size=11) results in the identification of 37% more entities and relationships than standard Node Parsers
```

## Installation

```
pip install llama-index-node-parser-slide
```

## Usage

```python
from llama_index.core import Document
from llama_index.node_parser.slide import SlideNodeParser

# — Synchronous usage —
parser = SlideNodeParser.from_defaults(
    llm=llm,
    chunk_size=800,
    window_size=5,
)
nodes = parser.get_nodes_from_documents(
    [
        Document(text="document text 1"),
        Document(text="document text 2"),
    ]
)

# — Asynchronous usage (for parallel LLM calls) —
# Specify llm_workers > 1 to run multiple LLM calls concurrently
parser = SlideNodeParser.from_defaults(
    llm=llm,
    chunk_size=800,
    window_size=5,
    llm_workers=2,
)
nodes = await parser.aget_nodes_from_documents(
    [
        Document(text="document text 1"),
        Document(text="document text 2"),
    ]
)
```
llama-index-readers-macrometa-gdn 0.4.1
llama-index readers macrometa_gdn integration
Requires Python: <4.0,>=3.9
Keywords: macrometa

# Macrometa GDN Loader

```bash
pip install llama-index-readers-macrometa-gdn
```

This loader takes in a Macrometa federation URL, API key, and collection name and returns a list of vectors.

## Usage

To use this loader, you need to pass the URL and API key through the class constructor, and then load the data using an array of collection names.

```python
from llama_index.readers.macrometa_gdn import MacrometaGDNReader

collections = ["test_collection"]
loader = MacrometaGDNReader(url="https://api-macrometa.io", apikey="test")
vectors = loader.load_data(collection_list=collections)
```
llama-index-retrievers-vectorize 0.2.1
llama-index retrievers Vectorize.io integration
Requires Python: >=3.9
Keywords: llama-index, retrieval, search, vectorize

# LlamaIndex Retrievers Integration: Vectorize

> [Vectorize](https://vectorize.io/) RAG-as-a-Service handles the messy, hard parts of AI development,
> so you can focus on building your applications.

## Installation

```bash
pip install llama-index-retrievers-vectorize
```

### Usage

```python
from llama_index.retrievers.vectorize import VectorizeRetriever

retriever = VectorizeRetriever(
    api_token="...",
    organization="...",
    pipeline_id="...",
)
retriever.retrieve("query")
```
llama-index-tools-arxiv 0.4.1
llama-index tools arxiv integration
Requires Python: <4.0,>=3.9
Keywords: math, research, science

# ArXiv Search Tool

This tool connects to ArXiv and allows an Agent to search for recent papers and their summaries to retrieve recent information on mathematical and scientific information

## Usage

This tool has a more extensive example usage documented in a Jupyter notebook [here](https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/tools/llama-index-tools-arxiv/examples/arxiv.ipynb).

Here's an example usage of the ArxivToolSpec.

```python
from llama_index.tools.arxiv import ArxivToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

tool_spec = ArxivToolSpec()

agent = FunctionAgent(
    tools=tool_spec.to_tool_list(), llm=OpenAI(model="gpt-4.1")
)

await agent.run("What's going on with the superconductor lk-99")
await agent.run("what are the latest developments in machine learning")
```

`arxiv_query`: Search arXiv for results related to the query

This loader is designed to be used as a way to load data as a Tool in a Agent.