From 806617dafbc0e779aec3fa58669d18c13fa18b55 Mon Sep 17 00:00:00 2001 From: nbramblett Date: Tue, 26 Dec 2023 11:26:59 -0500 Subject: [PATCH] Add suggested replies to note type --- docs/chat-core.messagenotes.md | 1 + docs/chat-core.messagenotes.suggestedreplies.md | 13 +++++++++++++ etc/chat-core.api.md | 1 + package-lock.json | 4 ++-- package.json | 2 +- src/models/endpoints/MessageNotes.ts | 2 ++ 6 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 docs/chat-core.messagenotes.suggestedreplies.md diff --git a/docs/chat-core.messagenotes.md b/docs/chat-core.messagenotes.md index ee1677a..b50f2fb 100644 --- a/docs/chat-core.messagenotes.md +++ b/docs/chat-core.messagenotes.md @@ -26,4 +26,5 @@ This data will come from the API. As such, a user’s first request may have thi | [goalFirstMsgIndex?](./chat-core.messagenotes.goalfirstmsgindex.md) | | number | _(Optional)_ The index of the message that started the current goal. | | [queryResult?](./chat-core.messagenotes.queryresult.md) | | object | _(Optional)_ Data retrieved from Yext Search, REST api, etc. | | [searchQuery?](./chat-core.messagenotes.searchquery.md) | | string | _(Optional)_ The query used for Yext Search, REST api, etc. | +| [suggestedReplies?](./chat-core.messagenotes.suggestedreplies.md) | | string\[\] | _(Optional)_ A set of pre-generated replies given by the AI. | diff --git a/docs/chat-core.messagenotes.suggestedreplies.md b/docs/chat-core.messagenotes.suggestedreplies.md new file mode 100644 index 0000000..cf96945 --- /dev/null +++ b/docs/chat-core.messagenotes.suggestedreplies.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@yext/chat-core](./chat-core.md) > [MessageNotes](./chat-core.messagenotes.md) > [suggestedReplies](./chat-core.messagenotes.suggestedreplies.md) + +## MessageNotes.suggestedReplies property + +A set of pre-generated replies given by the AI. + +**Signature:** + +```typescript +suggestedReplies?: string[]; +``` diff --git a/etc/chat-core.api.md b/etc/chat-core.api.md index 433cae3..dac0ca3 100644 --- a/etc/chat-core.api.md +++ b/etc/chat-core.api.md @@ -75,6 +75,7 @@ export interface MessageNotes { goalFirstMsgIndex?: number; queryResult?: object; searchQuery?: string; + suggestedReplies?: string[]; } // @public diff --git a/package-lock.json b/package-lock.json index 60d985a..75ea614 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@yext/chat-core", - "version": "0.5.5", + "version": "0.6.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@yext/chat-core", - "version": "0.5.5", + "version": "0.6.1", "license": "BSD-3-Clause", "dependencies": { "cross-fetch": "^3.1.5" diff --git a/package.json b/package.json index 8b965e2..ba8fde3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yext/chat-core", - "version": "0.6.0", + "version": "0.6.1", "description": "Typescript Networking Library for the Yext Chat API", "main": "./dist/commonjs/index.js", "module": "./dist/esm/index.js", diff --git a/src/models/endpoints/MessageNotes.ts b/src/models/endpoints/MessageNotes.ts index 6b6aea6..a55e4a3 100644 --- a/src/models/endpoints/MessageNotes.ts +++ b/src/models/endpoints/MessageNotes.ts @@ -21,4 +21,6 @@ export interface MessageNotes { collectedData?: Record; /** The index of the message that started the current goal. */ goalFirstMsgIndex?: number; + /** A set of pre-generated replies given by the AI. */ + suggestedReplies?: string[]; }