Auto-generated code for 8.x (#2500)

This commit is contained in:
Elastic Machine
2024-12-02 18:06:57 +00:00
committed by GitHub
parent dbd0ec2457
commit 4e1273ef33
34 changed files with 1024 additions and 102 deletions

View File

@ -0,0 +1,37 @@
// 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.search({
index: "retrievers_example",
retriever: {
text_similarity_reranker: {
retriever: {
text_similarity_reranker: {
retriever: {
knn: {
field: "vector",
query_vector: [0.23, 0.67, 0.89],
k: 3,
num_candidates: 5,
},
},
rank_window_size: 100,
field: "text",
inference_id: "my-rerank-model",
inference_text:
"What are the state of the art applications of AI in information retrieval?",
},
},
rank_window_size: 10,
field: "text",
inference_id: "my-other-more-expensive-rerank-model",
inference_text:
"Applications of Large Language Models in technology and their impact on user satisfaction",
},
},
_source: false,
});
console.log(response);
----