3.1.2 • Published 2 years ago

@swiftwise.ai/sdk v3.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Swiftwise AI SDK

The Swiftwise AI SDK is a TypeScript library that provides an interface to interact with bespoke generative AI solutions. This SDK allows you to retrieve data, ingest data, and initialize the AI models.

Getting Started

To get started with the Swiftwise AI SDK, follow these steps:

Installation

First, install the SDK by running the following command:

npm install @swiftwise.ai/sdk

Initialization

To use the SDK, you need to initialize it with the required configuration. Here's an example of how to initialize the SDK:

import { SwiftWiseAPI, SwiftWiseConfig } from "@swiftwise.ai/sdk";

const config: SwiftWiseConfig = {
  clientId: "your-client-id",
  appId: "your-app-id",
  sessionId: "your-session-id",
  apiKey: "your-api-key",
  environment: "your-environment",
  debug: true,
};

const swiftWise = new SwiftWiseAPI(config);

Retrieving Data

To retrieve data from the AI models, you can use the retrieve method. It takes a RetrieverConfiguration object as input and returns a promise that resolves to an AxiosResponse containing the retrieved data or an error.

Here's an example of how to use the retrieve method:

const retrieverConfig = {
  prompt: "your-prompt",
  retrieverId: "your-retriever-id",
};

let retrieverResult = swiftWise.retrieve(retrieverConfig);

Ingesting Data

To ingest data into the AI models, you can use the ingest method. It takes an IngestionConfiguration object as input and returns a promise that resolves to an AxiosResponse containing the ingestion result or an error.

Here's an example of how to use the ingest method:

const ingestionConfig = {
  data: "your-data",
  datasourceId: "your-datasource-id",
};

let ingestionResult = await swiftWise.ingest(ingestionConfig);
3.0.4

2 years ago

3.1.2

2 years ago

3.0.3

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.1.3

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.1.17

2 years ago

1.1.16

2 years ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago