-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f33aa8c
commit a59e50c
Showing
8 changed files
with
236 additions
and
51 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
docs/doc_examples/53d9d2ec9cb8d211772d764e76fe6890.asciidoc
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 @@ | ||
// This file is autogenerated, DO NOT EDIT | ||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples | ||
|
||
[source, js] | ||
---- | ||
const response = await client.ingest.simulate({ | ||
id: "query_helper_pipeline", | ||
docs: [ | ||
{ | ||
_source: { | ||
content: | ||
"artificial intelligence in medicine articles published in the last 12 months", | ||
}, | ||
}, | ||
], | ||
}); | ||
console.log(response); | ||
---- |
32 changes: 32 additions & 0 deletions
32
docs/doc_examples/931817b168e055ecf738785c721125dd.asciidoc
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,32 @@ | ||
// This file is autogenerated, DO NOT EDIT | ||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples | ||
|
||
[source, js] | ||
---- | ||
const response = await client.ingest.putPipeline({ | ||
id: "query_helper_pipeline", | ||
processors: [ | ||
{ | ||
script: { | ||
source: | ||
"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", | ||
}, | ||
}, | ||
{ | ||
inference: { | ||
model_id: "openai_chat_completions", | ||
input_output: { | ||
input_field: "prompt", | ||
output_field: "query", | ||
}, | ||
}, | ||
}, | ||
{ | ||
remove: { | ||
field: "prompt", | ||
}, | ||
}, | ||
], | ||
}); | ||
console.log(response); | ||
---- |
24 changes: 24 additions & 0 deletions
24
docs/doc_examples/d29031409016b2b798148ef173a196ae.asciidoc
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,24 @@ | ||
// This file is autogenerated, DO NOT EDIT | ||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples | ||
|
||
[source, js] | ||
---- | ||
const response = await client.indices.create({ | ||
index: "test-index", | ||
query: { | ||
semantic: { | ||
field: "my_semantic_field", | ||
}, | ||
}, | ||
highlight: { | ||
fields: { | ||
my_semantic_field: { | ||
type: "semantic", | ||
number_of_fragments: 2, | ||
order: "score", | ||
}, | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.