@butlerbot/sdk 0.0.1-alpha1 → 0.0.1-alpha2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -21,4 +21,4 @@ export declare class ButlerBotClient {
21
21
  /** Spawns a new Conversation, inherits api key and server URL */
22
22
  createConversation(config?: OptionalApiKey<ConversationOptions>): Conversation;
23
23
  }
24
- export {};
24
+ export { Conversation, ConversationOptions };
package/dist/index.js CHANGED
@@ -9,9 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ButlerBotClient = void 0;
12
+ exports.Conversation = exports.ButlerBotClient = void 0;
13
13
  const config_1 = require("./config");
14
14
  const conversation_1 = require("./modules/conversation");
15
+ Object.defineProperty(exports, "Conversation", { enumerable: true, get: function () { return conversation_1.Conversation; } });
15
16
  class ButlerBotClient {
16
17
  constructor(config) {
17
18
  this.apiKey = config.apiKey;
@@ -1,3 +1,4 @@
1
+ import { AIToolStatusData } from "./ai_tools_v3";
1
2
  import { ErrorCode } from "./error";
2
3
  type AIChatResultFail = {
3
4
  success: false;
@@ -52,7 +53,10 @@ type AIConvoStatusResponse = {
52
53
  type AIToolResponse = {
53
54
  /** Specifies type to be a tool use status update */
54
55
  type: "tool";
55
- payload: {};
56
+ payload: {
57
+ status: string;
58
+ info: AIToolStatusData;
59
+ };
56
60
  metadata: BaseAIResponseMetadata & {};
57
61
  };
58
62
  export type AIResponse = AIMessageResponse | AIToolResponse | AIConvoStatusResponse | AIResponseStatusResponse;
@@ -0,0 +1,7 @@
1
+ export type AIToolStatusData = {
2
+ failed: boolean;
3
+ done: boolean;
4
+ id: string;
5
+ parentId?: string;
6
+ endingConvo?: boolean;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@butlerbot/sdk",
3
- "version": "0.0.1-alpha1",
3
+ "version": "0.0.1-alpha2",
4
4
  "description": "The official ButlerBot SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  "scripts": {
11
11
  "build": "tsc",
12
12
  "pack": "npm run build && npm pack --pack-destination=\"G:\\tarballs\"",
13
-
13
+ "publish": "npm run build && npm publish --access public",
14
14
  "test": "jest"
15
15
  },
16
16
  "keywords": [
package/readme.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ButlerBot SDK is a JavaScript library that provides a simple way to interact with the [ButlerBot](https://butlerbot.net/) API.
4
4
 
5
+ ## Quickstart
6
+
7
+ Grab an API key at [ButlerBot](https://butlerbot.net/) and install the package:
8
+
9
+ ```bash
10
+ npm i @butlerbot/sdk
11
+ ```
12
+
5
13
  ## Prerequisites
6
14
 
7
15
  - ButlerBot API key
@@ -9,7 +17,7 @@ ButlerBot SDK is a JavaScript library that provides a simple way to interact wit
9
17
  ## Example
10
18
 
11
19
  ```typescript
12
- import { ButlerBotClient } from "butlerbot";
20
+ import { ButlerBotClient } from "@butlerbot/sdk";
13
21
 
14
22
  const client = new ButlerBotClient({
15
23
  apiKey: "your_api_key_here",