open-index/open-npm huggingface dataset:
npm package: @llamaindex/autotool
Description: auto transpile your JS function to LLM Agent compatible
Latest version: 9.0.2
Deprecated: This package is deprecated and no longer maintained.

# @llamaindex/autotool

> Auto transpile your JS function to LLM Agent compatible

## Usage

First, Install the package

```shell
npm install @llamaindex/autotool
pnpm add @llamaindex/autotool
yarn add @llamaindex/autotool
```

Second, Add the plugin/loader to your configuration:

### Next.js

```javascript
import { withNext } from "@llamaindex/autotool/next";

/** @type {import('next').NextConfig} */
const nextConfig = {};

export default withNext(nextConfig);
```

### Node.js

```shell
node --import @llamaindex/autotool/node ./path/to/your/script.js
```

Third, add `"use tool"` on top of your tool file or change to `.tool.ts`.

```typescript
"use tool";

export function getWeather(city: string) {
  // ...
}
// ...
```

Finally, export a chat handler function to the frontend using `llamaindex` Agent

```typescript
"use server";

// imports ...

export async function chatWithAI(message: string): Promise<JSX.Element> {
  const agent = new OpenAIAgent({
    tools: convertTools("llamaindex"),
  });
  const uiStream = createStreamableUI();
  agent
    .chat({
      stream: true,
      message,
    })
    .then(async (responseStream) => {
      return responseStream.pipeTo(
        new WritableStream({
          start: () => {
            uiStream.append("\n");
          },
          write: async (message) => {
            uiStream.append(message.response.delta);
          },
          close: () => {
            uiStream.done();
          },
        }),
      );
    });
  return uiStream.value;
}
```

## License

MIT
npm package: @llamaindex/aws
Description: AWS package for LlamaIndexTS
Latest version: 0.0.121
Deprecated: This package is deprecated and no longer maintained.

# @llamaindex/aws

AWS package for LlamaIndexTS

## Current Features:

- Bedrock support for Amazon Nova models (Premier, Pro, Lite and Micro)
- Bedrock support for the Anthropic Claude Models including the latest Claude 4 (Sonnet and Opus)
- Bedrock support for the Meta LLama 2, 3, 3.1, 3.2 and 3.3 Models
- Meta LLama3.1 405b and Llama3.2 tool call support
- Meta 3.2 11B and 90B vision support
- Anthropic Claude models (Sonnet, Haiku, Opus) multimodal support
- Bedrock support for querying Knowledge Base
- Support for Bedrock Inference endpoints with regional models
- Bedrock: [Supported Regions and models for cross-region inference](https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html)

## Basic Usage

```ts
import { BEDROCK_MODELS, Bedrock } from "@llamaindex/aws";

Settings.llm = new Bedrock({
  model: BEDROCK_MODELS.ANTHROPIC_CLAUDE_3_HAIKU,
  region: "us-east-1", // can be provided via env AWS_REGION
  credentials: {
    accessKeyId: "...", // optional and can be provided via env AWS_ACCESS_KEY_ID
    secretAccessKey: "...", // optional and can be provided via env AWS_SECRET_ACCESS_KEY
  },
});
```

## LICENSE

MIT