New AI function calling schema property: IChatGptSchema.IAnyOf["x-discriminator"]
#189
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces enhancements to several parts of the codebase, including version updates, improved error handling, and support for discriminators in schemas. The most notable changes are the introduction of detailed HTTP error handling, updates to schema composition for ChatGPT, and the addition of discriminator support in the
IChatGptSchemastructure.Version Update:
package.json: Updated the package version from4.3.3to4.4.0-dev.20250704. This likely indicates a development version with new features or improvements.HTTP Error Handling Enhancements:
src/http/HttpError.ts: Enhanced theHttpErrorclass to include detailed HTTP-specific information such as method, path, status code, and headers. Added comprehensive documentation for constructors and methods, and improved serialization via thetoJSONmethod for structured error data. [1] [2] [3]Schema Composition Updates:
src/composers/llm/ChatGptSchemaComposer.ts: Added support forx-discriminatorin schema composition when certain conditions are met, improving the handling of union types.Discriminator Support in Schema Structures:
src/structures/IChatGptSchema.ts: Introduced thex-discriminatorfield and its associated namespaceIAnyOf.IDiscriminatorto provide detailed information about union type discriminators, including property names and mappings.