diff --git a/.stats.yml b/.stats.yml index c095d1a..c10fc3c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/src/resources/evaluation-assertions.ts b/src/resources/evaluation-assertions.ts index 7fc4e8d..d5cdfb2 100644 --- a/src/resources/evaluation-assertions.ts +++ b/src/resources/evaluation-assertions.ts @@ -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'; } @@ -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'; } @@ -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'; } diff --git a/src/resources/evaluations.ts b/src/resources/evaluations.ts index 7f5d39a..5b56520 100644 --- a/src/resources/evaluations.ts +++ b/src/resources/evaluations.ts @@ -71,7 +71,7 @@ export namespace Evaluation { */ content: string | null; - role: 'user' | 'assistant' | 'system' | 'tool'; + role: 'assistant' | 'system' | 'tool' | 'user'; toolCallId: string | null; @@ -142,7 +142,7 @@ export namespace EvaluationCreateParams { */ content: string | null; - role: 'user' | 'assistant' | 'system' | 'tool'; + role: 'assistant' | 'system' | 'tool' | 'user'; toolCallId: string | null; @@ -207,7 +207,7 @@ export namespace EvaluationUpdateParams { */ content: string | null; - role: 'user' | 'assistant' | 'system' | 'tool'; + role: 'assistant' | 'system' | 'tool' | 'user'; toolCallId: string | null; diff --git a/src/resources/prompts.ts b/src/resources/prompts.ts index 0200c27..a215569 100644 --- a/src/resources/prompts.ts +++ b/src/resources/prompts.ts @@ -291,7 +291,7 @@ export namespace PromptConfiguration { */ content: string | null; - role: 'user' | 'assistant' | 'system' | 'tool'; + role: 'assistant' | 'system' | 'tool' | 'user'; toolCallId: string | null; @@ -357,7 +357,7 @@ export namespace PromptConfiguration { /** * Example: PromptResponseFormat.TEXT */ - responseFormat: 'TEXT' | 'JSON'; + responseFormat: 'JSON' | 'TEXT'; /** * Example: 97946543 @@ -432,7 +432,7 @@ export namespace PromptCreateParams { */ content: string | null; - role: 'user' | 'assistant' | 'system' | 'tool'; + role: 'assistant' | 'system' | 'tool' | 'user'; toolCallId: string | null; @@ -498,7 +498,7 @@ export namespace PromptCreateParams { /** * Example: PromptResponseFormat.TEXT */ - responseFormat: 'TEXT' | 'JSON'; + responseFormat: 'JSON' | 'TEXT'; /** * Example: 97946543 @@ -545,7 +545,7 @@ export namespace PromptUpdateParams { */ content: string | null; - role: 'user' | 'assistant' | 'system' | 'tool'; + role: 'assistant' | 'system' | 'tool' | 'user'; toolCallId: string | null; @@ -611,7 +611,7 @@ export namespace PromptUpdateParams { /** * Example: PromptResponseFormat.TEXT */ - responseFormat: 'TEXT' | 'JSON'; + responseFormat: 'JSON' | 'TEXT'; /** * Example: 97946543 @@ -672,7 +672,7 @@ export namespace PromptGetParametersParams { */ content: string | null; - role: 'user' | 'assistant' | 'system' | 'tool'; + role: 'assistant' | 'system' | 'tool' | 'user'; toolCallId: string | null; @@ -721,7 +721,7 @@ export namespace PromptGetParametersParams { */ content: string | null; - role: 'user' | 'assistant' | 'system' | 'tool'; + role: 'assistant' | 'system' | 'tool' | 'user'; toolCallId: string | null; diff --git a/tests/api-resources/evaluation-assertions.test.ts b/tests/api-resources/evaluation-assertions.test.ts index 0a63d58..1987e1a 100644 --- a/tests/api-resources/evaluation-assertions.test.ts +++ b/tests/api-resources/evaluation-assertions.test.ts @@ -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); @@ -32,7 +32,7 @@ describe('resource evaluationAssertions', () => { jsonPath: 'string', targetValue: 'string', toolName: 'string', - type: 'EXACT_MATCH', + type: 'CONTAINS', }); }); @@ -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); @@ -59,7 +59,7 @@ describe('resource evaluationAssertions', () => { jsonPath: 'string', targetValue: 'string', toolName: 'string', - type: 'EXACT_MATCH', + type: 'CONTAINS', }); }); diff --git a/tests/api-resources/evaluations.test.ts b/tests/api-resources/evaluations.test.ts index 9f2c842..196de0a 100644 --- a/tests/api-resources/evaluations.test.ts +++ b/tests/api-resources/evaluations.test.ts @@ -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' } }, @@ -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' } }, @@ -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' } }, @@ -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' } }, @@ -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' } }, @@ -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' } }, @@ -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' } }, @@ -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' } }, @@ -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' } }, @@ -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' } }, @@ -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' } }, @@ -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' } }, diff --git a/tests/api-resources/prompts.test.ts b/tests/api-resources/prompts.test.ts index 922b974..b629731 100644 --- a/tests/api-resources/prompts.test.ts +++ b/tests/api-resources/prompts.test.ts @@ -14,7 +14,7 @@ describe('resource prompts', () => { messages: [ { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -24,7 +24,7 @@ describe('resource prompts', () => { }, { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -34,7 +34,7 @@ describe('resource prompts', () => { }, { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -46,7 +46,7 @@ describe('resource prompts', () => { name: 'string', parameters: { modelName: 'string', - responseFormat: 'TEXT', + responseFormat: 'JSON', temperature: 0, topP: 0, frequencyPenalty: 0, @@ -73,7 +73,7 @@ describe('resource prompts', () => { messages: [ { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -83,7 +83,7 @@ describe('resource prompts', () => { }, { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -93,7 +93,7 @@ describe('resource prompts', () => { }, { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -105,7 +105,7 @@ describe('resource prompts', () => { name: 'string', parameters: { modelName: 'string', - responseFormat: 'TEXT', + responseFormat: 'JSON', temperature: 0, topP: 0, frequencyPenalty: 0, @@ -125,7 +125,7 @@ describe('resource prompts', () => { messages: [ { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -135,7 +135,7 @@ describe('resource prompts', () => { }, { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -145,7 +145,7 @@ describe('resource prompts', () => { }, { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -157,7 +157,7 @@ describe('resource prompts', () => { name: 'string', parameters: { modelName: 'string', - responseFormat: 'TEXT', + responseFormat: 'JSON', temperature: 0, topP: 0, frequencyPenalty: 0, @@ -184,7 +184,7 @@ describe('resource prompts', () => { messages: [ { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -194,7 +194,7 @@ describe('resource prompts', () => { }, { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -204,7 +204,7 @@ describe('resource prompts', () => { }, { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -216,7 +216,7 @@ describe('resource prompts', () => { name: 'string', parameters: { modelName: 'string', - responseFormat: 'TEXT', + responseFormat: 'JSON', temperature: 0, topP: 0, frequencyPenalty: 0, @@ -312,7 +312,7 @@ describe('resource prompts', () => { appendMessages: [ { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -322,7 +322,7 @@ describe('resource prompts', () => { }, { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -332,7 +332,7 @@ describe('resource prompts', () => { }, { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -344,7 +344,7 @@ describe('resource prompts', () => { overrideMessages: [ { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -354,7 +354,7 @@ describe('resource prompts', () => { }, { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } }, @@ -364,7 +364,7 @@ describe('resource prompts', () => { }, { content: 'string', - role: 'user', + role: 'assistant', toolCallId: 'string', toolCalls: [ { toolCallId: 'string', type: 'function', function: { arguments: 'string', name: 'string' } },