Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 21
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prompt-foundry%2Fprompt-foundry-sdk-d77f7f9f32373ca58fafe721c7c3bab1ba26d366ff00e7f5c59e6cf1058a9db2.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prompt-foundry%2Fprompt-foundry-sdk-2ed0eba8700d06f5263ff3848c714cdd3f07b4942b13bfa3c744d3720cca1615.yml
12 changes: 6 additions & 6 deletions src/resources/evaluation-assertions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ export interface EvaluationAssertion {
* The type of evaluation matcher to use.
*/
type:
| 'EXACT_MATCH'
| 'CONTAINS'
| 'JSON_EXACT_MATCH'
| 'EXACT_MATCH'
| 'JSON_CONTAINS'
| 'JSON_EXACT_MATCH'
| 'TOOL_CALLED'
| 'TOOL_CALLED_WITH';
}
Expand Down Expand Up @@ -118,10 +118,10 @@ export interface EvaluationAssertionCreateParams {
* The type of evaluation matcher to use.
*/
type:
| 'EXACT_MATCH'
| 'CONTAINS'
| 'JSON_EXACT_MATCH'
| 'EXACT_MATCH'
| 'JSON_CONTAINS'
| 'JSON_EXACT_MATCH'
| 'TOOL_CALLED'
| 'TOOL_CALLED_WITH';
}
Expand All @@ -147,10 +147,10 @@ export interface EvaluationAssertionUpdateParams {
* The type of evaluation matcher to use.
*/
type:
| 'EXACT_MATCH'
| 'CONTAINS'
| 'JSON_EXACT_MATCH'
| 'EXACT_MATCH'
| 'JSON_CONTAINS'
| 'JSON_EXACT_MATCH'
| 'TOOL_CALLED'
| 'TOOL_CALLED_WITH';
}
Expand Down
6 changes: 3 additions & 3 deletions src/resources/evaluations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export namespace Evaluation {
*/
content: string | null;

role: 'user' | 'assistant' | 'system' | 'tool';
role: 'assistant' | 'system' | 'tool' | 'user';

toolCallId: string | null;

Expand Down Expand Up @@ -142,7 +142,7 @@ export namespace EvaluationCreateParams {
*/
content: string | null;

role: 'user' | 'assistant' | 'system' | 'tool';
role: 'assistant' | 'system' | 'tool' | 'user';

toolCallId: string | null;

Expand Down Expand Up @@ -207,7 +207,7 @@ export namespace EvaluationUpdateParams {
*/
content: string | null;

role: 'user' | 'assistant' | 'system' | 'tool';
role: 'assistant' | 'system' | 'tool' | 'user';

toolCallId: string | null;

Expand Down
16 changes: 8 additions & 8 deletions src/resources/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export namespace PromptConfiguration {
*/
content: string | null;

role: 'user' | 'assistant' | 'system' | 'tool';
role: 'assistant' | 'system' | 'tool' | 'user';

toolCallId: string | null;

Expand Down Expand Up @@ -357,7 +357,7 @@ export namespace PromptConfiguration {
/**
* Example: PromptResponseFormat.TEXT
*/
responseFormat: 'TEXT' | 'JSON';
responseFormat: 'JSON' | 'TEXT';

/**
* Example: 97946543
Expand Down Expand Up @@ -432,7 +432,7 @@ export namespace PromptCreateParams {
*/
content: string | null;

role: 'user' | 'assistant' | 'system' | 'tool';
role: 'assistant' | 'system' | 'tool' | 'user';

toolCallId: string | null;

Expand Down Expand Up @@ -498,7 +498,7 @@ export namespace PromptCreateParams {
/**
* Example: PromptResponseFormat.TEXT
*/
responseFormat: 'TEXT' | 'JSON';
responseFormat: 'JSON' | 'TEXT';

/**
* Example: 97946543
Expand Down Expand Up @@ -545,7 +545,7 @@ export namespace PromptUpdateParams {
*/
content: string | null;

role: 'user' | 'assistant' | 'system' | 'tool';
role: 'assistant' | 'system' | 'tool' | 'user';

toolCallId: string | null;

Expand Down Expand Up @@ -611,7 +611,7 @@ export namespace PromptUpdateParams {
/**
* Example: PromptResponseFormat.TEXT
*/
responseFormat: 'TEXT' | 'JSON';
responseFormat: 'JSON' | 'TEXT';

/**
* Example: 97946543
Expand Down Expand Up @@ -672,7 +672,7 @@ export namespace PromptGetParametersParams {
*/
content: string | null;

role: 'user' | 'assistant' | 'system' | 'tool';
role: 'assistant' | 'system' | 'tool' | 'user';

toolCallId: string | null;

Expand Down Expand Up @@ -721,7 +721,7 @@ export namespace PromptGetParametersParams {
*/
content: string | null;

role: 'user' | 'assistant' | 'system' | 'tool';
role: 'assistant' | 'system' | 'tool' | 'user';

toolCallId: string | null;

Expand Down
8 changes: 4 additions & 4 deletions tests/api-resources/evaluation-assertions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('resource evaluationAssertions', () => {
jsonPath: 'string',
targetValue: 'string',
toolName: 'string',
type: 'EXACT_MATCH',
type: 'CONTAINS',
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -32,7 +32,7 @@ describe('resource evaluationAssertions', () => {
jsonPath: 'string',
targetValue: 'string',
toolName: 'string',
type: 'EXACT_MATCH',
type: 'CONTAINS',
});
});

Expand All @@ -42,7 +42,7 @@ describe('resource evaluationAssertions', () => {
jsonPath: 'string',
targetValue: 'string',
toolName: 'string',
type: 'EXACT_MATCH',
type: 'CONTAINS',
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -59,7 +59,7 @@ describe('resource evaluationAssertions', () => {
jsonPath: 'string',
targetValue: 'string',
toolName: 'string',
type: 'EXACT_MATCH',
type: 'CONTAINS',
});
});

Expand Down
24 changes: 12 additions & 12 deletions tests/api-resources/evaluations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('resource evaluations', () => {
appendedMessages: [
{
content: 'string',
role: 'user',
role: 'assistant',
toolCallId: 'string',
toolCalls: [
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
Expand All @@ -24,7 +24,7 @@ describe('resource evaluations', () => {
},
{
content: 'string',
role: 'user',
role: 'assistant',
toolCallId: 'string',
toolCalls: [
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
Expand All @@ -34,7 +34,7 @@ describe('resource evaluations', () => {
},
{
content: 'string',
role: 'user',
role: 'assistant',
toolCallId: 'string',
toolCalls: [
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
Expand All @@ -60,7 +60,7 @@ describe('resource evaluations', () => {
appendedMessages: [
{
content: 'string',
role: 'user',
role: 'assistant',
toolCallId: 'string',
toolCalls: [
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
Expand All @@ -70,7 +70,7 @@ describe('resource evaluations', () => {
},
{
content: 'string',
role: 'user',
role: 'assistant',
toolCallId: 'string',
toolCalls: [
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
Expand All @@ -80,7 +80,7 @@ describe('resource evaluations', () => {
},
{
content: 'string',
role: 'user',
role: 'assistant',
toolCallId: 'string',
toolCalls: [
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
Expand All @@ -99,7 +99,7 @@ describe('resource evaluations', () => {
appendedMessages: [
{
content: 'string',
role: 'user',
role: 'assistant',
toolCallId: 'string',
toolCalls: [
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
Expand All @@ -109,7 +109,7 @@ describe('resource evaluations', () => {
},
{
content: 'string',
role: 'user',
role: 'assistant',
toolCallId: 'string',
toolCalls: [
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
Expand All @@ -119,7 +119,7 @@ describe('resource evaluations', () => {
},
{
content: 'string',
role: 'user',
role: 'assistant',
toolCallId: 'string',
toolCalls: [
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
Expand All @@ -145,7 +145,7 @@ describe('resource evaluations', () => {
appendedMessages: [
{
content: 'string',
role: 'user',
role: 'assistant',
toolCallId: 'string',
toolCalls: [
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
Expand All @@ -155,7 +155,7 @@ describe('resource evaluations', () => {
},
{
content: 'string',
role: 'user',
role: 'assistant',
toolCallId: 'string',
toolCalls: [
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
Expand All @@ -165,7 +165,7 @@ describe('resource evaluations', () => {
},
{
content: 'string',
role: 'user',
role: 'assistant',
toolCallId: 'string',
toolCalls: [
{ toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },
Expand Down
Loading