Skip to content

Commit d28b3fd

Browse files
fix: Getting text-embeddings demo. (#3731)
1 parent 358cbbf commit d28b3fd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ai-platform/snippets/predict-text-embeddings-preview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async function main(
3636
async function callPredict() {
3737
const instances = texts
3838
.split(';')
39-
.map(e => helpers.toValue({content: e, taskType: task}));
39+
.map(e => helpers.toValue({content: e, task_type: task}));
4040
const request = {endpoint, instances, parameters};
4141
const client = new PredictionServiceClient(clientOptions);
4242
const [response] = await client.predict(request);

ai-platform/snippets/predict-text-embeddings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async function main(
3939
async function callPredict() {
4040
const instances = texts
4141
.split(';')
42-
.map(e => helpers.toValue({content: e, taskType: task}));
42+
.map(e => helpers.toValue({content: e, task_type: task}));
4343
const request = {endpoint, instances, parameters};
4444
const client = new PredictionServiceClient(clientOptions);
4545
const [response] = await client.predict(request);

0 commit comments

Comments
 (0)