@erdoai/cli 0.156.0 → 0.157.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.
Files changed (2) hide show
  1. package/dist/index.js +35 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -747,6 +747,20 @@ var ErdoClient = class {
747
747
  { enabled }
748
748
  );
749
749
  }
750
+ setVoiceAgentRealtimeModel(slug, model) {
751
+ return this.request(
752
+ "POST",
753
+ `/v1/voice/agents/${encodeURIComponent(slug)}/realtime-model`,
754
+ { realtime_model: model }
755
+ );
756
+ }
757
+ setVoiceWidgetRealtimeModel(widget, model) {
758
+ return this.request(
759
+ "POST",
760
+ `/v1/voice/widgets/${encodeURIComponent(widget)}/realtime-model`,
761
+ { realtime_model: model }
762
+ );
763
+ }
750
764
  // A separate switch from the text one, on the same number: the two are
751
765
  // separate permissions, so one endpoint per channel rather than a channel
752
766
  // argument that could move the wrong one.
@@ -7369,6 +7383,27 @@ voiceAgentsCmd.command("whatsapp-replies <slug>").description("Turn a voice agen
7369
7383
  fail(e);
7370
7384
  }
7371
7385
  });
7386
+ function parseVoiceRealtimeModel(value) {
7387
+ if (value === "off" || value === "mini" || value === "max") return value;
7388
+ throw new Error("realtime model must be one of: off, mini, max");
7389
+ }
7390
+ voiceAgentsCmd.command("realtime-model <slug> <model>").description("Choose the voice model used by a voice agent").action(async (slug, model) => {
7391
+ try {
7392
+ const res = await new ErdoClient().setVoiceAgentRealtimeModel(slug, parseVoiceRealtimeModel(model));
7393
+ console.log(`${res.agent ?? slug} ${res.realtime_model} ${res.name}`);
7394
+ } catch (e) {
7395
+ fail(e);
7396
+ }
7397
+ });
7398
+ var voiceWidgetsCmd = voiceCmd.command("widgets").description("Change settings on a website voice widget");
7399
+ voiceWidgetsCmd.command("realtime-model <widget> <model>").description("Choose the voice model used by a website widget").action(async (widget, model) => {
7400
+ try {
7401
+ const res = await new ErdoClient().setVoiceWidgetRealtimeModel(widget, parseVoiceRealtimeModel(model));
7402
+ console.log(`${res.widget ?? widget} ${res.realtime_model} ${res.name}`);
7403
+ } catch (e) {
7404
+ fail(e);
7405
+ }
7406
+ });
7372
7407
  var datasetsCmd = program.command("datasets").description("Datasets");
7373
7408
  var providerLeadSourcesCmd = program.command("provider-lead-sources").description("Ingest ad-platform lead form responses into a lead dataset");
7374
7409
  providerLeadSourcesCmd.command("list").description("List LinkedIn lead form source declarations").option("--provider <provider>", "filter by ad platform provider").option("--account-id <id>", "filter by provider ad account id").action(async (opts) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.156.0",
3
+ "version": "0.157.0",
4
4
  "description": "Erdo CLI \u2014 drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {