0.1.5 • Published 9 months ago

@richgoblinlabs/goblinllm-sdk v0.1.5

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

GoblinLLM SDK

Official TypeScript SDK for interacting with the GoblinLLM API.

Installation

npm install @richgoblinlabs/goblinllm-sdk

Usage

import GoblinLLMClient from "@richgoblinlabs/goblinllm-sdk";

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

  • apiKey (required): Your GoblinLLM API key
  • userId (required): Your GoblinLLM user ID
  • baseUrl (optional): The base URL for API requests. Defaults to 'https://api.goblinllm.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.5

9 months ago

0.1.4

9 months ago

0.1.3

9 months ago

0.1.2

9 months ago