22 lines
533 B
Plaintext
22 lines
533 B
Plaintext
// 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: "watsonx-embeddings",
|
|
inference_config: {
|
|
service: "watsonxai",
|
|
service_settings: {
|
|
api_key: "<api_key>",
|
|
url: "<url>",
|
|
model_id: "ibm/slate-30m-english-rtrvr",
|
|
project_id: "<project_id>",
|
|
api_version: "2024-03-14",
|
|
},
|
|
},
|
|
});
|
|
console.log(response);
|
|
----
|