Skip to content

Commit

Permalink
Auto-generated code for 8.15 (#2359)
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed Sep 3, 2024
1 parent 411f379 commit 8f028a5
Show file tree
Hide file tree
Showing 82 changed files with 767 additions and 403 deletions.
8 changes: 4 additions & 4 deletions docs/doc_examples/00fea15cbca83be9d5f1a024ff2ec708.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

[source, js]
----
const response = await client.transport.request({
method: "PUT",
path: "/_inference/text_embedding/my-e5-model",
body: {
const response = await client.inference.put({
task_type: "text_embedding",
inference_id: "my-e5-model",
inference_config: {
service: "elasticsearch",
service_settings: {
num_allocations: 1,
Expand Down
11 changes: 4 additions & 7 deletions docs/doc_examples/04412d11783dac25b5fd2ec5407078a3.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@

[source, js]
----
const response = await client.transport.request({
method: "PUT",
path: "/_connector/my-connector/_api_key_id",
body: {
api_key_id: "my-api-key-id",
api_key_secret_id: "my-connector-secret-id",
},
const response = await client.connector.updateApiKeyId({
connector_id: "my-connector",
api_key_id: "my-api-key-id",
api_key_secret_id: "my-connector-secret-id",
});
console.log(response);
----
8 changes: 4 additions & 4 deletions docs/doc_examples/04de2e3a9c00c2056b07bf9cf9e63a99.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

[source, js]
----
const response = await client.transport.request({
method: "PUT",
path: "/_inference/text_embedding/google_vertex_ai_embeddings",
body: {
const response = await client.inference.put({
task_type: "text_embedding",
inference_id: "google_vertex_ai_embeddings",
inference_config: {
service: "googlevertexai",
service_settings: {
service_account_json: "<service_account_json>",
Expand Down
8 changes: 4 additions & 4 deletions docs/doc_examples/0ad8edd10542ec2c4d5d8700d7e2ba97.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

[source, js]
----
const response = await client.transport.request({
method: "PUT",
path: "/_inference/text_embedding/amazon_bedrock_embeddings",
body: {
const response = await client.inference.put({
task_type: "text_embedding",
inference_id: "amazon_bedrock_embeddings",
inference_config: {
service: "amazonbedrock",
service_settings: {
access_key: "<aws_access_key>",
Expand Down
43 changes: 20 additions & 23 deletions docs/doc_examples/0ade87c8cb0e3c188d2e3dce279d5cc2.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,26 @@

[source, js]
----
const response = await client.transport.request({
method: "PUT",
path: "/_connector/my-g-drive-connector/_filtering",
body: {
rules: [
{
field: "file_extension",
id: "exclude-txt-files",
order: 0,
policy: "exclude",
rule: "equals",
value: "txt",
},
{
field: "_",
id: "DEFAULT",
order: 1,
policy: "include",
rule: "regex",
value: ".*",
},
],
},
const response = await client.connector.updateFiltering({
connector_id: "my-g-drive-connector",
rules: [
{
field: "file_extension",
id: "exclude-txt-files",
order: 0,
policy: "exclude",
rule: "equals",
value: "txt",
},
{
field: "_",
id: "DEFAULT",
order: 1,
policy: "include",
rule: "regex",
value: ".*",
},
],
});
console.log(response);
----
12 changes: 5 additions & 7 deletions docs/doc_examples/13ecdf99114098c76b050397d9c3d4e6.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@

[source, js]
----
const response = await client.transport.request({
method: "POST",
path: "/_inference/sparse_embedding/my-elser-model",
body: {
input:
"The sky above the port was the color of television tuned to a dead channel.",
},
const response = await client.inference.inference({
task_type: "sparse_embedding",
inference_id: "my-elser-model",
input:
"The sky above the port was the color of television tuned to a dead channel.",
});
console.log(response);
----
23 changes: 23 additions & 0 deletions docs/doc_examples/13fe12cdb73bc89f07a83f1e6b127511.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// 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: "google-vertex-ai-embeddings",
mappings: {
properties: {
content_embedding: {
type: "dense_vector",
dims: 768,
element_type: "float",
similarity: "dot_product",
},
content: {
type: "text",
},
},
},
});
console.log(response);
----
6 changes: 3 additions & 3 deletions docs/doc_examples/19d60e4890cc57151d596326484d9076.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

[source, js]
----
const response = await client.ingest.deleteGeoipDatabase({
id: "my-database-id",
body: null,
const response = await client.transport.request({
method: "DELETE",
path: "/_ingest/geoip/database/my-database-id",
});
console.log(response);
----
8 changes: 4 additions & 4 deletions docs/doc_examples/1a56df055b94466ca76818e0858752c6.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

[source, js]
----
const response = await client.transport.request({
method: "PUT",
path: "/_inference/text_embedding/openai_embeddings",
body: {
const response = await client.inference.put({
task_type: "text_embedding",
inference_id: "openai_embeddings",
inference_config: {
service: "openai",
service_settings: {
api_key: "<api_key>",
Expand Down
8 changes: 4 additions & 4 deletions docs/doc_examples/1a9e03ce0355872a7db27fedc783fbec.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

[source, js]
----
const response = await client.transport.request({
method: "PUT",
path: "/_inference/rerank/google_vertex_ai_rerank",
body: {
const response = await client.inference.put({
task_type: "rerank",
inference_id: "google_vertex_ai_rerank",
inference_config: {
service: "googlevertexai",
service_settings: {
service_account_json: "<service_account_json>",
Expand Down
8 changes: 4 additions & 4 deletions docs/doc_examples/1b60ad542abb511cbd926ac8c55b609c.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

[source, js]
----
const response = await client.transport.request({
method: "PUT",
path: "/_inference/sparse_embedding/my-elser-model",
body: {
const response = await client.inference.put({
task_type: "sparse_embedding",
inference_id: "my-elser-model",
inference_config: {
service: "elser",
service_settings: {
adaptive_allocations: {
Expand Down
8 changes: 4 additions & 4 deletions docs/doc_examples/1dadb7efe27b6c0c231eb6535e413bd9.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

[source, js]
----
const response = await client.transport.request({
method: "PUT",
path: "/_inference/text_embedding/azure_ai_studio_embeddings",
body: {
const response = await client.inference.put({
task_type: "text_embedding",
inference_id: "azure_ai_studio_embeddings",
inference_config: {
service: "azureaistudio",
service_settings: {
api_key: "<api_key>",
Expand Down
8 changes: 2 additions & 6 deletions docs/doc_examples/1e26353d546d733634187b8c3a7837a7.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@

[source, js]
----
const response = await client.transport.request({
method: "GET",
path: "/_connector",
querystring: {
service_type: "sharepoint_online",
},
const response = await client.connector.list({
service_type: "sharepoint_online",
});
console.log(response);
----
22 changes: 22 additions & 0 deletions docs/doc_examples/20179a8889e949d6a8ee5fbf2ba35c96.asciidoc
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.search({
index: "google-vertex-ai-embeddings",
knn: {
field: "content_embedding",
query_vector_builder: {
text_embedding: {
model_id: "google_vertex_ai_embeddings",
model_text: "Calculate fuel cost",
},
},
k: 10,
num_candidates: 100,
},
_source: ["id", "content"],
});
console.log(response);
----
8 changes: 4 additions & 4 deletions docs/doc_examples/21cd01cb90d3ea1acd0ab22d7edd2c88.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

[source, js]
----
const response = await client.transport.request({
method: "PUT",
path: "/_inference/text_embedding/azure_ai_studio_embeddings",
body: {
const response = await client.inference.put({
task_type: "text_embedding",
inference_id: "azure_ai_studio_embeddings",
inference_config: {
service: "azureaistudio",
service_settings: {
api_key: "<api_key>",
Expand Down
13 changes: 5 additions & 8 deletions docs/doc_examples/342ddf9121aeddd82fea2464665e25da.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@

[source, js]
----
const response = await client.transport.request({
method: "PUT",
path: "/_connector/my-connector",
body: {
index_name: "search-google-drive",
name: "My Connector",
service_type: "google_drive",
},
const response = await client.connector.put({
connector_id: "my-connector",
index_name: "search-google-drive",
name: "My Connector",
service_type: "google_drive",
});
console.log(response);
----
8 changes: 4 additions & 4 deletions docs/doc_examples/398389933901b572a06a752bc780af7c.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

[source, js]
----
const response = await client.transport.request({
method: "PUT",
path: "/_inference/completion/anthropic_completion",
body: {
const response = await client.inference.put({
task_type: "completion",
inference_id: "anthropic_completion",
inference_config: {
service: "anthropic",
service_settings: {
api_key: "<api_key>",
Expand Down
6 changes: 3 additions & 3 deletions docs/doc_examples/3b6718257421b5419bf4cd6a7303c57e.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

[source, js]
----
const response = await client.ingest.getGeoipDatabase({
id: "my-database-id",
body: null,
const response = await client.transport.request({
method: "GET",
path: "/_ingest/geoip/database/my-database-id",
});
console.log(response);
----
20 changes: 20 additions & 0 deletions docs/doc_examples/3c0d0c38e1c819a35a68cdba5ae8ccc4.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// 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: "alibabacloud_ai_search_embeddings",
inference_config: {
service: "alibabacloud-ai-search",
service_settings: {
api_key: "<api_key>",
service_id: "<service_id>",
host: "<host>",
workspace: "<workspace>",
},
},
});
console.log(response);
----
17 changes: 7 additions & 10 deletions docs/doc_examples/41175d304e660da2931764f9a4418fd3.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@

[source, js]
----
const response = await client.transport.request({
method: "PUT",
path: "/_connector/my-connector/_pipeline",
body: {
pipeline: {
extract_binary_content: true,
name: "my-connector-pipeline",
reduce_whitespace: true,
run_ml_inference: true,
},
const response = await client.connector.updatePipeline({
connector_id: "my-connector",
pipeline: {
extract_binary_content: true,
name: "my-connector-pipeline",
reduce_whitespace: true,
run_ml_inference: true,
},
});
console.log(response);
Expand Down
9 changes: 3 additions & 6 deletions docs/doc_examples/430705509f8367aef92be413f702520b.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@

[source, js]
----
const response = await client.transport.request({
method: "PUT",
path: "/_connector/my-connector/_status",
body: {
status: "needs_configuration",
},
const response = await client.connector.updateStatus({
connector_id: "my-connector",
status: "needs_configuration",
});
console.log(response);
----
Loading

0 comments on commit 8f028a5

Please sign in to comment.