Skip to content

Commit c025dd4

Browse files
committed
fix(aiplatform): update model parameters and instances
1 parent 5d14691 commit c025dd4

5 files changed

+10
-10
lines changed

ai-platform/snippets/predict-code-chat.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ async function main(project, location = 'us-central1') {
4949
const prompt = {
5050
messages: [
5151
{
52-
author: 'content',
52+
author: 'user',
5353
content: 'Hi, how are you?',
5454
},
5555
{
5656
author: 'system',
5757
content: 'I am doing good. What can I help you in the coding world?',
5858
},
5959
{
60-
author: 'content',
60+
author: 'user',
6161
content:
6262
'Please help write a function to calculate the min of two numbers',
6363
},
@@ -67,8 +67,8 @@ async function main(project, location = 'us-central1') {
6767
const instances = [instanceValue];
6868

6969
const parameter = {
70-
temperature: 0.2,
71-
maxOutputTokens: 256,
70+
temperature: 0.5,
71+
maxOutputTokens: 1024,
7272
};
7373
const parameters = helpers.toValue(parameter);
7474

ai-platform/snippets/predict-code-completion-comment.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ async function main(project, location = 'us-central1') {
5050
prefix:
5151
'def reverse_string(s): \
5252
return s[::-1] \
53-
//This function',
53+
#This function',
5454
};
5555
const instanceValue = helpers.toValue(prompt);
5656
const instances = [instanceValue];
5757

5858
const parameter = {
5959
temperature: 0.2,
60-
maxOutputTokens: 256,
60+
maxOutputTokens: 64,
6161
};
6262
const parameters = helpers.toValue(parameter);
6363

ai-platform/snippets/predict-code-completion-test-function.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ async function main(project, location = 'us-central1') {
5757

5858
const parameter = {
5959
temperature: 0.2,
60-
maxOutputTokens: 256,
60+
maxOutputTokens: 64,
6161
};
6262
const parameters = helpers.toValue(parameter);
6363

ai-platform/snippets/predict-code-generation-function.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ async function main(project, location = 'us-central1') {
5353
const instances = [instanceValue];
5454

5555
const parameter = {
56-
temperature: 0.2,
56+
temperature: 0.5,
5757
maxOutputTokens: 256,
5858
};
5959
const parameters = helpers.toValue(parameter);

ai-platform/snippets/predict-code-generation-unittest.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ async function main(project, location = 'us-central1') {
6565
const instances = [instanceValue];
6666

6767
const parameter = {
68-
temperature: 0.2,
69-
maxOutputTokens: 512,
68+
temperature: 0.5,
69+
maxOutputTokens: 256,
7070
};
7171
const parameters = helpers.toValue(parameter);
7272

0 commit comments

Comments
 (0)