opensearch-docs-cn/_ml-commons-plugin/api/connector-apis/search-connector.md

165 lines
5.0 KiB
Markdown
Raw Normal View History

Add agent framework/throttling/hidden model/OS assistant and update conversational search documentation (#6354) * Add agent framework documentation Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add hidden model and API updates Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Vale error Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Updated field names Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add updating credentials Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Added tools table Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add OpenSearch forum thread for OS Assistant Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add tech review for conv search Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Fix links Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add tools Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add links to tools Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * More info about tools Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Tool parameters Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Update cat-index-tool.md Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Parameter clarification Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Tech review feedback Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Typo fix Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * More tech review feedback: RAG tool Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Tech review feedback: memory APis Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Update _ml-commons-plugin/agents-tools/index.md Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _ml-commons-plugin/agents-tools/tools/neural-sparse-tool.md Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _ml-commons-plugin/agents-tools/tools/neural-sparse-tool.md Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _ml-commons-plugin/agents-tools/tools/neural-sparse-tool.md Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _ml-commons-plugin/opensearch-assistant.md Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Update _ml-commons-plugin/agents-tools/tools/ppl-tool.md Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Separated search and get APIs and add conversational flow agent Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * More parameters for PPL tool Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Added more parameters Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Tech review feedback: PPL tool Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Apply suggestions from code review Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> * Rename to automating configurations Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Editorial comments on the new text Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Add parameter to PPl tool Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Changed link to configurations Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> * Rate limiter feedback and added warning Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> --------- Signed-off-by: Fanit Kolchina <kolchfa@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: Melissa Vagi <vagimeli@amazon.com> Co-authored-by: Nathan Bower <nbower@amazon.com>
2024-02-20 12:09:31 -05:00
---
layout: default
title: Search connector
parent: Connector APIs
grand_parent: ML Commons APIs
nav_order: 25
---
# Search for a connector
Use the `_search` endpoint to search for a connector. This API uses a query to search for matching connectors.
## Path and HTTP methods
```json
POST /_plugins/_ml/connectors/_search
GET /_plugins/_ml/connectors/_search
```
#### Example request
```json
POST /_plugins/_ml/connectors/_search
{
"query": {
"match_all": {}
},
"size": 1000
}
```
{% include copy-curl.html %}
#### Example response
```json
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 3,
"relation" : "eq"
},
"max_score" : 1.0,
"hits" : [
{
"_index" : ".plugins-ml-connector",
"_id" : "7W-d74sBPD67W0wkEZdE",
"_version" : 1,
"_seq_no" : 2,
"_primary_term" : 1,
"_score" : 1.0,
"_source" : {
"protocol" : "aws_sigv4",
"name" : "BedRock claude Connector",
"description" : "The connector to BedRock service for claude model",
"version" : "1",
"parameters" : {
"endpoint" : "bedrock.us-east-1.amazonaws.com",
"content_type" : "application/json",
"auth" : "Sig_V4",
"max_tokens_to_sample" : "8000",
"service_name" : "bedrock",
"temperature" : "1.0E-4",
"response_filter" : "$.completion",
"region" : "us-east-1",
"anthropic_version" : "bedrock-2023-05-31"
},
"actions" : [
{
"headers" : {
"x-amz-content-sha256" : "required",
"content-type" : "application/json"
},
"method" : "POST",
"request_body" : "{\"prompt\":\"${parameters.prompt}\", \"max_tokens_to_sample\":${parameters.max_tokens_to_sample}, \"temperature\":${parameters.temperature}, \"anthropic_version\":\"${parameters.anthropic_version}\" }",
"action_type" : "PREDICT",
"url" : "https://bedrock.us-east-1.amazonaws.com/model/anthropic.claude-v2/invoke"
}
]
}
},
{
"_index" : ".plugins-ml-connector",
"_id" : "9W-d74sBPD67W0wk4pf_",
"_version" : 1,
"_seq_no" : 3,
"_primary_term" : 1,
"_score" : 1.0,
"_source" : {
"protocol" : "aws_sigv4",
"name" : "BedRock claude Connector",
"description" : "The connector to BedRock service for claude model",
"version" : "1",
"parameters" : {
"endpoint" : "bedrock.us-east-1.amazonaws.com",
"content_type" : "application/json",
"auth" : "Sig_V4",
"max_tokens_to_sample" : "8000",
"service_name" : "bedrock",
"temperature" : "1.0E-4",
"response_filter" : "$.completion",
"region" : "us-east-1",
"anthropic_version" : "bedrock-2023-05-31"
},
"actions" : [
{
"headers" : {
"x-amz-content-sha256" : "required",
"content-type" : "application/json"
},
"method" : "POST",
"request_body" : "{\"prompt\":\"${parameters.prompt}\", \"max_tokens_to_sample\":${parameters.max_tokens_to_sample}, \"temperature\":${parameters.temperature}, \"anthropic_version\":\"${parameters.anthropic_version}\" }",
"action_type" : "PREDICT",
"url" : "https://bedrock.us-east-1.amazonaws.com/model/anthropic.claude-v2/invoke"
}
]
}
},
{
"_index" : ".plugins-ml-connector",
"_id" : "rm_u8osBPD67W0wkCpsG",
"_version" : 1,
"_seq_no" : 4,
"_primary_term" : 1,
"_score" : 1.0,
"_source" : {
"protocol" : "aws_sigv4",
"name" : "BedRock Claude-Instant v1",
"description" : "Bedrock connector for Claude Instant testing",
"version" : "1",
"parameters" : {
"endpoint" : "bedrock.us-east-1.amazonaws.com",
"content_type" : "application/json",
"auth" : "Sig_V4",
"service_name" : "bedrock",
"region" : "us-east-1",
"anthropic_version" : "bedrock-2023-05-31"
},
"actions" : [
{
"headers" : {
"x-amz-content-sha256" : "required",
"content-type" : "application/json"
},
"method" : "POST",
"request_body" : "{\"prompt\":\"${parameters.prompt}\", \"max_tokens_to_sample\":${parameters.max_tokens_to_sample}, \"temperature\":${parameters.temperature}, \"anthropic_version\":\"${parameters.anthropic_version}\" }",
"action_type" : "PREDICT",
"url" : "https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-instant-v1/invoke"
}
]
}
}
]
}
}
```