0.10.11 • Published 15 days ago

@dasha.ai/sdk v0.10.11

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
15 days ago

Dasha SDK for JavaScript - new and improved

We are proud to present a new iteration of the Dasha SDK for JavaScript. You can find more about the new SDK interfaces in the SDK reference, or by browsing the examples. Below are some highlights of what's changed.

Installation

npm install "@dasha.ai/sdk"

What's new?

Stored accounts

Using the Dasha CLI, you can store your credentials to be fetched automatically by the SDK:

$ npm install --global "@dasha.ai/cli"
$ dasha account login
const dasha = require("@dasha.ai/sdk");
const app = await dasha.deploy("path/to/app");

Automatic reconnections

When encountering a connection problem, Dasha SDK will now automatically attempt to reconnect to the server. You can control this behavior via deployment options.

Promise-based conversation interface

Instead of the old startJob() method, use app.createConversation().

const conv = app.createConversation();
conv.input = { foo: "bar" };

const result = await conv.execute();
console.log(result.output);

Event-based conversation queue

The conversation queue handlers now operate on the same conversation objects as if created by app.createConversation(), enabling easier migration to and from a queue-based operation model.

storage.set(convKey, { foo: "bar" });
app.queue.push(convKey);

app.queue.on("ready", async (key, conv) => {
  conv.input = storage.get(convKey);
  await conv.execute();
})

Better logging

Dasha SDK now uses winston, and logs events more thoroughly.

License

This SDK is distributed under the Apache License, Version 2.0.

0.10.11

15 days ago

0.10.10

1 month ago

0.10.9

2 months ago

0.10.8

3 months ago

0.10.7

3 months ago

0.10.6

4 months ago

0.10.3

10 months ago

0.10.4

9 months ago

0.10.5

6 months ago

0.10.2

1 year ago

0.10.1

1 year ago

0.9.0

2 years ago

0.8.7

2 years ago

0.8.5

2 years ago

0.8.4

2 years ago

0.8.6

2 years ago

0.8.3

2 years ago

0.8.2

2 years ago

0.7.5

2 years ago

0.8.1

2 years ago

0.8.0

2 years ago

0.7.4

2 years ago

0.7.2

2 years ago

0.7.1

2 years ago

0.7.3

2 years ago

0.7.0

2 years ago

0.6.7

3 years ago

0.6.6

3 years ago

0.6.5

3 years ago

0.6.4

3 years ago

0.6.3

3 years ago

0.6.2

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago

0.4.2

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago