Skip to content

Commit

Permalink
Minor Update in generate-embeddings file (#8543)
Browse files Browse the repository at this point in the history
* Update generate-embeddings.md

Currently the following request -
```
PUT _ingest/pipeline/bedrock_embedding_pipeline
{
  "processors": [
    {
      "set": {
        "field": "title_tmp",
        "value": "{{_ingest._value.title}}"
      }
    },
    {
      "text_embedding": {
        "model_id": your_embedding_model_id,
        "field_map": {
          "title_tmp": "_ingest._value.title_embedding"
        }
      }
    },
    {
      "remove": {
        "field": "title_tmp"
      }
    }
  ]
}
```
Does not render correctly and `{{_ingest._value.title}}` is shown as blank, thus removed `{{}}`

Signed-off-by: Utkarsh Agarwal <126544832+Utkarsh-Aga@users.noreply.github.com>

* Update _ml-commons-plugin/tutorials/generate-embeddings.md

Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Signed-off-by: Utkarsh Agarwal <126544832+Utkarsh-Aga@users.noreply.github.com>

---------

Signed-off-by: Utkarsh Agarwal <126544832+Utkarsh-Aga@users.noreply.github.com>
Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
  • Loading branch information
Utkarsh-Aga and kolchfa-aws authored Oct 17, 2024
1 parent 202d496 commit 408a549
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _ml-commons-plugin/tutorials/generate-embeddings.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ PUT _ingest/pipeline/bedrock_embedding_pipeline
{
"set": {
"field": "title_tmp",
"value": "{{_ingest._value.title}}"
"value": {% raw %}"{{_ingest._value.title}}"{% endraw %}
}
},
{
Expand Down Expand Up @@ -333,4 +333,4 @@ POST _bulk
{ "index" : { "_index" : "my_books" } }
{ "books" : [{"title": "third book", "description": "This is third book"}, {"description": "This is fourth book"}] }
```
{% include copy-curl.html %}
{% include copy-curl.html %}

0 comments on commit 408a549

Please sign in to comment.