Conversation

Conversations require at least 1 participant (Character) to function properly, but can also support multiple virtual characters talking between themselves.

{
    "_id": "615795c1765bf80c0f1d902a",
    "context": "Pied Piper officially pivots to PiperChat, a video chat app created by Dinesh, which is steadily gaining users and is superior to all competitors. However, the team is unable to gain funding due to the scandal of their click farm upticks and demise of the compression platform. After clashing with Dinesh and Gilfoyle over the development of the app and attempting to gain investment from Hanneman, Richard realizes that he can't be the CEO of a project he doesn't believe in. Just as the team prepares to replace him with Big Head, he quits his position and signs over his equity in exchange for use of his algorithm and the Pied Piper brand in the pursuit of a more ambitious goal: a decentralized internet based on users and smartphones instead of large companies and mainframes. He suggests Dinesh become the CEO of PiperChat, which was his creation. \n\nDinesh:  After every VC in town shut us down, we decided the only way to stay alive until we hit a million users was to cut our server usage. Remember? The whole reason Gilfoyle and I just stayed up for forty-eight straight fucking hours was because we all agreed to decrease server load. Not keep it the same.",
    "participants": {
        "61578d94765bf80c0f1d9026": {
            "_id": "61578d94765bf80c0f1d9026",
            "firstName": "Dinesh",
            "lastName": "Chugtai",
            "background": "Dinesh Chugtai is a software engineer. Dinesh lives and works in the Hacker Hostel with Richard, Big Head, and Gilfoyle. He possesses a dry wit and skills at writing code, particularly Java. Dinesh often finds himself sparring with Gilfoyle. He is originally from Pakistan but is a US citizen, unlike Gilfoyle. He claims it took him five years to get US citizenship and was asked about Al-Qaeda \"like 14 times.\""
        },
        "6157772e658244b1478cae3c": {
            "_id": "6157772e658244b1478cae3c",
            "firstName": "Richard",
            "lastName": "Hendricks",
            "background": "Richard Hendricks is a Stanford dropout and coder at tech company Hooli. Richard quits his job to pursue his compression application Pied Piper. The company initially starts out as a simple data compression platform, but when this, and a videochat that Dinesh created with the algorithm fails, Richard pivots toward creating a new, decentralized internet, called PiperNet. For the most part, Richard is shy and weak-willed, and does not have much of a temper, but when he finally reaches his limit, is prone to intimidating explosions of anger. Richard is constantly struggling with the demands of the business world, preferring instead to disappear into the coding of his application, but realizes that as CEO he must do more."
        }
    },
    "nextSpeaker": "61578d94765bf80c0f1d9026",
    "background": "Dinesh Chugtai is a software engineer. Dinesh lives and works in the Hacker Hostel with Richard, Big Head, and Gilfoyle. He possesses a dry wit and skills at writing code, particularly Java. Dinesh often finds himself sparring with Gilfoyle. He is originally from Pakistan but is a US citizen, unlike Gilfoyle. He claims it took him five years to get US citizenship and was asked about Al-Qaeda \"like 14 times.\"\n\nRichard Hendricks is a Stanford dropout and coder at tech company Hooli. Richard quits his job to pursue his compression application Pied Piper. The company initially starts out as a simple data compression platform, but when this, and a videochat that Dinesh created with the algorithm fails, Richard pivots toward creating a new, decentralized internet, called PiperNet. For the most part, Richard is shy and weak-willed, and does not have much of a temper, but when he finally reaches his limit, is prone to intimidating explosions of anger. Richard is constantly struggling with the demands of the business world, preferring instead to disappear into the coding of his application, but realizes that as CEO he must do more.\n\n",
    "log": "Richard: Yeah, well, that only works until we hit a million users.\n\n",
    "owner": "615e1eb73b98f9cf4c3c42a8",
    "created": 1634147254447
}

Get Conversation

GET https://getember.ai/api/conversation?=:id

This endpoint retrieves a conversation object using the provided ObjectID.

Query Parameters

Name
Type
Description

id

string

The ObjectID of the desired conversation.

{
    "_id": "61579030765bf80c0f1d9028",
    "context": "Pied Piper officially pivots to PiperChat, a video chat app created by Dinesh, which is steadily gaining users and is superior to all competitors. However, the team is unable to gain funding due to the scandal of their click farm upticks and demise of the compression platform. After clashing with Dinesh and Gilfoyle over the development of the app and attempting to gain investment from Hanneman, Richard realizes that he can't be the CEO of a project he doesn't believe in. Just as the team prepares to replace him with Big Head, he quits his position and signs over his equity in exchange for use of his algorithm and the Pied Piper brand in the pursuit of a more ambitious goal: a decentralized internet based on users and smartphones instead of large companies and mainframes. He suggests Dinesh become the CEO of PiperChat, which was his creation.",
    "participants": [
        "61578d94765bf80c0f1d9026",
        "6157772e658244b1478cae3c"
    ],
    "nextSpeaker": "6157772e658244b1478cae3c"
}

Post Conversation

POST https://getember.ai/api/conversation

This endpoint creates a new conversation object with the provided properties.

Headers

Name
Type
Description

Authorization

string

A Bearer token with your provided API key.

Request Body

Name
Type
Description

context

string

A written context of the conversation instance. This can range from a few words to a paragraph.

participants

array

An array of character ObjectIds that are participating in the conversation instance.

nextSpeaker

string

The ObjectID of the virtual character that will speak next in the conversation.

{
    "acknowledged": true,
    "insertedId": "61578e44765bf80c0f1d9027"
}

Patch Conversation

PATCH https://getember.ai/api/conversation

Update a specified conversation object's values.

Headers

Name
Type
Description

Authorization

string

A Bearer token with your provided API key.

Request Body

Name
Type
Description

id

string

The ObjectID of the desired conversation.

context

string

The updated written context. This can range from a few words to a paragraph.

participants

array

The updated participants array. Contains the ObjectID's of the characters participating in the conversation.

nextSpeaker

string

The updated next speaker character ObjectID.

log

string

The updated written log of the conversation.

{
    "acknowledged": true,
    "modifiedCount": 1,
    "upsertedId": null,
    "upsertedCount": 0,
    "matchedCount": 1
}

Delete Conversation

DELETE https://getember.ai/api/conversation

Delete the specified conversation object.

Headers

Name
Type
Description

Authorization

string

A Bearer token with your provided API key.

Request Body

Name
Type
Description

id

string

The ObjectID of the desired conversation.

{
    "acknowledged": true,
    "deletedCount": 1
}

Last updated