@@ -39,7 +39,15 @@ async function main() {
39
39
const completionCreateResponse = await client .completion .create (' 637ae1aa8f4aa6fad144ccbd' , {
40
40
// Optionally append additional messages to the converstation thread on top of your configured prompt messages
41
41
appendMessages: [
42
- { role: ' user' , content: [{ type: ' TEXT' , text: ' What is the weather in Seattle, WA?' }] },
42
+ {
43
+ role: ' user' ,
44
+ content: [
45
+ {
46
+ type: ' TEXT' ,
47
+ text: ' What is the weather in Seattle, WA?' ,
48
+ },
49
+ ],
50
+ },
43
51
],
44
52
// Supports prompt template variables
45
53
variables: {},
@@ -84,6 +92,17 @@ async function main() {
84
92
// Retrieve model parameters for the prompt
85
93
const modelParameters = await promptFoundry .prompts .getParameters (' 1212121' , {
86
94
variables: { hello: ' world' },
95
+ appendMessages: [
96
+ {
97
+ role: ' user' ,
98
+ content: [
99
+ {
100
+ type: ' TEXT' ,
101
+ text: ' What is the weather in Seattle, WA?' ,
102
+ },
103
+ ],
104
+ },
105
+ ],
87
106
});
88
107
89
108
// check if provider is Open AI
@@ -127,6 +146,17 @@ async function main() {
127
146
// Retrieve model parameters for the prompt
128
147
const modelParameters = await promptFoundry .prompts .getParameters (' 1212121' , {
129
148
variables: { hello: ' world' },
149
+ appendMessages: [
150
+ {
151
+ role: ' user' ,
152
+ content: [
153
+ {
154
+ type: ' TEXT' ,
155
+ text: ' What is the weather in Seattle, WA?' ,
156
+ },
157
+ ],
158
+ },
159
+ ],
130
160
});
131
161
132
162
// check if provider is Open AI
0 commit comments