Skip to content

AIFunction Extensibility - JSON Parsing #5999

@luisquintanilla

Description

@luisquintanilla

If a consumer wants to create their own AIFunction, they need to know that to have the correct types / names / schemas, they need to override initialization properties because that is how you provide / set schema, description, and name.

Utilities to create JSON, especially the creation of schema and manipulation of JSON Elements and JSON Nodes is done through classes that are private / internal. This means that if users want to change or orverrider functionality, they have to copy/paste from M.E.AI source into their project. This makes it difficult to land rich tool calling and union-like parsing in C# with existing implementation.

Previous implementations which included Metadata made it easier to abstract tool calling regardless of provider.

Sample project:

https://github.com/SteveSandersonMS/dotnet-ai-workshop/tree/main/exercises/CorrectiveRetrievalAugmentedGeneration

https://github.com/SteveSandersonMS/dotnet-ai-workshop/blob/main/exercises/CorrectiveRetrievalAugmentedGeneration/End/StructuredPrediction/AIParserFunction.cs

Metadata

Metadata

Labels

area-aiMicrosoft.Extensions.AI libraries

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions