-
Notifications
You must be signed in to change notification settings - Fork 30
feat!: Support invoke with structured output in OpenAI provider #980
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
Conversation
|
@launchdarkly/browser size report |
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
Note
Adds structured-output
invokeStructuredModelwith JSON schema parsing and metrics, and hardensinvokeModelwith try/catch and empty-content handling; comprehensive tests included.src/OpenAIProvider.ts):invokeStructuredModel(messages, responseStructure)usingresponse_format: json_schema, parses JSON payload, returnsdata,rawResponse, and metrics; handles missing content, JSON parse failures, and API errors with logging.StructuredResponsetype.__tests__/OpenAIProvider.test.ts):invokeStructuredModelsuccess, missing content, invalid JSON, and empty choices.invokeModeltests for empty/missing choices and metrics expectations.Written by Cursor Bugbot for commit 5a3cffe. This will update automatically on new commits. Configure here.