0.1.8 • Published 7 months ago

@richgoblinlabs/goblinagent-sdk v0.1.8

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

GoblinAgent SDK

Official TypeScript SDK for interacting with the GoblinAgent API..

Installation

npm install @richgoblinlabs/goblinagent-sdk

Usage

import { GoblinAgentClient } from "@richgoblinlabs/goblinagent-sdk";

const client = new GoblinAgentClient({
  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 GoblinAgentClient constructor accepts the following configuration options:

  • apiKey (required): Your GoblinAgent API key
  • userId (required): Your GoblinAgent user ID
  • baseUrl (optional): The base URL for API requests. Defaults to 'https://goblin-agent.vercel.app'

Methods

sendPrompt

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

sendPrompt(params: {
  conversationId: string;
  prompt: string;
}): Promise<string>

License

MIT

0.1.8

7 months ago

0.1.7

7 months ago

0.1.6

7 months ago

0.1.5

8 months ago

0.1.4

8 months ago

0.1.3

8 months ago

0.1.2

8 months ago