-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OpenAI] Structured output test & samples #31476
base: main
Are you sure you want to change the base?
Conversation
API change check API changes are not detected in this pull request. |
@@ -510,8 +555,29 @@ interface ChatCompletionTestOptions { | |||
functions?: boolean; | |||
allowEmptyStream?: boolean; | |||
allowEmptyId?: boolean; | |||
structuredOutput?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
structuredOutput?: boolean; |
@@ -231,7 +276,7 @@ function assertContentFilterBlocklistIdResult(val: ContentFilterBlocklistIdResul | |||
|
|||
function assertChoice( | |||
choice: ChatCompletion.Choice | ChatCompletionChunk.Choice, | |||
options: ChatCompletionTestOptions, | |||
{ ...options }: ChatCompletionTestOptions, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ ...options }: ChatCompletionTestOptions, | |
options: ChatCompletionTestOptions, |
} | ||
|
||
interface EmbeddingTestOptions { | ||
dimensions?: number; | ||
} | ||
|
||
// Structure output interfaces | ||
export interface Step { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor to another utils function since it is not universal
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
|
||
matrix([[APIVersion.Preview]] as const, async function (apiVersion: APIVersion) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove matrix, use skip if for describe in vitest
… openai/structured-output
… openai/structured-output
Add structured output samples and tests for AOAI