Auto-generated code for 8.16 (#2569)
This commit is contained in:
18
docs/doc_examples/41d24383d29b2808a65258a0a3256e96.asciidoc
Normal file
18
docs/doc_examples/41d24383d29b2808a65258a0a3256e96.asciidoc
Normal file
@ -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.indices.create({
|
||||||
|
index: "jinaai-index",
|
||||||
|
mappings: {
|
||||||
|
properties: {
|
||||||
|
content: {
|
||||||
|
type: "semantic_text",
|
||||||
|
inference_id: "jinaai-embeddings",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
16
docs/doc_examples/5836b09198feb1269ed12839b416123d.asciidoc
Normal file
16
docs/doc_examples/5836b09198feb1269ed12839b416123d.asciidoc
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// 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: "jinaai-index",
|
||||||
|
query: {
|
||||||
|
semantic: {
|
||||||
|
field: "content",
|
||||||
|
query: "who inspired taking care of the sea?",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
35
docs/doc_examples/790684b45bef2bb848ea932f0fd0cfbd.asciidoc
Normal file
35
docs/doc_examples/790684b45bef2bb848ea932f0fd0cfbd.asciidoc
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// 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({
|
||||||
|
query: {
|
||||||
|
intervals: {
|
||||||
|
my_text: {
|
||||||
|
all_of: {
|
||||||
|
ordered: false,
|
||||||
|
max_gaps: 1,
|
||||||
|
intervals: [
|
||||||
|
{
|
||||||
|
match: {
|
||||||
|
query: "my favorite food",
|
||||||
|
max_gaps: 0,
|
||||||
|
ordered: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
match: {
|
||||||
|
query: "cold porridge",
|
||||||
|
max_gaps: 4,
|
||||||
|
ordered: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
42
docs/doc_examples/9250ac57ec81d5192e8ad4c462438489.asciidoc
Normal file
42
docs/doc_examples/9250ac57ec81d5192e8ad4c462438489.asciidoc
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
// 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.bulk({
|
||||||
|
index: "jinaai-index",
|
||||||
|
operations: [
|
||||||
|
{
|
||||||
|
index: {
|
||||||
|
_index: "jinaai-index",
|
||||||
|
_id: "1",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
content:
|
||||||
|
"Sarah Johnson is a talented marine biologist working at the Oceanographic Institute. Her groundbreaking research on coral reef ecosystems has garnered international attention and numerous accolades.",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: {
|
||||||
|
_index: "jinaai-index",
|
||||||
|
_id: "2",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
content:
|
||||||
|
"She spends months at a time diving in remote locations, meticulously documenting the intricate relationships between various marine species. ",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
index: {
|
||||||
|
_index: "jinaai-index",
|
||||||
|
_id: "3",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
content:
|
||||||
|
"Her dedication to preserving these delicate underwater environments has inspired a new generation of conservationists.",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
22
docs/doc_examples/bf3c3bc41c593a80faebef1df353e483.asciidoc
Normal file
22
docs/doc_examples/bf3c3bc41c593a80faebef1df353e483.asciidoc
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// 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.inference.put({
|
||||||
|
task_type: "rerank",
|
||||||
|
inference_id: "jinaai-rerank",
|
||||||
|
inference_config: {
|
||||||
|
service: "jinaai",
|
||||||
|
service_settings: {
|
||||||
|
api_key: "<api_key>",
|
||||||
|
model_id: "jina-reranker-v2-base-multilingual",
|
||||||
|
},
|
||||||
|
task_settings: {
|
||||||
|
top_n: 10,
|
||||||
|
return_documents: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
35
docs/doc_examples/cdb7613b445e6ed6e8b473f9cae1af90.asciidoc
Normal file
35
docs/doc_examples/cdb7613b445e6ed6e8b473f9cae1af90.asciidoc
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// 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({
|
||||||
|
query: {
|
||||||
|
intervals: {
|
||||||
|
my_text: {
|
||||||
|
all_of: {
|
||||||
|
ordered: true,
|
||||||
|
max_gaps: 1,
|
||||||
|
intervals: [
|
||||||
|
{
|
||||||
|
match: {
|
||||||
|
query: "my favorite food",
|
||||||
|
max_gaps: 0,
|
||||||
|
ordered: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
match: {
|
||||||
|
query: "cold porridge",
|
||||||
|
max_gaps: 4,
|
||||||
|
ordered: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
28
docs/doc_examples/d3672a87a857ddb87519788236e57497.asciidoc
Normal file
28
docs/doc_examples/d3672a87a857ddb87519788236e57497.asciidoc
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
// 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: "jinaai-index",
|
||||||
|
retriever: {
|
||||||
|
text_similarity_reranker: {
|
||||||
|
retriever: {
|
||||||
|
standard: {
|
||||||
|
query: {
|
||||||
|
semantic: {
|
||||||
|
field: "content",
|
||||||
|
query: "who inspired taking care of the sea?",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
field: "content",
|
||||||
|
rank_window_size: 100,
|
||||||
|
inference_id: "jinaai-rerank",
|
||||||
|
inference_text: "who inspired taking care of the sea?",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
18
docs/doc_examples/fff86117c47f974074284644e8a97a99.asciidoc
Normal file
18
docs/doc_examples/fff86117c47f974074284644e8a97a99.asciidoc
Normal file
@ -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.inference.put({
|
||||||
|
task_type: "text_embedding",
|
||||||
|
inference_id: "jinaai-embeddings",
|
||||||
|
inference_config: {
|
||||||
|
service: "jinaai",
|
||||||
|
service_settings: {
|
||||||
|
model_id: "jina-embeddings-v3",
|
||||||
|
api_key: "<api_key>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
console.log(response);
|
||||||
|
----
|
||||||
Reference in New Issue
Block a user