open-index/open-npm huggingface dataset:
npm package: @llamaindex/llama-deploy
Description: Generated llama-deploy API client from OpenAPI specification
Latest version: 0.0.2

# @llamaindex/llama-deploy

This package provides a TypeScript llama-deploy API client generated from the OpenAPI specification using `@hey-api/openapi-ts`.

## Installation

```bash
npm install @llamaindex/llama-deploy
```

## Development

### Generate llama-deploy API client

To generate the llama-deploy API client from the OpenAPI specification:

```bash
npm run generate
```

This will read the OpenAPI JSON file from `../chat-ui/src/hook/openapi.json` and generate TypeScript client code in `src/generated/`.

### Build

To build the package:

```bash
npm run build
```

This will run the generator and compile TypeScript to the `dist/` directory.

### Clean

To clean generated files:

```bash
npm run clean
```

## Usage

```typescript
import { client, DeploymentsService } from '@llamaindex/llama-deploy'

// Configure the client
client.setConfig({
  baseUrl: 'https://your-api-base-url.com',
})

// Use the API services
const deployments = await DeploymentsService.readDeploymentsDeploymentsGet()
```

## API Services

The generated client includes services for:

- **DeploymentsService**: Manage deployments
- **TasksService**: Create and manage tasks
- **SessionsService**: Handle sessions
- **EventsService**: Stream and send events

## Generated Files

The following files are generated and should not be edited manually:

- `src/generated/client.ts` - HTTP client configuration
- `src/generated/services.ts` - API service methods
- `src/generated/types.ts` - TypeScript type definitions
- `src/generated/index.ts` - Main exports

## Configuration

The generation is configured in `openapi-ts.config.ts`. Key settings:

- **Input**: `../chat-ui/src/hook/openapi.json`
- **Output**: `./src/generated`
- **Client**: `@hey-api/client-fetch`
- **Format**: Prettier formatting applied
npm package: @llamaindex/mcp-server-llamacloud
Description: A MCP server connecting to a managed index on LlamaCloud
Author: LlamaIndex Inc.
Latest version: 0.1.3

# LlamaCloud MCP Server

A MCP server connecting to multiple managed indexes on [LlamaCloud](https://cloud.llamaindex.ai/)

This is a TypeScript-based MCP server that creates multiple tools, each connected to a specific managed index on LlamaCloud. Each tool is defined through command-line arguments.

<a href="https://glama.ai/mcp/servers/o4fcj7x2cg"><img width="380" height="200" src="https://glama.ai/mcp/servers/o4fcj7x2cg/badge" alt="LlamaCloud Server MCP server" /></a>

## Features

### Tools

- Creates a separate tool for each index you define
- Each tool provides a `query` parameter to search its specific index
- Auto-generates tool names like `get_information_index_name` based on index names

## Installation

To use with your MCP Client (e.g. Claude Desktop, Windsurf or Cursor), add the following config to your MCP client config:

The `LLAMA_CLOUD_PROJECT_NAME` environment variable is optional and defaults to `Default` if not set.

```json
{
  "mcpServers": {
    "llamacloud": {
      "command": "npx",
      "args": [
        "-y",
        "@llamaindex/mcp-server-llamacloud",
        "--index",
        "10k-SEC-Tesla",
        "--description",
        "10k SEC documents from 2023 for Tesla",
        "--topK",
        "5",
        "--index",
        "10k-SEC-Apple",
        "--description",
        "10k SEC documents from 2023 for Apple"
      ],
      "env": {
        "LLAMA_CLOUD_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}
```

For Claude, the MCP config can be found at:

- On MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- On Windows: `%APPDATA%/Claude/claude_desktop_config.json`

### Tool Definition Format

In the `args` array of the MCP config, you can define multiple tools by providing pairs of `--index` and `--description` arguments. Each pair defines a new tool. You can also optionally specify `--topK` to limit the number of results.

For example:

```bash
--index "10k-SEC-Tesla" --description "10k SEC documents from 2023 for Tesla" --topK 5
```

Adds a tool for the `10k-SEC-Tesla` LlamaCloud index to the MCP server. In this example, it's configured to return the top 5 results.

## Development

Install dependencies:

```bash
npm install
```

Build the server:

```bash
npm run build
```

For development with auto-rebuild:

```bash
npm run watch
```

To use the development version, replace in your MCP config `npx @llamaindex/mcp-server-llamacloud` with `node ./build/index.js`.

### Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector), which is available as a package script:

```bash
npm run inspector
```

The Inspector will provide a URL to access debugging tools in your browser.
npm package: @llamaindex/pdf-viewer
Description: React PDF viewer for LLM applications
Latest version: 1.3.0

# PDF viewer for RAG applications

PDF viewer component as used by [secinsights](https://github.com/run-llama/sec-insights). Using [react-pdf](https://github.com/wojtekmaj/react-pdf).

## Installation

```bash
npm install @llamaindex/pdf-viewer
```

## Usage

```jsx
import React from 'react';

import '@llamaindex/pdf-viewer/index.css';
import { PDFViewer, PdfFocusProvider } from '@llamaindex/pdf-viewer';

const file = {
  id: 'sample-document',
  url: 'https://d687lz8k56fia.cloudfront.net/sec-edgar-filings/0001045810/10-Q/0001045810-22-000147/filing-details.pdf',
};

function App() {
  return (
    <div className="AppContainer">
      <PdfFocusProvider>
        <PDFViewer file={file} />
      </PdfFocusProvider>
    </div>
  );
}
```

## Custom Styles

```jsx
<PdfFocusProvider>
  <PDFViewer containerClassName="your-container-class-name" file={file} />
</PdfFocusProvider>
```

## Multiple PDF Files

```jsx
<PdfFocusProvider>
  <div className="your-layout-class-name">
    <PDFViewer file={file1} />
    <PDFViewer file={file2} />
    <PDFViewer file={file3} />
  </div>
</PdfFocusProvider>
```

## Next.js

NextJs applications may need to update their configuration to be compatible with react-pdf v9 and pdfjs v4
If you have issues related to canvas, you can add the following to your `next.config.js`:

```diff
module.exports = {
+ webpack: (config) => {
+   config.resolve.alias.canvas = false;

+   return config;
+ },
}
```

Another common issue is: `TypeError: Promise.withResolvers is not a function`
To fix this issue, you need to use dynamic imports for the PDF component (to indicate to NextJs to use it for client-side rendering only).

```diff
- import { PDFViewer, PdfFocusProvider } from "@llamaindex/pdf-viewer";

+ import dynamic from "next/dynamic";

+ // Dynamic imports for client-side rendering only
+ const PDFViewer = dynamic(
+   () => import("@llamaindex/pdf-viewer").then((module) => module.PDFViewer),
+   { ssr: false },
+ );

+ const PdfFocusProvider = dynamic(
+   () =>
+     import("@llamaindex/pdf-viewer").then((module) => module.PdfFocusProvider),
+   { ssr: false },
+ );
```

## Contributing

When making changes to this project, please follow these steps:

1. Make your code changes
2. Create a changeset to document your changes:
   ```bash
   yarn changeset
   ```
3. Commit your changes and the changeset
4. When ready to release a new version:
   ```bash
   yarn new-version
   ```
5. To publish the new version:
   ```bash
   yarn release
   ```

## 🙏 Thanks

Thanks to the developers of the following dependencies that we're using:

- [react-pdf](https://github.com/wojtekmaj/react-pdf)
- @wojtekmaj/react-hooks
- react-window
- react-intersection-observer
- lodash
- fuse.js