Skip to content

Commit 201dd7e

Browse files
stainless-app[bot]Stainless Bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#108)
1 parent 5e3ffcd commit 201dd7e

File tree

7 files changed

+56
-56
lines changed

7 files changed

+56
-56
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 21
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prompt-foundry%2Fprompt-foundry-sdk-d77f7f9f32373ca58fafe721c7c3bab1ba26d366ff00e7f5c59e6cf1058a9db2.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prompt-foundry%2Fprompt-foundry-sdk-2ed0eba8700d06f5263ff3848c714cdd3f07b4942b13bfa3c744d3720cca1615.yml

src/resources/evaluation-assertions.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ export interface EvaluationAssertion {
8383
* The type of evaluation matcher to use.
8484
*/
8585
type:
86-
| 'EXACT_MATCH'
8786
| 'CONTAINS'
88-
| 'JSON_EXACT_MATCH'
87+
| 'EXACT_MATCH'
8988
| 'JSON_CONTAINS'
89+
| 'JSON_EXACT_MATCH'
9090
| 'TOOL_CALLED'
9191
| 'TOOL_CALLED_WITH';
9292
}
@@ -118,10 +118,10 @@ export interface EvaluationAssertionCreateParams {
118118
* The type of evaluation matcher to use.
119119
*/
120120
type:
121-
| 'EXACT_MATCH'
122121
| 'CONTAINS'
123-
| 'JSON_EXACT_MATCH'
122+
| 'EXACT_MATCH'
124123
| 'JSON_CONTAINS'
124+
| 'JSON_EXACT_MATCH'
125125
| 'TOOL_CALLED'
126126
| 'TOOL_CALLED_WITH';
127127
}
@@ -147,10 +147,10 @@ export interface EvaluationAssertionUpdateParams {
147147
* The type of evaluation matcher to use.
148148
*/
149149
type:
150-
| 'EXACT_MATCH'
151150
| 'CONTAINS'
152-
| 'JSON_EXACT_MATCH'
151+
| 'EXACT_MATCH'
153152
| 'JSON_CONTAINS'
153+
| 'JSON_EXACT_MATCH'
154154
| 'TOOL_CALLED'
155155
| 'TOOL_CALLED_WITH';
156156
}

src/resources/evaluations.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export namespace Evaluation {
7171
*/
7272
content: string | null;
7373

74-
role: 'user' | 'assistant' | 'system' | 'tool';
74+
role: 'assistant' | 'system' | 'tool' | 'user';
7575

7676
toolCallId: string | null;
7777

@@ -142,7 +142,7 @@ export namespace EvaluationCreateParams {
142142
*/
143143
content: string | null;
144144

145-
role: 'user' | 'assistant' | 'system' | 'tool';
145+
role: 'assistant' | 'system' | 'tool' | 'user';
146146

147147
toolCallId: string | null;
148148

@@ -207,7 +207,7 @@ export namespace EvaluationUpdateParams {
207207
*/
208208
content: string | null;
209209

210-
role: 'user' | 'assistant' | 'system' | 'tool';
210+
role: 'assistant' | 'system' | 'tool' | 'user';
211211

212212
toolCallId: string | null;
213213

src/resources/prompts.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ export namespace PromptConfiguration {
291291
*/
292292
content: string | null;
293293

294-
role: 'user' | 'assistant' | 'system' | 'tool';
294+
role: 'assistant' | 'system' | 'tool' | 'user';
295295

296296
toolCallId: string | null;
297297

@@ -357,7 +357,7 @@ export namespace PromptConfiguration {
357357
/**
358358
* Example: PromptResponseFormat.TEXT
359359
*/
360-
responseFormat: 'TEXT' | 'JSON';
360+
responseFormat: 'JSON' | 'TEXT';
361361

362362
/**
363363
* Example: 97946543
@@ -432,7 +432,7 @@ export namespace PromptCreateParams {
432432
*/
433433
content: string | null;
434434

435-
role: 'user' | 'assistant' | 'system' | 'tool';
435+
role: 'assistant' | 'system' | 'tool' | 'user';
436436

437437
toolCallId: string | null;
438438

@@ -498,7 +498,7 @@ export namespace PromptCreateParams {
498498
/**
499499
* Example: PromptResponseFormat.TEXT
500500
*/
501-
responseFormat: 'TEXT' | 'JSON';
501+
responseFormat: 'JSON' | 'TEXT';
502502

503503
/**
504504
* Example: 97946543
@@ -545,7 +545,7 @@ export namespace PromptUpdateParams {
545545
*/
546546
content: string | null;
547547

548-
role: 'user' | 'assistant' | 'system' | 'tool';
548+
role: 'assistant' | 'system' | 'tool' | 'user';
549549

550550
toolCallId: string | null;
551551

@@ -611,7 +611,7 @@ export namespace PromptUpdateParams {
611611
/**
612612
* Example: PromptResponseFormat.TEXT
613613
*/
614-
responseFormat: 'TEXT' | 'JSON';
614+
responseFormat: 'JSON' | 'TEXT';
615615

616616
/**
617617
* Example: 97946543
@@ -672,7 +672,7 @@ export namespace PromptGetParametersParams {
672672
*/
673673
content: string | null;
674674

675-
role: 'user' | 'assistant' | 'system' | 'tool';
675+
role: 'assistant' | 'system' | 'tool' | 'user';
676676

677677
toolCallId: string | null;
678678

@@ -721,7 +721,7 @@ export namespace PromptGetParametersParams {
721721
*/
722722
content: string | null;
723723

724-
role: 'user' | 'assistant' | 'system' | 'tool';
724+
role: 'assistant' | 'system' | 'tool' | 'user';
725725

726726
toolCallId: string | null;
727727

tests/api-resources/evaluation-assertions.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('resource evaluationAssertions', () => {
1515
jsonPath: 'string',
1616
targetValue: 'string',
1717
toolName: 'string',
18-
type: 'EXACT_MATCH',
18+
type: 'CONTAINS',
1919
});
2020
const rawResponse = await responsePromise.asResponse();
2121
expect(rawResponse).toBeInstanceOf(Response);
@@ -32,7 +32,7 @@ describe('resource evaluationAssertions', () => {
3232
jsonPath: 'string',
3333
targetValue: 'string',
3434
toolName: 'string',
35-
type: 'EXACT_MATCH',
35+
type: 'CONTAINS',
3636
});
3737
});
3838

@@ -42,7 +42,7 @@ describe('resource evaluationAssertions', () => {
4242
jsonPath: 'string',
4343
targetValue: 'string',
4444
toolName: 'string',
45-
type: 'EXACT_MATCH',
45+
type: 'CONTAINS',
4646
});
4747
const rawResponse = await responsePromise.asResponse();
4848
expect(rawResponse).toBeInstanceOf(Response);
@@ -59,7 +59,7 @@ describe('resource evaluationAssertions', () => {
5959
jsonPath: 'string',
6060
targetValue: 'string',
6161
toolName: 'string',
62-
type: 'EXACT_MATCH',
62+
type: 'CONTAINS',
6363
});
6464
});
6565

tests/api-resources/evaluations.test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('resource evaluations', () => {
1414
appendedMessages: [
1515
{
1616
content: 'string',
17-
role: 'user',
17+
role: 'assistant',
1818
toolCallId: 'string',
1919
toolCalls: [
2020
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
@@ -24,7 +24,7 @@ describe('resource evaluations', () => {
2424
},
2525
{
2626
content: 'string',
27-
role: 'user',
27+
role: 'assistant',
2828
toolCallId: 'string',
2929
toolCalls: [
3030
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
@@ -34,7 +34,7 @@ describe('resource evaluations', () => {
3434
},
3535
{
3636
content: 'string',
37-
role: 'user',
37+
role: 'assistant',
3838
toolCallId: 'string',
3939
toolCalls: [
4040
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
@@ -60,7 +60,7 @@ describe('resource evaluations', () => {
6060
appendedMessages: [
6161
{
6262
content: 'string',
63-
role: 'user',
63+
role: 'assistant',
6464
toolCallId: 'string',
6565
toolCalls: [
6666
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
@@ -70,7 +70,7 @@ describe('resource evaluations', () => {
7070
},
7171
{
7272
content: 'string',
73-
role: 'user',
73+
role: 'assistant',
7474
toolCallId: 'string',
7575
toolCalls: [
7676
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
@@ -80,7 +80,7 @@ describe('resource evaluations', () => {
8080
},
8181
{
8282
content: 'string',
83-
role: 'user',
83+
role: 'assistant',
8484
toolCallId: 'string',
8585
toolCalls: [
8686
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
@@ -99,7 +99,7 @@ describe('resource evaluations', () => {
9999
appendedMessages: [
100100
{
101101
content: 'string',
102-
role: 'user',
102+
role: 'assistant',
103103
toolCallId: 'string',
104104
toolCalls: [
105105
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
@@ -109,7 +109,7 @@ describe('resource evaluations', () => {
109109
},
110110
{
111111
content: 'string',
112-
role: 'user',
112+
role: 'assistant',
113113
toolCallId: 'string',
114114
toolCalls: [
115115
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
@@ -119,7 +119,7 @@ describe('resource evaluations', () => {
119119
},
120120
{
121121
content: 'string',
122-
role: 'user',
122+
role: 'assistant',
123123
toolCallId: 'string',
124124
toolCalls: [
125125
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
@@ -145,7 +145,7 @@ describe('resource evaluations', () => {
145145
appendedMessages: [
146146
{
147147
content: 'string',
148-
role: 'user',
148+
role: 'assistant',
149149
toolCallId: 'string',
150150
toolCalls: [
151151
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
@@ -155,7 +155,7 @@ describe('resource evaluations', () => {
155155
},
156156
{
157157
content: 'string',
158-
role: 'user',
158+
role: 'assistant',
159159
toolCallId: 'string',
160160
toolCalls: [
161161
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
@@ -165,7 +165,7 @@ describe('resource evaluations', () => {
165165
},
166166
{
167167
content: 'string',
168-
role: 'user',
168+
role: 'assistant',
169169
toolCallId: 'string',
170170
toolCalls: [
171171
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },

0 commit comments

Comments
 (0)