0.1.5 • Published 9 months ago
@richgoblinlabs/goblinllm-sdk v0.1.5
GoblinLLM SDK
Official TypeScript SDK for interacting with the GoblinLLM API.
Installation
npm install @richgoblinlabs/goblinllm-sdkUsage
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 keyuserId(required): Your GoblinLLM user IDbaseUrl(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