@guava-ai/guava-sdk 0.11.0 → 0.12.0
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/README.md +2 -30
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/examples/README.md +4 -4
- package/package.json +1 -1
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ This library allows you to build Guava voice agents using TypeScript or Javascri
|
|
|
5
5
|
|
|
6
6
|
## Documentation
|
|
7
7
|
|
|
8
|
-
Full documentation for the TypeScript SDK can be found at [https://
|
|
8
|
+
Full documentation for the TypeScript SDK can be found at [https://goguava.ai/docs/](https://goguava.ai/docs/). SDK examples can be found under [./examples/](https://github.com/goguava-ai/typescript-sdk/tree/main/examples).
|
|
9
9
|
|
|
10
10
|
## Try an Example
|
|
11
11
|
|
|
@@ -30,32 +30,4 @@ $ yarn add @guava-ai/guava-sdk
|
|
|
30
30
|
$ pnpm add @guava-ai/guava-sdk
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
The SDK can be used with Javascript, but TypeScript is highly recommended.
|
|
34
|
-
|
|
35
|
-
## Basic Usage
|
|
36
|
-
|
|
37
|
-
The Guava SDK is primarily used by subclassing `guava.CallController`. `CallController` subclasses implement callbacks that steer the call in real-time.
|
|
38
|
-
|
|
39
|
-
You can make outbound calls using a `CallController` instance.
|
|
40
|
-
|
|
41
|
-
```typescript
|
|
42
|
-
import * as guava from "@guava-ai/guava-sdk";
|
|
43
|
-
|
|
44
|
-
// Make an outbound call with a call controller.
|
|
45
|
-
new guava.Client().createOutbound(
|
|
46
|
-
agentNumber, toNumber,
|
|
47
|
-
new MyCallController(),
|
|
48
|
-
);
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
You can also accept inbound calls using Guava. You don't need to setup a server — inbound calls can be received on your dev machine, including behind NATs and most firewalls.
|
|
52
|
-
Instead of passing a controller, you will pass a factory function that constructs a controller upon receipt of a call.
|
|
53
|
-
|
|
54
|
-
```typescript
|
|
55
|
-
// Attach a listener to the phone number.
|
|
56
|
-
// Spawn new call controllers as calls come in.
|
|
57
|
-
new guava.Client().listenInbound(
|
|
58
|
-
{ agent_number: agentNumber },
|
|
59
|
-
() => new MyCallController(),
|
|
60
|
-
);
|
|
61
|
-
```
|
|
33
|
+
The SDK can be used with Javascript, but TypeScript is highly recommended.
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.12.0";
|
package/dist/src/version.js
CHANGED
package/examples/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Examples
|
|
2
2
|
|
|
3
|
-
- ./property-insurance.ts - A simple inbound phone call example demonstrating use of RAG and the `DocumentQA` class to answer
|
|
4
|
-
- ./
|
|
5
|
-
- ./
|
|
6
|
-
- ./scheduling-outbound.ts - An outbound phone call example
|
|
3
|
+
- [property-insurance.ts](./property-insurance.ts) - A simple inbound phone call example demonstrating use of RAG and the `DocumentQA` class to answer caller questions about a property insurance policy.
|
|
4
|
+
- [restaurant-waitlist.ts](./restaurant-waitlist.ts) - An inbound phone call example where the agent collects caller name, party size, and phone number to add the caller to a restaurant waitlist, then hangs up after confirming the details.
|
|
5
|
+
- [help-desk.ts](./help-desk.ts) - An inbound phone call example for a furniture retailer that uses `DocumentQA` to answer product questions and `IntentRecognizer` to classify caller intent, then transfers the caller to the appropriate department (sales, delivery and returns, account management, or general support).
|
|
6
|
+
- [scheduling-outbound.ts](./scheduling-outbound.ts) - An outbound phone call example where the agent calls a dental patient, verifies they are available, and schedules a cleaning appointment by searching available calendar slots using a `DatetimeFilter`.
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@guava-ai/guava-sdk",
|
|
3
3
|
"description": "The official TypeScript SDK for building Guava voice agents.",
|
|
4
4
|
"homepage": "https://docs.goguava.ai/typescript-sdk/",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.12.0",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"types": "dist/src/index.d.ts",
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.
|
|
1
|
+
export const SDK_VERSION = "0.12.0";
|