-
Notifications
You must be signed in to change notification settings - Fork 728
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
6cdb087
commit 60e2f73
Showing
32 changed files
with
2,073 additions
and
502 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
docs/doc_examples/41d24383d29b2808a65258a0a3256e96.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.indices.create({ | ||
index: "jinaai-index", | ||
mappings: { | ||
properties: { | ||
content: { | ||
type: "semantic_text", | ||
inference_id: "jinaai-embeddings", | ||
}, | ||
}, | ||
}, | ||
}); | ||
console.log(response); | ||
---- |
16 changes: 16 additions & 0 deletions
16
docs/doc_examples/5836b09198feb1269ed12839b416123d.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,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 changes: 35 additions & 0 deletions
35
docs/doc_examples/790684b45bef2bb848ea932f0fd0cfbd.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,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 changes: 42 additions & 0 deletions
42
docs/doc_examples/9250ac57ec81d5192e8ad4c462438489.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,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 changes: 22 additions & 0 deletions
22
docs/doc_examples/bf3c3bc41c593a80faebef1df353e483.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,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 changes: 35 additions & 0 deletions
35
docs/doc_examples/cdb7613b445e6ed6e8b473f9cae1af90.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,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 changes: 28 additions & 0 deletions
28
docs/doc_examples/d3672a87a857ddb87519788236e57497.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,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 changes: 18 additions & 0 deletions
18
docs/doc_examples/fff86117c47f974074284644e8a97a99.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.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); | ||
---- |
Oops, something went wrong.