Skip to content

Commit b3e523a

Browse files
Auto-generated code for 8.17 (#2528)
1 parent dd0a304 commit b3e523a

28 files changed

+253
-165
lines changed

docs/doc_examples/160986f49758f4e8345d183a842f6351.asciidoc renamed to docs/doc_examples/0c52af573c9401a2a687e86a4beb182b.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const response = await client.ingest.putPipeline({
1010
{
1111
attachment: {
1212
field: "data",
13-
remove_binary: false,
13+
remove_binary: true,
1414
},
1515
},
1616
],
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.ingest.putPipeline({
7+
id: "attachment",
8+
description: "Extract attachment information including original binary",
9+
processors: [
10+
{
11+
attachment: {
12+
field: "data",
13+
remove_binary: false,
14+
},
15+
},
16+
],
17+
});
18+
console.log(response);
19+
20+
const response1 = await client.index({
21+
index: "my-index-000001",
22+
id: "my_id",
23+
pipeline: "attachment",
24+
document: {
25+
data: "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=",
26+
},
27+
});
28+
console.log(response1);
29+
30+
const response2 = await client.get({
31+
index: "my-index-000001",
32+
id: "my_id",
33+
});
34+
console.log(response2);
35+
----

docs/doc_examples/9f16fca9813304e398ee052aa857dbcd.asciidoc renamed to docs/doc_examples/48e142e6c69014e0509d4c9251749d77.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const response = await client.inference.put({
1010
service: "openai",
1111
service_settings: {
1212
api_key: "<api_key>",
13-
model_id: "text-embedding-ada-002",
13+
model_id: "text-embedding-3-small",
14+
dimensions: 128,
1415
},
1516
},
1617
});

docs/doc_examples/49b31e23f8b9667b6a7b2734d55fb6ed.asciidoc

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.ingest.simulate({
7+
id: "query_helper_pipeline",
8+
docs: [
9+
{
10+
_source: {
11+
content:
12+
"artificial intelligence in medicine articles published in the last 12 months",
13+
},
14+
},
15+
],
16+
});
17+
console.log(response);
18+
----

docs/doc_examples/5a70db31f587b7ffed5e9bc1445430cb.asciidoc

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/doc_examples/f4d0ef2e0f76babee83d999fe35127f2.asciidoc renamed to docs/doc_examples/80135e8c644e34cc70ce8a4e7915d1a2.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const response = await client.ingest.putPipeline({
1212
field: "data",
1313
indexed_chars: 11,
1414
indexed_chars_field: "max_size",
15-
remove_binary: false,
15+
remove_binary: true,
1616
},
1717
},
1818
],

docs/doc_examples/8cad5d95a0e7c103f08be53d0b172558.asciidoc

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.ingest.putPipeline({
7+
id: "query_helper_pipeline",
8+
processors: [
9+
{
10+
script: {
11+
source:
12+
"ctx.prompt = 'Please generate an elasticsearch search query on index `articles_index` for the following natural language query. Dates are in the field `@timestamp`, document types are in the field `type` (options are `news`, `publication`), categories in the field `category` and can be multiple (options are `medicine`, `pharmaceuticals`, `technology`), and document names are in the field `title` which should use a fuzzy match. Ignore fields which cannot be determined from the natural language query context: ' + ctx.content",
13+
},
14+
},
15+
{
16+
inference: {
17+
model_id: "openai_chat_completions",
18+
input_output: {
19+
input_field: "prompt",
20+
output_field: "query",
21+
},
22+
},
23+
},
24+
{
25+
remove: {
26+
field: "prompt",
27+
},
28+
},
29+
],
30+
});
31+
console.log(response);
32+
----

docs/doc_examples/8593715fcc70315a0816b435551258e0.asciidoc renamed to docs/doc_examples/93c77c65f1e11382f8043d0300e87b89.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const response = await client.indices.create({
99
properties: {
1010
infer_field: {
1111
type: "semantic_text",
12-
inference_id: "my-elser-endpoint",
12+
inference_id: ".elser-2-elasticsearch",
1313
},
1414
source_field: {
1515
type: "text",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy