-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Amit Galitzky <[email protected]>
- Loading branch information
1 parent
b148eb5
commit a6fd478
Showing
38 changed files
with
1,063 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/resources/defaults/bedrock-titan-embedding-defaults.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"template.name": "deploy-bedrock-titan-embedding-model", | ||
"template.description": "Deploying Amazon Bedrock Titan embedding model ", | ||
"create_connector.name": "Amazon Bedrock Connector: embedding", | ||
"create_connector.description": "The connector to bedrock Titan embedding model", | ||
"create_connector.region": "us-east-1", | ||
"create_connector.endpoint": "api.openai.com", | ||
"create_connector.credential.access_key": "123", | ||
"create_connector.credential.secret_key": "123", | ||
"create_connector.credential.session_token": "123", | ||
"create_connector.actions.url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/amazon.titan-embed-text-v1/invoke", | ||
"create_connector.actions.request_body": "{ \"inputText\": \"${parameters.inputText}\" }", | ||
"create_connector.actions.pre_process_function": "\n StringBuilder builder = new StringBuilder();\n builder.append(\"\\\"\");\n String first = params.text_docs[0];\n builder.append(first);\n builder.append(\"\\\"\");\n def parameters = \"{\" +\"\\\"inputText\\\":\" + builder + \"}\";\n return \"{\" +\"\\\"parameters\\\":\" + parameters + \"}\";", | ||
"create_connector.actions.post_process_function": "\n def name = \"sentence_embedding\";\n def dataType = \"FLOAT32\";\n if (params.embedding == null || params.embedding.length == 0) {\n return params.message;\n }\n def shape = [params.embedding.length];\n def json = \"{\" +\n \"\\\"name\\\":\\\"\" + name + \"\\\",\" +\n \"\\\"data_type\\\":\\\"\" + dataType + \"\\\",\" +\n \"\\\"shape\\\":\" + shape + \",\" +\n \"\\\"data\\\":\" + params.embedding +\n \"}\";\n return json;\n ", | ||
"register_remote_model.name": "Bedrock embedding model", | ||
"register_remote_model.description": "bedrock-embedding-model" | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/resources/defaults/bedrock-titan-mulitmodal-defaults.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"template.name": "deploy-bedrock-titan-multimodal-embedding-model", | ||
"template.description": "deploying Amazon Bedrock Titan multimodal embedding model ", | ||
"create_connector.name": "Amazon Bedrock Connector: multi-modal embedding", | ||
"create_connector.description": "The connector to bedrock Titan multi-modal embedding model", | ||
"create_connector.region": "us-east-1", | ||
"create_connector.input_docs_processed_step_size": 2, | ||
"create_connector.endpoint": "api.openai.com", | ||
"create_connector.credential.access_key": "123", | ||
"create_connector.credential.secret_key": "123", | ||
"create_connector.credential.session_token": "123", | ||
"create_connector.actions.url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/amazon.titan-embed-image-v1/invoke", | ||
"create_connector.actions.request_body": "{ \"inputText\": \"${parameters.inputText:-null}\", \"inputImage\": \"${parameters.inputImage:-null}\" }", | ||
"create_connector.actions.pre_process_function": "\n StringBuilder parametersBuilder = new StringBuilder(\"{\");\n if (params.text_docs.length > 0 && params.text_docs[0] != null) {\n parametersBuilder.append(\"\\\"inputText\\\":\");\n parametersBuilder.append(\"\\\"\");\n parametersBuilder.append(params.text_docs[0]);\n parametersBuilder.append(\"\\\"\");\n \n if (params.text_docs.length > 1 && params.text_docs[1] != null) {\n parametersBuilder.append(\",\");\n }\n }\n \n \n if (params.text_docs.length > 1 && params.text_docs[1] != null) {\n parametersBuilder.append(\"\\\"inputImage\\\":\");\n parametersBuilder.append(\"\\\"\");\n parametersBuilder.append(params.text_docs[1]);\n parametersBuilder.append(\"\\\"\");\n }\n parametersBuilder.append(\"}\");\n \n return \"{\" +\"\\\"parameters\\\":\" + parametersBuilder + \"}\";", | ||
"create_connector.actions.post_process_function": "\n def name = \"sentence_embedding\";\n def dataType = \"FLOAT32\";\n if (params.embedding == null || params.embedding.length == 0) {\n return null;\n }\n def shape = [params.embedding.length];\n def json = \"{\" +\n \"\\\"name\\\":\\\"\" + name + \"\\\",\" +\n \"\\\"data_type\\\":\\\"\" + dataType + \"\\\",\" +\n \"\\\"shape\\\":\" + shape + \",\" +\n \"\\\"data\\\":\" + params.embedding +\n \"}\";\n return json;\n ", | ||
"register_remote_model.name": "Bedrock multi-modal embedding model", | ||
"register_remote_model.description": "bedrock-multi-modal-embedding-model" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"template.name": "deploy-cohere-chat-model", | ||
"template.description": "deploying cohere chat model", | ||
"create_connector.name": "Cohere Chat Model", | ||
"create_connector.description": "The connector to Cohere's public chat API", | ||
"create_connector.protocol": "http", | ||
"create_connector.model": "command", | ||
"create_connector.endpoint": "api.cohere.ai", | ||
"create_connector.credential.key": "123", | ||
"create_connector.actions.url": "https://api.cohere.ai/v1/chat", | ||
"create_connector.actions.request_body": "{ \"message\": \"${parameters.message}\", \"model\": \"${parameters.model}\" }", | ||
"register_remote_model.name": "Cohere chat model", | ||
"register_remote_model.description": "cohere-chat-model" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/resources/defaults/cohere-embedding-semantic-search-defaults.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"template.name": "semantic search with cohere embedding", | ||
"template.description": "Setting up semantic search, with cohere embedding model", | ||
"create_connector.name": "cohere-embedding-connector", | ||
"create_connector.description": "The connector to Cohere's public embed API", | ||
"create_connector.protocol": "http", | ||
"create_connector.model": "embed-english-v3.0", | ||
"create_connector.input_type": "search_document", | ||
"create_connector.truncate": "end", | ||
"create_connector.credential.key": "123", | ||
"create_connector.actions.url": "https://api.cohere.ai/v1/embed", | ||
"create_connector.actions.request_body": "{ \"texts\": ${parameters.texts}, \"truncate\": \"${parameters.truncate}\", \"model\": \"${parameters.model}\", \"input_type\": \"${parameters.input_type}\" }", | ||
"create_connector.actions.pre_process_function": "connector.pre_process.cohere.embedding", | ||
"create_connector.actions.post_process_function": "connector.post_process.cohere.embedding", | ||
"register_remote_model.name": "Cohere english embed model", | ||
"register_remote_model.description": "cohere-embedding-model", | ||
"create_ingest_pipeline.pipeline_id": "nlp-ingest-pipeline", | ||
"create_ingest_pipeline.description": "A text embedding pipeline", | ||
"text_embedding.field_map.input": "passage_text", | ||
"text_embedding.field_map.output": "passage_embedding", | ||
"create_index.name": "my-nlp-index", | ||
"create_index.settings.number_of_shards": "2", | ||
"create_index.mappings.method.engine": "lucene", | ||
"create_index.mappings.method.space_type": "l2", | ||
"create_index.mappings.method.name": "hnsw", | ||
"text_embedding.field_map.output.dimension": "1024", | ||
"create_search_pipeline.pipeline_id": "default_model_pipeline" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"template.name": "hybrid-search", | ||
"template.description": "Setting up hybrid search, ingest pipeline and index", | ||
"create_ingest_pipeline.pipeline_id": "nlp-ingest-pipeline", | ||
"create_ingest_pipeline.description": "A text embedding pipeline", | ||
"create_ingest_pipeline.model_id": "123", | ||
"text_embedding.field_map.input": "passage_text", | ||
"text_embedding.field_map.output": "passage_embedding", | ||
"create_index.name": "my-nlp-index", | ||
"create_index.settings.number_of_shards": "2", | ||
"create_index.mappings.method.engine": "lucene", | ||
"create_index.mappings.method.space_type": "l2", | ||
"create_index.mappings.method.name": "hnsw", | ||
"text_embedding.field_map.output.dimension": "1024", | ||
"create_search_pipeline.pipeline_id": "nlp-search-pipeline", | ||
"normalization-processor.normalization.technique": "min_max", | ||
"normalization-processor.combination.technique": "arithmetic_mean", | ||
"normalization-processor.combination.parameters.weights": "[0.3, 0.7]" | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/resources/defaults/local-sparse-search-biencoder-defaults.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"template.name": "local-model-neural-sparse-search", | ||
"template.description": "setting up neural sparse search with local model", | ||
"register_local_sparse_encoding_model.name": "amazon/neural-sparse/opensearch-neural-sparse-encoding-v1", | ||
"register_local_sparse_encoding_model.description": "This is a neural sparse encoding model", | ||
"register_local_sparse_encoding_model.model_format": "TORCH_SCRIPT", | ||
"register_local_sparse_encoding_model.deploy": "true", | ||
"register_local_sparse_encoding_model.version": "1.0.1", | ||
"create_ingest_pipeline.pipeline_id": "nlp-ingest-pipeline-sparse", | ||
"create_ingest_pipeline.description": "A sparse encoding ingest pipeline", | ||
"create_ingest_pipeline.text_embedding.field_map.input": "passage_text", | ||
"create_ingest_pipeline.text_embedding.field_map.output": "passage_embedding", | ||
"create_index.name": "my-nlp-index" | ||
} |
17 changes: 0 additions & 17 deletions
17
src/main/resources/defaults/local-sparse-search-defaults.json
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.