Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 1.19 KB

File metadata and controls

46 lines (31 loc) · 1.19 KB

Nebula OpenAPI TypeScript wrapper

This package is a thin OpenAPI wrapper for Nebula, our AI agent service.

Configuration

import { configure } from "@thirdweb-dev/nebula";

// call this once at the startup of your application
configure({
  secretKey: "<PROJECT_SECRET_KEY>",
});

You can also configure the client with a Thirdweb client instance:

import { configureWithClient } from "@thirdweb-dev/nebula";
import { twClient } from "./thirdwebClient";

// call this once at the startup of your application
configureWithClient(twClient);

Example Usage

import { getModels } from "@thirdweb-dev/nebula";

const models = await getModels();

You can also use this package on a client application (eg. NextJS) by retrieving the Nebula API client first.

import { getNebulaClient, getAgents } from "@thirdweb-dev/nebula";

// retrieve the Nebula auth token
const nebulaClient = getNebulaClient(authToken);

// pass the client inside the methods
const agentsResult = await getAgents({ client: nebulaClient });

This package was autogenerated from the Nebula openAPI spec using @hey-api/openapi-ts