0.1.1 • Published 5 months ago

@aviaryhq/cloudglue-js v0.1.1

Weekly downloads
-
License
Elastic-2.0
Repository
github
Last release
5 months ago

Cloudglue JavaScript SDK

NPM Version License Discord

Cloudglue makes it easy to turn video into LLM ready data. Official JavaScript SDK for the Cloudglue API.

📖 Resources

By using this SDK, you agree to the Cloudglue Terms of Service and acknowledge our Privacy Policy.

Installation

npm install @aviaryhq/cloudglue-js

Quick Start

import { CloudGlue } from '@aviaryhq/cloudglue-js';

// Initialize the client
const client = new CloudGlue({
  apiKey: process.env.CLOUDGLUE_API_KEY
});

// List your video files
const response = await client.files.listFiles({ limit: 10 });

// Chat with a collection
const chatResponse = await client.chat.createCompletion({
  model: 'nimbus-001',
  messages: [
    { role: 'user', content: 'What are the key points discussed in these videos?' }
  ],
  // Assumes collection already exists, otherwise create one first then reference here by collection id 
  collections: ['your_collection_id'],
  include_citations: true,
  force_search: true
});

Configuration

The CloudGlue client accepts the following configuration options:

interface CloudGlueConfig {
  apiKey?: string;      // Your API key (can also use CLOUDGLUE_API_KEY env var)
  baseUrl?: string;     // Optional custom base URL
}

Development

Prerequisites

  • Node.js 16+
  • npm or yarn
  • Git (for spec submodule)

Setup

  1. Clone the repository:
git clone https://github.com/aviaryhq/cloudglue-js.git
cd cloudglue-js
  1. Initialize the spec submodule:
make submodule-init
  1. Install dependencies:
npm install
  1. Generate API clients:
npm run generate

Available Commands

  • make submodule-init: Initialize the OpenAPI spec submodule
  • make submodule-update: Update the OpenAPI spec submodule
  • npm run generate: Generate API clients from the spec
  • npm run build: Build the package
  • npm run clean: Clean build artifacts
  • npm run prepare: Build the package (used by npm)
  • npm run watch: Watch for changes and rebuild automatically (development)

Building

npm run build

This will: 1. Clean the previous build 2. Compile TypeScript files

Contact

0.1.1

5 months ago

0.1.0

5 months ago

0.0.17

5 months ago

0.0.16

5 months ago

0.0.15

5 months ago

0.0.14

5 months ago

0.0.13

5 months ago

0.0.12

5 months ago

0.0.11

6 months ago

0.0.10

6 months ago

0.0.9

6 months ago