0.1.4 • Published 9 months ago

@richgoblinlabs/gadgetgpt-sdk v0.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

GadgetGPT SDK

Official TypeScript SDK for interacting with the GadgetGPT API..

Installation

npm install @richgoblinlabs/gadgetgpt-sdk

Usage

import GadgetGPTClient from "@richgoblinlabs/gadgetgpt-sdk";

const client = new GadgetGPTClient({
  apiKey: "your_api_key",
  userId: "your_user_id",
  baseUrl: "https://your-deployment-url.vercel.app", // Optional
});

// Send a message and return the response
const responseMessage = await client.sendMessage({
  conversationId: "conversation_id",
  message: "Hello, world!",
});

API Reference

Configuration

The GadgetGPTClient constructor accepts the following configuration options:

  • apiKey (required): Your GadgetGPT API key
  • userId (required): Your GadgetGPT user ID
  • baseUrl (optional): The base URL for API requests. Defaults to 'https://api.gadgetgpt.com'

Methods

sendMessage

Sends a message to a conversation and returns the updated chat history.

sendMessage(params: {
  conversationId: string;
  message: string;
}): Promise<ChatMessage[]>

License

MIT

0.1.4

9 months ago

0.1.3

9 months ago

0.1.2

9 months ago

0.1.1

9 months ago