Const Correctness commited on
Commit
48278ce
·
unverified ·
2 Parent(s): a74b264d58e081

Merge pull request #2 from ConstCorrectness/claude/elegant-feynman-3372a6

Browse files
sdk-js/examples/basic.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { query_intent } from "@botcierge/sdk";
2
 
3
  const result = await query_intent("I have food to share");
4
  console.log(`Domain: ${result.domain}`);
 
1
+ import { query_intent } from "../src/index.ts";
2
 
3
  const result = await query_intent("I have food to share");
4
  console.log(`Domain: ${result.domain}`);
sdk-js/examples/batch.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Botcierge } from "@botcierge/sdk";
2
 
3
  const client = new Botcierge();
4
 
 
1
+ import { Botcierge } from "../src/index.ts";
2
 
3
  const client = new Botcierge();
4
 
sdk-js/examples/custom-client.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Botcierge } from "@botcierge/sdk";
2
 
3
  const client = new Botcierge({ baseUrl: "http://staging.botcierge.com:8000" });
4
 
 
1
+ import { Botcierge } from "../src/index.ts";
2
 
3
  const client = new Botcierge({ baseUrl: "http://staging.botcierge.com:8000" });
4
 
sdk-js/examples/error-handling.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { query_intent } from "@botcierge/sdk";
2
 
3
  try {
4
  const result = await query_intent("I want to add an item to my shopping list");
 
1
+ import { query_intent } from "../src/index.ts";
2
 
3
  try {
4
  const result = await query_intent("I want to add an item to my shopping list");
sdk-js/package.json CHANGED
@@ -2,6 +2,7 @@
2
  "name": "@botcierge/sdk",
3
  "version": "0.1.1",
4
  "description": "SDK for Botcierge Intent Classification",
 
5
  "main": "./dist/index.js",
6
  "module": "./dist/index.mjs",
7
  "types": "./dist/index.d.ts",
 
2
  "name": "@botcierge/sdk",
3
  "version": "0.1.1",
4
  "description": "SDK for Botcierge Intent Classification",
5
+ "type": "module",
6
  "main": "./dist/index.js",
7
  "module": "./dist/index.mjs",
8
  "types": "./dist/index.d.ts",
sdk-js/src/index.ts CHANGED
@@ -2,7 +2,7 @@ export interface IntentResult {
2
  domain: string;
3
  intent: string;
4
  confidence: "high" | "medium" | "low";
5
- scores: Record<string, number>;
6
  }
7
 
8
  export interface BotciergeConfig {
 
2
  domain: string;
3
  intent: string;
4
  confidence: "high" | "medium" | "low";
5
+ scores?: Record<string, number>;
6
  }
7
 
8
  export interface BotciergeConfig {