Skip to content

Commit

Permalink
docs: add validation requirement for message fields (#9000)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* Update _ml-commons-plugin/api/memory-apis/create-message.md

Co-authored-by: kolchfa-aws <[email protected]>
Signed-off-by: Rithin Pullela <[email protected]>

---------

Signed-off-by: rithin-pullela-aws <[email protected]>
Signed-off-by: Rithin Pullela <[email protected]>
Co-authored-by: kolchfa-aws <[email protected]>
  • Loading branch information
rithin-pullela-aws and kolchfa-aws authored Jan 8, 2025
1 parent 9439bb8 commit 9775ca9
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions _ml-commons-plugin/api/memory-apis/create-message.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`. |

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

Expand Down

0 comments on commit 9775ca9

Please sign in to comment.