open-index/open-npm huggingface dataset:
npm package: @pangeacyber/aws-sdk
Description: A wrapper around the AWS SDK's JavaScript BedrockRuntime Client.
Latest version: 0.1.0

# Pangea + AWS SDK for JavaScript BedrockRuntime Client

A wrapper around the AWS SDK's JavaScript BedrockRuntime Client that wraps the
it with Pangea AI Guard. Supports Node.js v22 and greater.

## Installation

```bash
npm install @pangeacyber/aws-sdk
```

## Usage

```typescript
import { ConverseCommand } from "@aws-sdk/client-bedrock-runtime";
import { PangeaBedrockRuntimeClient } from "@pangeacyber/aws-sdk";

const client = new PangeaBedrockRuntimeClient({
  region: "us-east-1",
  pangeaApiKey: process.env.PANGEA_API_KEY!,
});

const modelId = "anthropic.claude-3-5-sonnet-20240620-v1:0";

const userMessage =
  "Describe the purpose of a 'hello world' program in one line.";
const conversation = [
  {
    role: "user" as const,
    content: [{ text: userMessage }],
  },
];

const command = new ConverseCommand({
  modelId,
  messages: conversation,
  inferenceConfig: { maxTokens: 512, temperature: 0.5, topP: 0.9 },
});

try {
  const response = await client.send(command);

  const responseText = response.output?.message?.content?.[0].text;
  console.log(responseText);
} catch (err) {
  console.log(`ERROR: Can't invoke '${modelId}'. Reason: ${err}`);
  process.exit(1);
}
```
npm package: @pangeacyber/google-genai
Description: A wrapper around the Google GenAI JavaScript SDK
Latest version: 0.1.3

# Pangea + Google Gen AI SDK

A wrapper around the Google Gen AI SDK that wraps the Gemini API with
Pangea AI Guard. Supports Node.js v22 and greater.

## Installation

```bash
npm install @pangeacyber/google-genai
```

## Usage

```typescript
import { PangeaGoogleGenAI } from "@pangeacyber/google-genai";

const GEMINI_API_KEY = process.env.GEMINI_API_KEY!;
const PANGEA_API_KEY = process.env.PANGEA_API_KEY!;

const ai = new PangeaGoogleGenAI({
  apiKey: GEMINI_API_KEY,
  pangeaApiKey: PANGEA_API_KEY,
});

const response = await ai.models.generateContent({
  model: "gemini-2.0-flash-001",
  contents: "Why is the sky blue?",
});
console.log(response.text);
```

Note that AI Guard transformations on the LLM response are **not** applied
because the conversion from Gemini API output to Pangea AI Guard input is lossy.
npm package: @pangeacyber/openai
Description: A wrapper around the OpenAI TypeScript library that wraps the Responses API with Pangea AI Guard
Latest version: 0.1.0

# Pangea + OpenAI TypeScript API Library

A wrapper around the OpenAI TypeScript library that wraps the [Responses API](https://platform.openai.com/docs/api-reference/responses)
with Pangea AI Guard. Supports Node.js v22 and greater.

## Installation

```bash
npm install @pangeacyber/openai
```

## Usage

```typescript
import { PangeaOpenAI } from "@pangeacyber/openai";

const client = new PangeaOpenAI({
  apiKey: process.env.OPENAI_API_KEY,
  pangeaApiKey: process.env.PANGEA_API_KEY,
});

const response = await client.responses.create({
  model: "gpt-4o-mini",
  instructions: "You are a helpful assistant.",
  input: "Are semicolons optional in JavaScript?",
});

console.log(response.output_text);
```