From 49b95b23a3d6c07fd08e449882f045529c5e893d Mon Sep 17 00:00:00 2001 From: rithin-pullela-aws Date: Mon, 23 Dec 2024 13:29:56 -0800 Subject: [PATCH 1/2] docs: add validation requirement for message fields Add note clarifying that at least one field must be non-null and non-empty for successful message creation/update operations Signed-off-by: rithin-pullela-aws --- .../api/memory-apis/create-message.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/_ml-commons-plugin/api/memory-apis/create-message.md b/_ml-commons-plugin/api/memory-apis/create-message.md index 561e321624..6c87e4776e 100644 --- a/_ml-commons-plugin/api/memory-apis/create-message.md +++ b/_ml-commons-plugin/api/memory-apis/create-message.md @@ -44,11 +44,14 @@ The following table lists the available request fields. Field | Data type | Required/Optional | Updatable | Description :--- | :--- | :--- | :--- | :--- -| `input` | String | Optional | No | The question (human input) in the message. | -| `prompt_template` | String | Optional | No | The prompt template that was used for the message. The template may contain instructions or examples that were sent to the large language model. | -| `response` | String | Optional | No | The answer (generative AI output) to the question. | -| `origin` | String | Optional | No | The name of the AI or other system that generated the response. | -| `additional_info` | Object | Optional | Yes | Any other information that was sent to the `origin`. | +`input` | String | Optional | No | The question (human input) in the message. | +`prompt_template` | String | Optional | No | The prompt template that was used for the message. The template may contain instructions or examples that were sent to the large language model. | +`response` | String | Optional | No | The answer (generative AI output) to the question. | +`origin` | String | Optional | No | The name of the AI or other system that generated the response. | +`additional_info` | Object | Optional | Yes | Any other information that was sent to the `origin`. | + +At least one of the above fields must be provided and cannot be null or empty for a successful message creation or update +{: .note} #### Example request: Create a message From eb10b03db605fea9c76a3f891abfbc3908611ab5 Mon Sep 17 00:00:00 2001 From: Rithin Pullela Date: Fri, 3 Jan 2025 09:54:47 -0800 Subject: [PATCH 2/2] Update _ml-commons-plugin/api/memory-apis/create-message.md Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Rithin Pullela --- _ml-commons-plugin/api/memory-apis/create-message.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_ml-commons-plugin/api/memory-apis/create-message.md b/_ml-commons-plugin/api/memory-apis/create-message.md index 6c87e4776e..d1272e3e54 100644 --- a/_ml-commons-plugin/api/memory-apis/create-message.md +++ b/_ml-commons-plugin/api/memory-apis/create-message.md @@ -50,7 +50,7 @@ Field | Data type | Required/Optional | Updatable | Description `origin` | String | Optional | No | The name of the AI or other system that generated the response. | `additional_info` | Object | Optional | Yes | Any other information that was sent to the `origin`. | -At least one of the above fields must be provided and cannot be null or empty for a successful message creation or update +To create or update a message successfully, you must provide at least one of the preceding fields. The provided field(s) cannot be null or empty. {: .note} #### Example request: Create a message