You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.log(response);// { response: 'Hello! How can I assist you today?', conversationId: '...', messageId: '...' }
41
45
42
-
constresponse2=awaitchatGptClient.sendMessage('Write a poem about cats.',{conversationId: response.conversationId,parentMessageId: response.messageId});
43
-
console.log(response2.response);// Cats are the best pets in the world.
46
+
response=awaitchatGptClient.sendMessage('Write a short poem about cats.',{conversationId: response.conversationId,parentMessageId: response.messageId});
47
+
console.log(response.response);// Soft and sleek, with eyes that gleam,\nCats are creatures of grace supreme.\n...
48
+
console.log();
49
+
50
+
response=awaitchatGptClient.sendMessage('Now write it in French.',{
51
+
conversationId: response.conversationId,
52
+
parentMessageId: response.messageId,
53
+
// If you want streamed responses, you can set the `onProgress` callback to receive the response as it's generated.
54
+
// You will receive one token at a time, so you will need to concatenate them yourself.
55
+
onProgress: (token)=>process.stdout.write(token),
56
+
});
57
+
console.log();
58
+
console.log(response.response);// Doux et élégant, avec des yeux qui brillent,\nLes chats sont des créatures de grâce suprême.\n...
44
59
45
-
constresponse3=awaitchatGptClient.sendMessage('Now write it in French.',{
46
-
conversationId: response2.conversationId,
47
-
parentMessageId: response2.messageId,
60
+
response=awaitchatGptClient.sendMessage('Repeat my 2nd message verbatim.',{
61
+
conversationId: response.conversationId,
62
+
parentMessageId: response.messageId,
48
63
// If you want streamed responses, you can set the `onProgress` callback to receive the response as it's generated.
49
64
// You will receive one token at a time, so you will need to concatenate them yourself.
50
65
onProgress: (token)=>process.stdout.write(token),
51
66
});
52
67
console.log();
53
-
console.log(response3.response);// Les chats sont les meilleurs animaux de compagnie du monde.
68
+
console.log(response.response);// "Write a short poem about cats."
0 commit comments