semvec/pypi-packages huggingface dataset:
llama-index-readers-remote 0.4.1
llama-index readers remote integration
Requires Python: <4.0,>=3.9
Keywords: gutenberg, hosted, url

# Remote Page/File Loader

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

This loader makes it easy to extract the text from any remote page or file using just its url. If there's a file at the url, this loader will download it temporarily and parse it using `SimpleDirectoryReader`. It is an all-in-one tool for (almost) any url.

As a result, any page or type of file is supported. For instance, if a `.txt` url such as a [Project Gutenberg book](https://www.gutenberg.org/cache/epub/69994/pg69994.txt) is passed in, the text will be parsed as is. On the other hand, if a hosted .mp3 url is passed in, it will be downloaded and parsed using `AudioTranscriber`.

## Usage

To use this loader, you need to pass in a `Path` to a local file. Optionally, you may specify a `file_extractor` for the `SimpleDirectoryReader` to use, other than the default one.

```python
from llama_index.readers.remote import RemoteReader

loader = RemoteReader()
documents = loader.load_data(
    url="https://en.wikipedia.org/wiki/File:Example.jpg"
)
```

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

# LlamaIndex Readers Integration: Quip

## Overview

The Quip Reader enables loading data from Quip documents. It constructs queries to retrieve thread content based on thread IDs.

### Installation

You can install the Quip Reader via pip:

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

### Usage

```python
from llama_index.readers.quip import QuipReader

# Initialize QuipReader
reader = QuipReader(access_token="<Access Token>")

# Load data from Quip
documents = reader.load_data(thread_ids=["<Thread ID 1>", "<Thread ID 2>"])
```

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-indices-managed-vertexai 0.3.1
llama-index managed Vertex AI integration
Requires Python: <4.0,>=3.9

# LlamaIndex Managed Integration: Vertex AI

[LlamaIndex on Vertex AI for RAG](https://cloud.google.com/vertex-ai/generative-ai/docs/llamaindex-on-vertexai) is a managed RAG service on Google Cloud Vertex AI.

Refer to the [official documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/llamaindex-on-vertexai) and [API reference](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/rag-api) for more information.
llama-index-packs-ollama-query-engine 0.5.1
llama-index packs ollama_query_engine integration
Requires Python: <4.0,>=3.9
Keywords: engine, index, local, ollama, query

# Ollama Query Engine Pack

Create a query engine using completely local by Ollama

## CLI Usage

You can download llamapacks directly using `llamaindex-cli`, which comes installed with the `llama-index` python package:

```bash
llamaindex-cli download-llamapack OllamaQueryEnginePack --download-dir ./ollama_pack
```

You can then inspect the files at `./ollama_pack` and use them as a template for your own project.

## Code Usage

You can download the pack to a the `./ollama_pack` directory:

```python
from llama_index.core.llama_pack import download_llama_pack

# download and install dependencies
OllamaQueryEnginePack = download_llama_pack(
    "OllamaQueryEnginePack", "./ollama_pack"
)

# You can use any llama-hub loader to get documents!
ollama_pack = OllamaQueryEnginePack(model="llama2", documents=documents)
```

From here, you can use the pack, or inspect and modify the pack in `./ollama_pack`.

The `run()` function is a light wrapper around `index.as_query_engine().query()`.

```python
response = ollama_pack.run("What is the title of the book of John?")
```

You can also use modules individually.

```python
# Use the llm
llm = ollama_pack.llm
response = llm.complete("What is Ollama?")

# Use the index directly
index = ollama_pack.index
query_engine = index.as_query_engine()
retriever = index.as_retriever()
```
llama-index-vector-stores-mariadb 0.4.1
llama-index vector_stores mariadb integration
Requires Python: <4.0,>=3.9

# LlamaIndex Vector_Stores Integration: MariaDB

Starting with version `11.7.1`, the MariaDB relational database has vector search functionality integrated.
Thus now it can be used as a fully-functional vector store in LlamaIndex.

To learn more about the feature in MariaDB, check its [Vector Overview documentation](https://mariadb.com/kb/en/vector-overview/).

Please note that versions before `0.3.0` of this package are not compatible with MariaDB 11.7 and later.
They are compatible only with the one-off `MariaDB 11.6 Vector` preview release which used a slightly different syntax.

## Installation

```shell
pip install llama-index-vector-stores-mariadb
```

## Usage

```python
from llama_index.vector_stores.mariadb import MariaDBVectorStore

vector_store = MariaDBVectorStore.from_params(
    host="localhost",
    port=3306,
    user="llamaindex",
    password="password",
    database="vectordb",
    table_name="llama_index_vectorstore",
    embed_dim=1536,  # OpenAI embedding dimension
    default_m=6,  # MariaDB Vector system parameter
    ef_search=20,  # MariaDB Vector system parameter
)
```

## Development

### Running Integration Tests

A suite of integration tests is available to verify the MariaDB vector store integration.
The test suite needs a MariaDB database with vector search support up and running. If not found, the tests are skipped.
To facilitate that, a sample `docker-compose.yaml` file is provided, so you can simply do:

```shell
docker compose -f tests/docker-compose.yaml up

pytest -v

# Clean up when you finish testing
docker compose -f tests/docker-compose.yaml down
```
llama-index-packs-panel-chatbot 0.4.1
llama-index packs panel_chatbot integration
Requires Python: <4.0,>=3.9
Keywords: chatbot, github, index, openai, panel

# 🦙 Panel ChatBot Pack

Build a chatbot to talk to your Github repository.

Powered by LlamaIndex, OpenAI ChatGPT and [HoloViz Panel](https://panel.holoviz.org/reference/chat/ChatInterface.html).

![Panel Chat Bot](https://raw.githubusercontent.com/run-llama/llama-hub/main/llama_hub/llama_packs/panel_chatbot/panel_chatbot.png)

## 💁‍♀️ Explanation

This template

- Downloads and indexes a Github repository using the `llama_index` [`GithubRepositoryReader`](https://llamahub.ai/l/github_repo). The default repository is [holoviz/panel](https://github.com/holoviz/panel).
- Creates a [VectorStoreIndex](https://docs.llamaindex.ai/en/stable/changes/deprecated_terms.html#VectorStoreIndex) powered chat engine that will retrieve context from that data to respond to each user query.
- Creates a Panel [`ChatInterface`](https://panel.holoviz.org/reference/chat/ChatInterface.html) UI that will stream each answer from the chat engine.

## 🖥️ CLI Usage

You can download llamapacks directly using `llamaindex-cli`, which comes installed with the `llama-index` Python package:

```bash
pip install llama-index
llamaindex-cli download-llamapack PanelChatPack --download-dir ./panel_chat_pack
```

You can then inspect the files in the `panel_chat_pack` folder and use them as a template for your own project!

To run the app directly, use in your terminal:

```bash
export OPENAI_API_KEY="sk-..."
export GITHUB_TOKEN='...'
panel serve ./panel_chat_pack/base.py
```

As an alternative to `panel serve`, you can run

```bash
python ./panel_chat_pack/base.py
```

## 🎓 Learn More

- [`GithubRepositoryReader`](https://llamahub.ai/l/github_repo)
- [`VectorStoreIndex`](https://docs.llamaindex.ai/en/stable/changes/deprecated_terms.html#VectorStoreIndex)
- [Panel Chat Components](https://panel.holoviz.org/reference/index.html#chat)
- [Panel Chat Examples](https://github.com/holoviz-topics/panel-chat-examples)

## 👍 Credits

- [Marc Skov Madsen](https://twitter.com/MarcSkovMadsen) for creating the template
- [Sophia Yang](https://twitter.com/sophiamyang) for creating the cute LLama image.

## 📈 Potential Improvements

- [ ] Improved Multi-user support
  - [ ] Loading queue: Users should not be able to download the same repository at the same time.
- [ ] Service Context
  - [ ] Enable users to define the service context including `model`, `temperature` etc.
- [ ] Better loading experience
  - [ ] Let the chat assistant show (more fine-grained) status messages. And provide more status changes
- [ ] Focus on the streaming text
  - [ ] The streaming text is not always in focus. I believe its a matter of adjusting the `auto_scroll_limit` limit.
- [ ] Fix minor CSS issues
  - [ ] See the `CSS_FIXES_TO_BE_UPSTREAMED_TO_PANEL` variable in the code
- [ ] Repo Manager
  - [ ] Support using multiple repos. For example the full HoloViz suite
llama-index-llms-huggingface 0.6.1
llama-index llms huggingface integration
Requires Python: <4.0,>=3.9

# LlamaIndex Llms Integration: Huggingface

## Installation

1. Install the required Python packages:

   ```bash
   %pip install llama-index-llms-huggingface
   %pip install llama-index-llms-huggingface-api
   !pip install "transformers[torch]" "huggingface_hub[inference]"
   !pip install llama-index
   ```

2. Set the Hugging Face API token as an environment variable:

   ```bash
   export HUGGING_FACE_TOKEN=your_token_here
   ```

## Usage

### Import Required Libraries

```python
import os
from typing import List, Optional
from llama_index.llms.huggingface import HuggingFaceLLM
from llama_index.llms.huggingface_api import HuggingFaceInferenceAPI
```

### Run a Model Locally

To run the model locally on your machine:

```python
locally_run = HuggingFaceLLM(model_name="HuggingFaceH4/zephyr-7b-alpha")
```

### Run a Model Remotely

To run the model remotely using Hugging Face's Inference API:

```python
HF_TOKEN: Optional[str] = os.getenv("HUGGING_FACE_TOKEN")
remotely_run = HuggingFaceInferenceAPI(
    model_name="HuggingFaceH4/zephyr-7b-alpha", token=HF_TOKEN
)
```

### Anonymous Remote Execution

You can also use the Inference API anonymously without providing a token:

```python
remotely_run_anon = HuggingFaceInferenceAPI(
    model_name="HuggingFaceH4/zephyr-7b-alpha"
)
```

### Use Recommended Model

If you do not provide a model name, Hugging Face's recommended model is used:

```python
remotely_run_recommended = HuggingFaceInferenceAPI(token=HF_TOKEN)
```

### Generate Text Completion

To generate a text completion using the remote model:

```python
completion_response = remotely_run_recommended.complete("To infinity, and")
print(completion_response)
```

### Set Global Tokenizer

If you modify the LLM, ensure you change the global tokenizer to match:

```python
from llama_index.core import set_global_tokenizer
from transformers import AutoTokenizer

set_global_tokenizer(
    AutoTokenizer.from_pretrained("HuggingFaceH4/zephyr-7b-alpha").encode
)
```

### LLM Implementation example

https://docs.llamaindex.ai/en/stable/examples/llm/huggingface/
llama-index-tools-ionic-shopping 0.4.1
llama-index tools ionic shopping integration
Requires Python: <4.0,>=3.9

# LlamaIndex Tools Integration: Ionic Shopping

```bash
pip install llama-index-tools-ionic-shopping
```

[Ionic](https://ioniccommerce.com) is a plug and play ecommerce marketplace for AI Assistants.
By including the Ionic Tool in your agent, you are effortlessly providing your users with the ability
to shop and transact directly within your agent, and you’ll get a cut of the transaction.

## Attribution

Llearn more about how [Ionic attributes sales](https://docs.ioniccommerce.com/guides/attribution)
to your agent. Provide your Ionic API Key when instantiating the tool:

```python
from llama_index.tools.ionic_shopping import IonicShoppingToolSpec

ionic_tool = IonicShoppingToolSpec(api_key="<my Ionic API Key>").to_tool_list()
```

## Usage

Try it out using the [Jupyter notebook](https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/tools/llama-index-tools-ionic-shopping/examples/ionic_shopping.ipynb).

```python
import openai
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
from llama_index.tools.ionic_shopping import IonicShoppingToolSpec

openai.api_key = "sk-api-key"

ionic_tool = IonicShoppingToolSpec(api_key="<my Ionic API Key>").to_tool_list()

agent = FunctionAgent(
    tools=ionic_tool,
    llm=OpenAI(model="gpt-4.1"),
)

print(
    await agent.run(
        "I'm looking for a 5k monitor can you find me 3 options between $600 and $1000"
    )
)
```

`query`: used to search for products and to get product recommendations

Your users can use natural language to specify how many results they would like to see
and what their budget is.

For more information on setting up your Agent with Ionic, see the [Ionic documentation](https://docs.ioniccommerce.com).
llama-index-tools-graphql 0.4.1
llama-index tools graphql integration
Requires Python: <4.0,>=3.9

# GraphQL Tool

This tool provides agents the ability to easily execute GraphQL queries against a server. The tool can be initialized with the server url and any required headers and thereafter perform queries against the server

## 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-graphql/examples/graphql.ipynb)

Here's an example usage of the GraphQLToolSpec.

This tool works best when the Agent has access to the GraphQL schema for the server. See [here](https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/tools/llama-index-tools-shopify/examples/shopify.ipynb) for an example of using a tool with a file loader to create even more powerful Agents.

```python
from llama_index.tools.graphql import GraphQLToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

tool_spec = GraphQLToolSpec(
    url="https://spacex-production.up.railway.app/",
    headers={
        "content-type": "application/json",
    },
)

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

await agent.run(
    "get the id, model, name and type of the Ships from the graphql endpoint"
)
```

`graphql_request`: Runs a GraphQL query against the configured server

This loader is designed to be used as a way to load data as a Tool in a Agent.
llama-index-readers-wordpress 0.4.1
llama-index readers wordpress integration
Requires Python: <4.0,>=3.9
Keywords: blog, wordpress

# Wordpress Loader

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

This loader fetches the text from Wordpress blog posts using the Wordpress API. It also uses the BeautifulSoup library to parse the HTML and extract the text from the articles.

## Usage

To use this loader, you need to pass base url of the Wordpress installation
(e.g. `https://www.mysite.com`) and optionally a username, and an application
password for the user (more about application passwords
[here](https://www.paidmembershipspro.com/create-application-password-wordpress/))

```python
from llama_index.readers.wordpress import WordpressReader

loader = WordpressReader(
    url="https://www.mysite.com",
    username="my_username",
    password="my_password",
)
documents = loader.load_data()
```

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

## Pages and Posts

Be default, the loader retrieves both Wordpress _pages_ (static content) and
_posts_ (blog entries) from the target site. This behavior can be configured
by setting `get_pages=False` or `get_posts=False` when initializing the
`WordpressReader` object.

## Additional Custom Post types

To scrape additional custom endpoints beside _posts_ and _pages_, you can specify `additional_post_types` as a comma-separated list (e.g., `additional_post_types="custom-pages,custom-posts"`) when initializing the `WordpressReader` object.

```python
from llama_index.readers.wordpress import WordpressReader

loader = WordpressReader(
    url="https://www.mysite.com",
    username="my_username",
    password="my_password",
    additional_post_types="webiners,podcasts",
)
documents = loader.load_data()
```
llama-index-readers-readwise 0.4.1
llama-index readers readwise integration
Requires Python: <4.0,>=3.9
Keywords: highlights, pkm, reading, readwise

# Readwise Reader

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

Use Readwise's export API to fetch your highlights from web articles, epubs, pdfs, Kindle, YouTube, and load the resulting text into LLMs.

## Setup

1. Get your Readwise API key from [readwise.io/access_token](https://readwise.io/access_token).

## Usage

Here is an example usage of the Readwise Reader:

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

from llama_index.readers.readwise import ReadwiseReader

token = os.getenv("READWISE_API_KEY")
loader = ReadwiseReader(api_key=token)
documents = loader.load_data()
index = VectorStoreIndex.from_documents(documents)

index.query("What was the paper 'Attention is all you need' about?")
```

You can also query for highlights that have been created after a certain time:

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

from llama_index.readers.readwise import ReadwiseReader

token = os.getenv("READWISE_API_KEY")
loader = ReadwiseReader(api_key=token)
seven_days_ago = datetime.datetime.now() - datetime.timedelta(days=7)
documents = loader.load_data(updated_after=seven_days_ago)
index = VectorStoreIndex.from_documents(documents)

index.query("What has Elon Musk done this time?")
```

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

# LlamaIndex Llms Integration: Aliyun-PaiEas

The `llama-index-llms-paieas` package contains LlamaIndex integrations building applications with models on
[Aliyun PAI-EAS(Elastic Algorithm Service)](https://www.alibabacloud.com/help/en/pai/user-guide/purchase-and-configure-eas-resource-groups/) ([Chinese Version](https://help.aliyun.com/zh/pai/user-guide/overview-2?spm=5176.28273668.J_3928357510.5.4ec51c6fowCIrH))LLM inference service.

The Elastic Algorithm Service (EAS) is a model online service platform that allows you to deploy models as online reasoning services or AI-Web applications with one click. It provides functions such as elastic scaling and blue-green deployment, which can support you to obtain high-concurrency and stable online algorithm model services at a lower resource cost. In addition, EAS also provides functions such as resource group management, version control, and resource monitoring, which facilitates you to apply model services to your business. EAS is suitable for a variety of AI reasoning scenarios such as real-time synchronous reasoning and near-real-time asynchronous reasoning, and has the capabilities of a complete operation and maintenance monitoring system.

# PAI EAS's LLM Service

This example goes over how to use LlamaIndex to interact with and develop LLM-powered systems using the PAI-EAS LLM service endpoints.

With this endpoint, you'll be able to connect to various open-source LLM, such as:

- Tongyi's [qwen](https://huggingface.co/Qwen)
- Google's [gemma-7b](https://build.nvidia.com/google/gemma-7b)
- Mistal AI's [mistral-7b-instruct-v0.2](https://build.nvidia.com/mistralai/mistral-7b-instruct-v2)
- And more!

## Installation

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

## Setup

**To get started:**

1. Create a free account with [Aliyun PAI EAS](https://common-buy.aliyun.com/?spm=5176.28273668.J_3928357510.3.4ec51c6fowCIrH&commodityCode=learn_EasDedicatedPostpay_public_cn) and login.

2. Refer the guide(https://help.aliyun.com/zh/pai/use-cases/deploy-llm-in-eas?spm=a2c4g.11186623.0.0.63de3c57Ef3r3C#f3ef8927ec4l2), on the EAS page, click Deploy LLM Service.

3. Under the Basic Information, on the Public Address Call tab, click View Call Information, and get the service token `PAIEAS_API_KEY` and access address `PAIEAS_API_BASE`.

4. Copy and save the service token as `PAIEAS_API_KEY` and access address as `PAIEAS_API_BASE`.

```python
import os

os.environ["PAIEAS_API_KEY"] = your_service_token
os.environ["PAIEAS_API_BASE"] = your_access_address
```

## Working with API Catalog

```python
from llama_index.llms.paieas import PaiEas
from llama_index.core.llms import ChatMessage, MessageRole

llm = PaiEas()

messages = [
    ChatMessage(
        role=MessageRole.SYSTEM, content=("You are a helpful assistant.")
    ),
    ChatMessage(
        role=MessageRole.USER,
        content=("What is Alibaba Cloud?"),
    ),
]

llm.chat(messages)
```
llama-index-readers-deeplake 0.4.1
llama-index readers deeplake integration
Requires Python: <4.0,>=3.9
Keywords: deeplake

# LlamaIndex Readers Integration: Deeplake

## Overview

DeepLake Reader is a tool designed to retrieve documents from existing DeepLake datasets efficiently.

### Installation

You can install DeepLake Reader via pip:

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

To use Deeplake Reader, you must have an API key. Here are the [installation instructions](https://docs.activeloop.ai/storage-and-credentials/user-authentication)

## Usage

```python
from llama_index.core.schema import Document
from llama_index.readers.deeplake import DeepLakeReader

# Initialize DeepLakeReader with the token
reader = DeepLakeReader(token="<Your DeepLake Token>")

# Load data from DeepLake
documents = reader.load_data(
    query_vector=[0.1, 0.2, 0.3],  # Query vector
    dataset_path="<Path to Dataset>",  # Path to the DeepLake dataset
    limit=4,  # Number of results to return
    distance_metric="l2",  # Distance metric
)
```

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-mlx 0.4.1
llama-index llms mlx integration
Requires Python: <4.0,>=3.9

# LlamaIndex Llms Integration: MLX

## Overview

---

Integrate with MLX LLMs from the mlx-lm library

## Installation

---

```bash
pip install llama-index-llms-mlx
```

## Example

---

```python
from llama_index.llms.mlx import MLXLLM

llm = MLXLLM(
    model_name="microsoft/phi-2",
    context_window=3900,
    max_new_tokens=256,
    generate_kwargs={"temp": 0.7, "top_p": 0.95},
)

response = llm.complete("What is the meaning of life?")
print(str(response))
```
llama-index-indices-managed-bge-m3 0.6.1
llama-index managed indices bge-m3 integration
Requires Python: <4.0,>=3.9

# LlamaIndex Indices Integration: Bge-M3

## Setup

```
pip install -U llama-index-indices-managed-bge-m3
```

## Usage

```python
from llama_index.indices.managed.bge_m3 import BGEM3Index

index = BGEM3Index.from_documents(
    documents, weights_for_different_modes=[0.4, 0.2, 0.4]
)
retriever = index.as_retriever()
```