From 1422af3cddc8140fe9c3d59ee0205b278e193bb9 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Thu, 16 Jan 2025 12:02:17 +1300 Subject: [PATCH] Split `get_all` variants out of `ml.get_memory` and `ml.get_message` (#796) * Split `get_all` variants out of `ml.get_memory` and `ml.get_message` Signed-off-by: Thomas Farr * Fixing tests Signed-off-by: Thomas Farr * Re-org test files Signed-off-by: Thomas Farr * Fix typo Signed-off-by: Thomas Farr * Fix schema path Signed-off-by: Thomas Farr --------- Signed-off-by: Thomas Farr --- CHANGELOG.md | 1 + spec/namespaces/ml.yaml | 167 +++++++++++++----- spec/schemas/_common.yaml | 7 +- spec/schemas/ml._common.yaml | 100 ++--------- tests/plugins/ml/ml/memory/get.yaml | 10 +- tests/plugins/ml/ml/memory/get_all.yaml | 57 ++++++ .../ml/ml/{ => memory}/message/get.yaml | 15 +- .../ml/{ => memory}/message/get_traces.yaml | 2 +- .../ml/ml/{ => memory}/message/update.yaml | 2 +- .../{message => memory/messages}/create.yaml | 2 +- .../ml/ml/memory/messages/get_all.yaml | 74 ++++++++ .../{message => memory/messages}/search.yaml | 2 +- 12 files changed, 278 insertions(+), 161 deletions(-) create mode 100644 tests/plugins/ml/ml/memory/get_all.yaml rename tests/plugins/ml/ml/{ => memory}/message/get.yaml (73%) rename tests/plugins/ml/ml/{ => memory}/message/get_traces.yaml (94%) rename tests/plugins/ml/ml/{ => memory}/message/update.yaml (95%) rename tests/plugins/ml/ml/{message => memory/messages}/create.yaml (93%) create mode 100644 tests/plugins/ml/ml/memory/messages/get_all.yaml rename tests/plugins/ml/ml/{message => memory/messages}/search.yaml (95%) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbfa5c230..1065fe451 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -106,6 +106,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Changed `SearchModelsQuery`, `CreateConnectorRequest` & `RegisterAgentsRequest` to be defined inline of request bodies ([#725](https://github.com/opensearch-project/opensearch-api-specification/pull/725)) - Changed `indices.data_streams_stats:DataStreamsStatsItem` to instead be `indices._common:DataStreamStats` ([#725](https://github.com/opensearch-project/opensearch-api-specification/pull/725)) - Changed naming of `snapshot._common`'s `Status`, `ShardsStats`, `ShardsStatsStage`, `ShardsStatsSummary` and `ShardsStatsSummaryItem` schemas to be prefixed with `Snapshot` ([#730](https://github.com/opensearch-project/opensearch-api-specification/pull/730)) +- Changed `ml.get_memory` and `ml.get_message` to split out `get_all` variants ([#796](https://github.com/opensearch-project/opensearch-api-specification/pull/796)) ## [0.1.0] - 2024-10-25 diff --git a/spec/namespaces/ml.yaml b/spec/namespaces/ml.yaml index 0b53a64fe..ca4d8be26 100644 --- a/spec/namespaces/ml.yaml +++ b/spec/namespaces/ml.yaml @@ -428,15 +428,16 @@ paths: $ref: '#/components/responses/ml.delete_agent@200' /_plugins/_ml/memory: get: - operationId: ml.get_memory.0 - x-operation-group: ml.get_memory + operationId: ml.get_all_memories.0 + x-operation-group: ml.get_all_memories x-version-added: '2.12' - description: Get a memory. - requestBody: - $ref: '#/components/requestBodies/ml.get_memory' + description: Get all memories. + parameters: + - $ref: '#/components/parameters/ml.get_all_memories::query.max_results' + - $ref: '#/components/parameters/ml.get_all_memories::query.next_token' responses: '200': - $ref: '#/components/responses/ml.get_memory@200' + $ref: '#/components/responses/ml.get_all_memories@200' post: operationId: ml.create_memory.0 x-operation-group: ml.create_memory @@ -449,12 +450,10 @@ paths: $ref: '#/components/responses/ml.create_memory@200' /_plugins/_ml/memory/{memory_id}: get: - operationId: ml.get_memory.1 + operationId: ml.get_memory.0 x-operation-group: ml.get_memory x-version-added: '2.12' description: Get a memory. - requestBody: - $ref: '#/components/requestBodies/ml.get_memory' parameters: - $ref: '#/components/parameters/ml.get_memory::path.memory_id' responses: @@ -505,15 +504,17 @@ paths: $ref: '#/components/responses/ml.search_memory@200' /_plugins/_ml/memory/{memory_id}/messages: get: - operationId: ml.get_message.0 - x-operation-group: ml.get_message + operationId: ml.get_all_messages.0 + x-operation-group: ml.get_all_messages x-version-added: '2.12' - description: Get a message. + description: Get all messages in a memory. parameters: - - $ref: '#/components/parameters/ml.get_message::path.memory_id' + - $ref: '#/components/parameters/ml.get_all_messages::path.memory_id' + - $ref: '#/components/parameters/ml.get_all_messages::query.max_results' + - $ref: '#/components/parameters/ml.get_all_messages::query.next_token' responses: '200': - $ref: '#/components/responses/ml.get_message@200' + $ref: '#/components/responses/ml.get_all_messages@200' post: operationId: ml.create_message.0 x-operation-group: ml.create_message @@ -528,7 +529,7 @@ paths: $ref: '#/components/responses/ml.create_message@200' /_plugins/_ml/memory/message/{message_id}: get: - operationId: ml.get_message.1 + operationId: ml.get_message.0 x-operation-group: ml.get_message x-version-added: '2.12' description: Get a message. @@ -582,6 +583,8 @@ paths: description: Get a message traces. parameters: - $ref: '#/components/parameters/ml.get_message_traces::path.message_id' + - $ref: '#/components/parameters/ml.get_message_traces::query.max_results' + - $ref: '#/components/parameters/ml.get_message_traces::query.next_token' responses: '200': $ref: '#/components/responses/ml.get_message_traces@200' @@ -817,7 +820,7 @@ components: version: $ref: '../schemas/_common.yaml#/components/schemas/VersionString' model_format: - $ref: '../schemas/_common.yaml#/components/schemas/ModelFormat' + $ref: '../schemas/ml._common.yaml#/components/schemas/ModelFormat' description: type: string description: The model description. @@ -838,7 +841,7 @@ components: version: $ref: '../schemas/_common.yaml#/components/schemas/VersionString' model_format: - $ref: '../schemas/_common.yaml#/components/schemas/ModelFormat' + $ref: '../schemas/ml._common.yaml#/components/schemas/ModelFormat' model_group_id: $ref: '../schemas/_common.yaml#/components/schemas/Id' model_content_hash_value: @@ -875,7 +878,7 @@ components: version: $ref: '../schemas/_common.yaml#/components/schemas/VersionString' model_format: - $ref: '../schemas/_common.yaml#/components/schemas/ModelFormat' + $ref: '../schemas/ml._common.yaml#/components/schemas/ModelFormat' model_group_id: $ref: '../schemas/_common.yaml#/components/schemas/Id' model_content_hash_value: @@ -934,7 +937,7 @@ components: version: $ref: '../schemas/_common.yaml#/components/schemas/VersionString' model_format: - $ref: '../schemas/_common.yaml#/components/schemas/ModelFormat' + $ref: '../schemas/ml._common.yaml#/components/schemas/ModelFormat' description: type: string description: The model description. @@ -1005,8 +1008,6 @@ components: type: array items: $ref: '../schemas/_common.yaml#/components/schemas/Id' - required: - - model_ids ml.unload_model: content: application/json: @@ -1021,8 +1022,6 @@ components: type: array items: $ref: '../schemas/_common.yaml#/components/schemas/Id' - required: - - model_ids ml.predict_model: content: application/json: @@ -1214,20 +1213,6 @@ components: required: - name - type - ml.get_memory: - content: - application/json: - schema: - type: object - properties: - max_results: - type: integer - format: int64 - description: The maximum number of results to return. - next_token: - type: integer - format: int64 - description: The index of the first memory in the sorted list of memories to return. ml.create_memory: content: application/json: @@ -1325,7 +1310,9 @@ components: type: object properties: user_rate_limiter: - $ref: '../schemas/ml._common.yaml#/components/schemas/UserRateLimiter' + type: object + additionalProperties: + $ref: '../schemas/ml._common.yaml#/components/schemas/RateLimiter' ml.update_controller: content: application/json: @@ -1333,7 +1320,9 @@ components: type: object properties: user_rate_limiter: - $ref: '../schemas/ml._common.yaml#/components/schemas/UserRateLimiter' + type: object + additionalProperties: + $ref: '../schemas/ml._common.yaml#/components/schemas/RateLimiter' model_id: $ref: '../schemas/_common.yaml#/components/schemas/Name' ml.get_profile: @@ -1520,7 +1509,7 @@ components: content: application/json: schema: - $ref: '../schemas/ml._common.yaml#/components/schemas/UpdateModelResponse' + $ref: '../schemas/_common.yaml#/components/schemas/WriteResponseBase' ml.delete_task@200: content: application/json: @@ -1596,7 +1585,23 @@ components: content: application/json: schema: - $ref: '../schemas/ml._common.yaml#/components/schemas/GetMemoryResponse' + $ref: '../schemas/ml._common.yaml#/components/schemas/Memory' + ml.get_all_memories@200: + content: + application/json: + schema: + type: object + properties: + memories: + type: array + items: + $ref: '../schemas/ml._common.yaml#/components/schemas/Memory' + next_token: + description: The index of the next memory after the last memory in the returned list. + type: integer + format: int32 + required: + - memories ml.create_memory@200: content: application/json: @@ -1642,7 +1647,23 @@ components: content: application/json: schema: - $ref: '../schemas/ml._common.yaml#/components/schemas/GetMessageResponse' + $ref: '../schemas/ml._common.yaml#/components/schemas/Message' + ml.get_all_messages@200: + content: + application/json: + schema: + type: object + properties: + messages: + type: array + items: + $ref: '../schemas/ml._common.yaml#/components/schemas/Message' + next_token: + description: The index of the next message after the last message in the returned list. + type: integer + format: int32 + required: + - messages ml.update_message@200: content: application/json: @@ -1657,7 +1678,17 @@ components: content: application/json: schema: - $ref: '../schemas/ml._common.yaml#/components/schemas/GetMessageTracesResponse' + type: object + properties: + traces: + type: array + items: + $ref: '../schemas/ml._common.yaml#/components/schemas/Message' + next_token: + type: integer + format: int32 + required: + - traces ml.get_controller@200: content: application/json: @@ -1665,7 +1696,9 @@ components: type: object properties: user_rate_limiter: - $ref: '../schemas/ml._common.yaml#/components/schemas/UserRateLimiter' + type: object + additionalProperties: + $ref: '../schemas/ml._common.yaml#/components/schemas/RateLimiter' model_id: $ref: '../schemas/_common.yaml#/components/schemas/Name' ml.create_controller@200: @@ -1709,6 +1742,22 @@ components: schema: $ref: '../schemas/ml._common.yaml#/components/schemas/GetStatsResponse' parameters: + ml.get_all_memories::query.max_results: + name: max_results + in: query + required: false + schema: + description: The maximum number of results to return. If there are fewer memories than the number set in `max_results`, the response returns only the number of memories that exist. Default is `10`. + type: integer + format: int32 + ml.get_all_memories::query.next_token: + name: next_token + in: query + required: false + schema: + description: The index of the first memory in the sorted list of memories to return. Memories are ordered by `create_time`. For example, if memories `A`, `B`, and `C` exist, `next_token=1` returns memories `B` and `C`. Default is `0` (return all memories). + type: integer + format: int32 ml.get_model_group::path.model_group_id: name: model_group_id in: path @@ -1885,12 +1934,26 @@ components: required: true schema: type: string - ml.get_message::path.memory_id: + ml.get_all_messages::path.memory_id: name: memory_id in: path required: true schema: type: string + ml.get_all_messages::query.max_results: + name: max_results + in: query + required: false + schema: + type: integer + format: int32 + ml.get_all_messages::query.next_token: + name: next_token + in: query + required: false + schema: + type: integer + format: int32 ml.get_message::path.message_id: name: message_id in: path @@ -1915,6 +1978,20 @@ components: required: true schema: type: string + ml.get_message_traces::query.max_results: + name: max_results + in: query + required: false + schema: + type: integer + format: int32 + ml.get_message_traces::query.next_token: + name: next_token + in: query + required: false + schema: + type: integer + format: int32 ml.get_controller::path.model_id: name: model_id in: path diff --git a/spec/schemas/_common.yaml b/spec/schemas/_common.yaml index 4fd096be9..94df12f0c 100644 --- a/spec/schemas/_common.yaml +++ b/spec/schemas/_common.yaml @@ -2475,9 +2475,4 @@ components: type: number required: - active_threads - - thread_executions - ModelFormat: - type: string - enum: - - ONNX - - TORCH_SCRIPT \ No newline at end of file + - thread_executions \ No newline at end of file diff --git a/spec/schemas/ml._common.yaml b/spec/schemas/ml._common.yaml index 1c89f7618..97bef40b4 100644 --- a/spec/schemas/ml._common.yaml +++ b/spec/schemas/ml._common.yaml @@ -136,7 +136,7 @@ components: model_config: $ref: '#/components/schemas/ModelConfig' model_format: - $ref: '_common.yaml#/components/schemas/ModelFormat' + $ref: '#/components/schemas/ModelFormat' model_task_type: type: string description: The model task type. @@ -795,7 +795,7 @@ components: type: string description: The model version. model_format: - $ref: '_common.yaml#/components/schemas/ModelFormat' + $ref: '#/components/schemas/ModelFormat' model_state: type: string description: The model state. @@ -841,9 +841,8 @@ components: type: object properties: limit: - type: integer - format: int64 description: The maximum limit. + $ref: '_common.yaml#/components/schemas/StringifiedDouble' unit: type: string description: The unit of time. @@ -898,30 +897,6 @@ components: response_validation_regex: type: string description: The response validation regex. - UpdateModelResponse: - type: object - properties: - _index: - $ref: '_common.yaml#/components/schemas/IndexName' - _id: - $ref: '_common.yaml#/components/schemas/Id' - _version: - $ref: '_common.yaml#/components/schemas/VersionNumber' - result: - $ref: '_common.yaml#/components/schemas/Result' - forced_refresh: - type: boolean - description: Whether the model is forced to refresh. - _shards: - $ref: '_common.yaml#/components/schemas/ShardStatistics' - _seq_no: - $ref: '_common.yaml#/components/schemas/SequenceNumber' - _primary_term: - type: integer - format: int64 - description: The primary term. - required: - - _index Task: type: object properties: @@ -1169,19 +1144,6 @@ components: description: The last updated time. SearchConnectorsResponse: $ref: '#/components/schemas/SearchResponse' - GetMemoryResponse: - oneOf: - - $ref: '#/components/schemas/Memory' - - type: object - properties: - memories: - type: array - items: - $ref: '#/components/schemas/Memory' - next_token: - type: integer - format: int64 - description: The index of the first memory in the sorted list of memories. SearchMemoryResponse: $ref: '#/components/schemas/SearchResponse' Message: @@ -1216,47 +1178,13 @@ components: type: integer format: int64 description: The trace number. - GetMessageResponse: - oneOf: - - $ref: '#/components/schemas/Message' - - type: object - properties: - messages: - type: array - items: - $ref: '#/components/schemas/Message' SearchMessageResponse: $ref: '#/components/schemas/SearchResponse' - GetMessageTracesResponse: - type: object - properties: - traces: - type: array - items: - $ref: '#/components/schemas/Message' - UserRateLimiter: - type: object - properties: - user1: - $ref: '#/components/schemas/User' - additionalProperties: true - User: - type: object - properties: - limit: - type: [integer, string] - description: Max Predict API calls per user per time unit. - unit: - type: string - description: The unit of time. - enum: - - DAYS - - HOURS - - MICROSECONDS - - MILLISECONDS - - MINUTES - - NANOSECONDS - - SECONDS + ModelFormat: + type: string + enum: + - ONNX + - TORCH_SCRIPT ProfileRequest: type: object properties: @@ -1483,7 +1411,7 @@ components: $ref: '#/components/schemas/Predict' train: $ref: '#/components/schemas/Train' - ModelStasts: + ModelStats: type: object properties: ml_action_request_count: @@ -1499,12 +1427,12 @@ components: format: int64 description: The executing task count. Deploy: - $ref: '#/components/schemas/ModelStasts' + $ref: '#/components/schemas/ModelStats' Register: - $ref: '#/components/schemas/ModelStasts' + $ref: '#/components/schemas/ModelStats' Undeploy: - $ref: '#/components/schemas/ModelStasts' + $ref: '#/components/schemas/ModelStats' Predict: - $ref: '#/components/schemas/ModelStasts' + $ref: '#/components/schemas/ModelStats' Train: - $ref: '#/components/schemas/ModelStasts' + $ref: '#/components/schemas/ModelStats' diff --git a/tests/plugins/ml/ml/memory/get.yaml b/tests/plugins/ml/ml/memory/get.yaml index 9e3787145..36e361d10 100644 --- a/tests/plugins/ml/ml/memory/get.yaml +++ b/tests/plugins/ml/ml/memory/get.yaml @@ -1,6 +1,6 @@ $schema: ../../../../../json_schemas/test_story.schema.yaml -description: Test the retrieval of a memory by ID and all memories. +description: Test the retrieval of a memory by ID. version: '>= 2.12' prologues: - path: /_plugins/_ml/memory @@ -25,11 +25,5 @@ chapters: memory_id: ${create_memory.memory_id} response: status: 200 - - synopsis: Get all memories. - path: /_plugins/_ml/memory - method: GET - request: payload: - max_results: 10 - response: - status: 200 \ No newline at end of file + name: Test memory \ No newline at end of file diff --git a/tests/plugins/ml/ml/memory/get_all.yaml b/tests/plugins/ml/ml/memory/get_all.yaml new file mode 100644 index 000000000..cc15dfe76 --- /dev/null +++ b/tests/plugins/ml/ml/memory/get_all.yaml @@ -0,0 +1,57 @@ +$schema: ../../../../../json_schemas/test_story.schema.yaml + +description: Test the retrieval of all memories. +version: '>= 2.12' +prologues: + - path: /_plugins/_ml/memory + id: create_memory_1 + method: POST + request: + payload: + name: Test memory 1 + output: + memory_id: payload.memory_id + - path: /_plugins/_ml/memory + id: create_memory_2 + method: POST + request: + payload: + name: Test memory 2 + output: + memory_id: payload.memory_id +epilogues: + - path: /_plugins/_ml/memory/{memory_id} + method: DELETE + status: [200, 404] + parameters: + memory_id: ${create_memory_1.memory_id} + - path: /_plugins/_ml/memory/{memory_id} + method: DELETE + status: [200, 404] + parameters: + memory_id: ${create_memory_2.memory_id} +chapters: + - synopsis: Get all memories (Initial Page). + id: get_all_memories_1 + path: /_plugins/_ml/memory + method: GET + parameters: + max_results: 1 + response: + status: 200 + payload: + memories: + - name: Test memory 2 + output: + next_token: payload.next_token + - synopsis: Get all memories (Subsequent Page). + path: /_plugins/_ml/memory + method: GET + parameters: + max_results: 1 + next_token: ${get_all_memories_1.next_token} + response: + status: 200 + payload: + memories: + - name: Test memory 1 \ No newline at end of file diff --git a/tests/plugins/ml/ml/message/get.yaml b/tests/plugins/ml/ml/memory/message/get.yaml similarity index 73% rename from tests/plugins/ml/ml/message/get.yaml rename to tests/plugins/ml/ml/memory/message/get.yaml index 2868c6189..bc09b79f9 100644 --- a/tests/plugins/ml/ml/message/get.yaml +++ b/tests/plugins/ml/ml/memory/message/get.yaml @@ -1,9 +1,7 @@ -$schema: ../../../../../json_schemas/test_story.schema.yaml +$schema: ../../../../../../json_schemas/test_story.schema.yaml -description: Test the retrieval of a message by ID and all messages. +description: Test the retrieval of a message by ID. version: '>= 2.12' -warnings: - multiple-paths-detected: false prologues: - path: /_plugins/_ml/memory id: create_memory @@ -40,11 +38,4 @@ chapters: parameters: message_id: ${create_message.message_id} response: - status: 200 - - synopsis: Get all messages. - path: /_plugins/_ml/memory/{memory_id}/messages - method: GET - parameters: - memory_id: ${create_memory.memory_id} - response: - status: 200 + status: 200 \ No newline at end of file diff --git a/tests/plugins/ml/ml/message/get_traces.yaml b/tests/plugins/ml/ml/memory/message/get_traces.yaml similarity index 94% rename from tests/plugins/ml/ml/message/get_traces.yaml rename to tests/plugins/ml/ml/memory/message/get_traces.yaml index 8e267fe54..1189261fd 100644 --- a/tests/plugins/ml/ml/message/get_traces.yaml +++ b/tests/plugins/ml/ml/memory/message/get_traces.yaml @@ -1,4 +1,4 @@ -$schema: ../../../../../json_schemas/test_story.schema.yaml +$schema: ../../../../../../json_schemas/test_story.schema.yaml description: Test the retrieval of message trace. version: '>= 2.12' diff --git a/tests/plugins/ml/ml/message/update.yaml b/tests/plugins/ml/ml/memory/message/update.yaml similarity index 95% rename from tests/plugins/ml/ml/message/update.yaml rename to tests/plugins/ml/ml/memory/message/update.yaml index 129f354cb..f6de55087 100644 --- a/tests/plugins/ml/ml/message/update.yaml +++ b/tests/plugins/ml/ml/memory/message/update.yaml @@ -1,4 +1,4 @@ -$schema: ../../../../../json_schemas/test_story.schema.yaml +$schema: ../../../../../../json_schemas/test_story.schema.yaml description: Test updating a message. version: '>= 2.12' diff --git a/tests/plugins/ml/ml/message/create.yaml b/tests/plugins/ml/ml/memory/messages/create.yaml similarity index 93% rename from tests/plugins/ml/ml/message/create.yaml rename to tests/plugins/ml/ml/memory/messages/create.yaml index 5ec9cd64b..54b5c5ca2 100644 --- a/tests/plugins/ml/ml/message/create.yaml +++ b/tests/plugins/ml/ml/memory/messages/create.yaml @@ -1,4 +1,4 @@ -$schema: ../../../../../json_schemas/test_story.schema.yaml +$schema: ../../../../../../json_schemas/test_story.schema.yaml description: Test the creation of a message. version: '>= 2.12' diff --git a/tests/plugins/ml/ml/memory/messages/get_all.yaml b/tests/plugins/ml/ml/memory/messages/get_all.yaml new file mode 100644 index 000000000..1c7a9692a --- /dev/null +++ b/tests/plugins/ml/ml/memory/messages/get_all.yaml @@ -0,0 +1,74 @@ +$schema: ../../../../../../json_schemas/test_story.schema.yaml + +description: Test the retrieval of all messages. +version: '>= 2.12' +prologues: + - path: /_plugins/_ml/memory + id: create_memory + method: POST + request: + payload: + name: Test memory + output: + memory_id: payload.memory_id + - path: /_plugins/_ml/memory/{memory_id}/messages + id: create_message_1 + method: POST + parameters: + memory_id: ${create_memory.memory_id} + request: + payload: + input: What is the best selling novel of all time? + prompt_template: Hello OpenAI, can you answer this question? + response: Hello, this is OpenAI. Here is the answer to your question. + additional_info: + suggestion: api.openai.com + output: + message_id: payload.message_id + - path: /_plugins/_ml/memory/{memory_id}/messages + id: create_message_2 + method: POST + parameters: + memory_id: ${create_memory.memory_id} + request: + payload: + input: What is the best selling movie of all time? + prompt_template: Hello OpenAI, can you answer this question? + response: Hello, this is OpenAI. Here is the answer to your question. + additional_info: + suggestion: api.openai.com + output: + message_id: payload.message_id +epilogues: + - path: /_plugins/_ml/memory/{memory_id} + method: DELETE + status: [200, 404] + parameters: + memory_id: ${create_memory.memory_id} +chapters: + - synopsis: Get all messages (Initial Page). + id: get_all_messages_1 + path: /_plugins/_ml/memory/{memory_id}/messages + method: GET + parameters: + memory_id: ${create_memory.memory_id} + max_results: 1 + response: + status: 200 + payload: + messages: + - input: What is the best selling novel of all time? + output: + next_token: payload.next_token + - synopsis: Get all messages (Subsequent Page). + path: /_plugins/_ml/memory/{memory_id}/messages + method: GET + parameters: + memory_id: ${create_memory.memory_id} + max_results: 1 + next_token: ${get_all_messages_1.next_token} + response: + status: 200 + payload: + messages: + - input: What is the best selling movie of all time? \ No newline at end of file diff --git a/tests/plugins/ml/ml/message/search.yaml b/tests/plugins/ml/ml/memory/messages/search.yaml similarity index 95% rename from tests/plugins/ml/ml/message/search.yaml rename to tests/plugins/ml/ml/memory/messages/search.yaml index 03b6d7013..5f759a2a2 100644 --- a/tests/plugins/ml/ml/message/search.yaml +++ b/tests/plugins/ml/ml/memory/messages/search.yaml @@ -1,4 +1,4 @@ -$schema: ../../../../../json_schemas/test_story.schema.yaml +$schema: ../../../../../../json_schemas/test_story.schema.yaml description: Test the search of messages. version: '>= 2.12'