0.1.3 • Published 11 months ago

@acro-sdk/conversations v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Acro SDK

Overview

The Acro SDK is designed to help developers integrate with the Acro platform in hopes of enabling simple but detailed observability into how well your AI Assistants & Chatbots are doing.

API Reference

Detailed API documentation can be found here.

Installation

Install the SDK using npm or yarn:

npm install @acro-sdk/conversations
# or
yarn add @acro-sdk/conversations

Usage

Examples

Examples can be found in here.

Sending Data

To send conversation data:

import SDK from "@acro-sdk/conversations";

// login to app.acro.so - create an application and you should get your credentials
const sdk = new SDK({
  applicationId: "your_application_id",
  secret: "your_secret",
});

const conversationData = {
  conversationId: "uuid", // Required: Uuid for a conversation. Must be a valid UUID string.
  type: "SUPPORT", // Required: Type of conversation, can be "SUPPORT" or "SALES" or "COACHING" -- Reach out if you have any questions!.
  lines: [
    { role: "AI_ASSISTANT", content: "saying stuff" },
    { role: "USER", content: "saying other stuff" },
    { role: "HUMAN", content: "you got transferred to me, saying more stuff" },
    { role: "USER", content: "hello fellow human" },
  ], // Required: Transcribed conversation lines. Empty conversations or ones with no user responses will be skipped.
  customerId: "customer-id", // Optional: Identifier for the customer talking to the AI Assistant, maximum length of 64 characters.
  start: new Date("2023-10-04T12:00:00Z"), // Optional: Timestamp the conversation started.
  duration: 4000, // Optional: Number of seconds the conversation went on for.
  end: new Date("2023-10-04T13:06:40Z"), // Optional: Timestamp the conversation ended.
  // Keys if you are selling chatbots to other people
  externalCompanyId: "companyId", // Required: Identifier for the client, maximum length of 64 characters.
  externalCompanyName: "Company Name", // Optional: Name of the client company that is using your ai assistant, maximum length of 256 characters.
  externalCompanyType: "Automotive", // Optional: Type could be industry. This data is used to group your clients, maximum length of 128 characters.
  // Check out our API Docs for more info
};

const result = await sdk.send(conversationData);

if (!result.conversationId) {
  console.log("AcroSdk Error: ", result.error);
}

console.log("Successfully sent conversation: ", result.conversationId);

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact Us

If you have any concerns or questions hit us up

0.1.3

11 months ago

0.1.2

11 months ago

0.1.2-test

11 months ago

0.1.1

11 months ago

0.1.0-alpha

11 months ago

0.1.0-test

11 months ago

0.1.0-beta

11 months ago

0.1.0

12 months ago

0.0.1

12 months ago

0.0.0

12 months ago

0.0.0-acro

12 months ago

0.0.0-charles

12 months ago

0.0.0-mo

12 months ago

0.0.0-gamma

12 months ago

0.0.0-alpha

12 months ago

0.0.0-meta

12 months ago

0.0.0-snickers

12 months ago

0.0.0-theta

12 months ago

0.0.0-beta

12 months ago