open-index/open-npm huggingface dataset:
npm package: @langchain/pinecone
Description: LangChain integration for Pinecone's vector database
Author: Pinecone, Inc
Latest version: 1.0.1

# @langchain/pinecone

This package contains the LangChain.js integrations for Pinecone through their SDK.

## Installation

```bash npm2yarn
npm install @langchain/pinecone @langchain/core @pinecone-database/pinecone
```

## Development

To develop the Pinecone package, you'll need to follow these instructions:

### Install dependencies

```bash
pnpm install
```

### Build the package

```bash
pnpm build
```

Or from the repo root:

```bash
pnpm build --filter @langchain/pinecone
```

### Run tests

Test files should live within a `tests/` file in the `src/` folder. Unit tests should end in `.test.ts` and integration tests should
end in `.int.test.ts`:

```bash
$ pnpm test
$ pnpm test:int
```

### Lint & Format

Run the linter & formatter to ensure your code is up to standard:

```bash
pnpm lint && pnpm format
```

### Adding new entrypoints

If you add a new file to be exported, either import & re-export from `src/index.ts`, or add it to the `exports` field in the `package.json` file and run `pnpm build` to generate the new entrypoint.
npm package: @langchain/protocol
Description: TypeScript bindings for the LangChain agent streaming protocol
Latest version: 0.0.6

# `@langchain/protocol`

TypeScript bindings for the LangChain agent streaming protocol.

This package publishes the generated TypeScript schema bindings from
`protocol.cddl` so TypeScript applications can type protocol commands, events,
results, and content blocks consistently.

## What this package includes

- Generated TypeScript protocol bindings in `protocol.ts`
- Types for top-level messages such as `Command`, `Message`, and protocol events
- Types for protocol modules including session, subscription, resource,
  sandbox, input, state, and usage

## What this package does not include

This package does not currently ship a runtime client, transport, or helper APIs
such as `createSession()`. It is intended for typing protocol payloads and
generated bindings only.

## Installation

```bash
npm install @langchain/protocol
```

## Usage

Use type-only imports when consuming the protocol schema:

```ts
import type {
  Command,
  Message,
  SessionOpenParams,
  SubscribeParams,
  MessagesEvent,
} from "@langchain/protocol";
```

You can then use the exported types to model protocol payloads in your own
transport or client implementation:

```ts
import type { Command, SessionOpenParams } from "@langchain/protocol";

const params: SessionOpenParams = {
  protocolVersion: "0.3.0",
};

const openCommand: Command = {
  id: 1,
  method: "session.open",
  params,
};
```

## Versioning

The package version is aligned with the draft protocol schema version published
from this repository. The current generated bindings target protocol `0.3.0`.

## Source of truth

The canonical protocol definition lives in the repository root at
`protocol.cddl`. The TypeScript bindings in this package are generated from that
schema.
npm package: @langchain/qdrant
Description: LangChain.js integration for the Qdrant vector database
Author: LangChain
Latest version: 1.0.1

# @langchain/qdrant

This package contains the LangChain.js integration for the [Qdrant](https://qdrant.tech/) vector database.

## Installation

```bash
npm install @langchain/qdrant
```

## Development

To develop the this package, you'll need to follow these instructions:

### Install dependencies

```bash
pnpm install
```

### Build the package

```bash
pnpm build
```

Or from the repo root:

```bash
pnpm build --filter @langchain/qdrant
```

### Run tests

Test files should live within a `tests/` file in the `src/` folder. Unit tests should end in `.test.ts` and integration tests should
end in `.int.test.ts`:

```bash
$ pnpm test
$ pnpm test:int
```

### Lint & Format

Run the linter & formatter to ensure your code is up to standard:

```bash
pnpm lint && pnpm format
```

### Adding new entrypoints

If you add a new file to be exported, either import & re-export from `src/index.ts`, or add it to the `exports` field in the `package.json` file and run `pnpm build` to generate the new entrypoint.
npm package: @langchain/textsplitters
Description: Various implementations of LangChain.js text splitters
Author: LangChain
Latest version: 1.0.1

# 🦜✂️ @langchain/textsplitters

This package contains various implementations of LangChain.js text splitters, most commonly used as part of retrieval-augmented generation (RAG) pipelines.

## Installation

```bash npm2yarn
npm install @langchain/textsplitters @langchain/core
```

## Development

To develop the `@langchain/textsplitters` package, you'll need to follow these instructions:

### Install dependencies

```bash
pnpm install
```

### Build the package

```bash
pnpm build
```

Or from the repo root:

```bash
pnpm build --filter @langchain/textsplitters
```

### Run tests

Test files should live within a `tests/` file in the `src/` folder. Unit tests should end in `.test.ts` and integration tests should
end in `.int.test.ts`:

```bash
$ pnpm test
$ pnpm test:int
```

### Lint & Format

Run the linter & formatter to ensure your code is up to standard:

```bash
pnpm lint && pnpm format
```

### Adding new entrypoints

If you add a new file to be exported, either import & re-export from `src/index.ts`, or add it to the `exports` field in the `package.json` file and run `pnpm build` to generate the new entrypoint.
npm package: @langchain/together-ai
Description: Together AI integrations for LangChain.js
Author: LangChain
Latest version: 0.1.2

# @langchain/together-ai

This package contains the LangChain.js integrations for [Together AI](https://www.together.ai/).

## Installation

```bash npm2yarn
npm install @langchain/together-ai @langchain/core
```

This package, along with the main LangChain package, depends on [`@langchain/core`](https://npmjs.com/package/@langchain/core/). If you are using this package with other LangChain packages, make sure they all resolve to the same version of `@langchain/core`.

## Authentication

Set the `TOGETHER_AI_API_KEY` environment variable or pass `apiKey` to the constructor.

```bash
export TOGETHER_AI_API_KEY="your-api-key"
```

## Chat models

`ChatTogetherAI` is the recommended Together AI integration for chat and instruct models.

```typescript
import { ChatTogetherAI } from "@langchain/together-ai";
import { HumanMessage } from "@langchain/core/messages";

const model = new ChatTogetherAI({
  model: "meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo",
  temperature: 0,
});

const response = await model.invoke([new HumanMessage("Hello there!")]);
console.log(response.content);
```

## Embeddings

```typescript
import { TogetherAIEmbeddings } from "@langchain/together-ai";

const embeddings = new TogetherAIEmbeddings({
  model: "togethercomputer/m2-bert-80M-8k-retrieval",
});

const vector = await embeddings.embedQuery(
  "What would be a good company name for a colorful socks startup?"
);
console.log(vector.length);
```

## Legacy completions LLM

```typescript
import { TogetherAI } from "@langchain/together-ai";
import { PromptTemplate } from "@langchain/core/prompts";

const model = new TogetherAI({
  model: "togethercomputer/StripedHyena-Nous-7B",
});

const prompt = PromptTemplate.fromTemplate("Answer briefly: {input}");
const response = await prompt.pipe(model).invoke({
  input: "Tell me a joke about bears",
});

console.log(response);
```

For chat or instruct models, prefer `ChatTogetherAI` over the legacy `TogetherAI` completions class.

## Development

To develop the `@langchain/together-ai` package, follow these instructions:

### Install dependencies

```bash
pnpm install
```

### Build the package

```bash
pnpm build
```

Or from the repo root:

```bash
pnpm build --filter @langchain/together-ai
```

### Run tests

Test files should live within a `tests/` folder in the `src/` directory. Unit tests should end in `.test.ts` and integration tests should end in `.int.test.ts`:

```bash
pnpm test
pnpm test:int
pnpm test:standard:unit
```

### Lint & Format

```bash
pnpm lint && pnpm format
```

### Adding new entry points

If you add a new file to be exported, either import and re-export it from `src/index.ts`, or add it to the `exports` field in `package.json` and run `pnpm build` to generate the new entry point.
npm package: @langchain/turbopuffer
Description: LangChain.js integration for the turbopuffer vector database
Author: LangChain
Latest version: 0.2.0

# @langchain/turbopuffer

This package contains the LangChain.js integration for the [turbopuffer](https://turbopuffer.com/) vector database.

## Installation

```bash
npm install @langchain/turbopuffer @turbopuffer/turbopuffer
```

## Usage

```typescript
import { Turbopuffer } from "@turbopuffer/turbopuffer";
import { TurbopufferVectorStore } from "@langchain/turbopuffer";
import { OpenAIEmbeddings } from "@langchain/openai";

const client = new Turbopuffer({ apiKey: process.env.TURBOPUFFER_API_KEY });

const vectorStore = new TurbopufferVectorStore(new OpenAIEmbeddings(), {
  namespace: client.namespace("my-namespace"),
});

const ids = await vectorStore.addDocuments([
  { pageContent: "Hello world", metadata: { source: "greeting" } },
]);

const results = await vectorStore.similaritySearch("hello", 1);

await vectorStore.delete({ ids });
```

### Configuration

| Option           | Description                                   | Default             |
| ---------------- | --------------------------------------------- | ------------------- |
| `namespace`      | A configured turbopuffer `Namespace` instance | Required            |
| `distanceMetric` | `"cosine_distance"` or `"euclidean_squared"`  | `"cosine_distance"` |

### Add Options

| Option      | Description              | Default              |
| ----------- | ------------------------ | -------------------- |
| `ids`       | Custom IDs for documents | Auto-generated UUIDs |
| `batchSize` | Batch size for upserts   | `3000`               |

### Filtering

```typescript
const results = await vectorStore.similaritySearch("query", 10, [
  "category",
  "Eq",
  "books",
]);
```

## Development

```bash
pnpm install
pnpm build
pnpm test
pnpm test:int
pnpm lint && pnpm format
```
npm package: @langchain/weaviate
Description: Weaviate integration for LangChain.js
Author: LangChain
Latest version: 1.0.1

# @langchain/weaviate

This package contains the LangChain.js integrations for Weaviate with the `weaviate-client` SDK.

## Installation

```bash npm2yarn
npm install @langchain/weaviate @langchain/core
```

## Vectorstore

This package adds support for Weaviate vectorstore.

To follow along with this example install the `@langchain/openai` package for their Embeddings model.

```bash
npm install @langchain/openai
```

Now set the necessary environment variables (or pass them in via the client object):

```bash
export WEAVIATE_SCHEME=
export WEAVIATE_HOST=
export WEAVIATE_API_KEY=
```

```typescript
import weaviate, { ApiKey } from "weaviate-client";
import { WeaviateStore } from "@langchain/weaviate";

// Weaviate SDK has a TypeScript issue so we must do this.
const client = (weaviate as any).client({
  scheme: process.env.WEAVIATE_SCHEME || "https",
  host: process.env.WEAVIATE_HOST || "localhost",
  apiKey: new ApiKey(process.env.WEAVIATE_API_KEY || "default"),
});

// Create a store and fill it with some texts + metadata
await WeaviateStore.fromTexts(
  ["hello world", "hi there", "how are you", "bye now"],
  [{ foo: "bar" }, { foo: "baz" }, { foo: "qux" }, { foo: "bar" }],
  new OpenAIEmbeddings(),
  {
    client,
    indexName: "Test",
    textKey: "text",
    metadataKeys: ["foo"],
  }
);
```

## Development

To develop the `@langchain/weaviate` package, you'll need to follow these instructions:

### Install dependencies

```bash
pnpm install
```

### Build the package

```bash
pnpm build
```

Or from the repo root:

```bash
pnpm build --filter @langchain/weaviate
```

### Run tests

Test files should live within a `tests/` file in the `src/` folder. Unit tests should end in `.test.ts` and integration tests should
end in `.int.test.ts`:

```bash
$ pnpm test
$ pnpm test:int
```

### Lint & Format

Run the linter & formatter to ensure your code is up to standard:

```bash
pnpm lint && pnpm format
```

### Adding new entrypoints

If you add a new file to be exported, either import & re-export from `src/index.ts`, or add it to the `exports` field in the `package.json` file and run `pnpm build` to generate the new entrypoint.