|
public string Type { get; set; } = "object"; |
It appears that by the ToolsJson not having a "definitions" object prevents tool calling behavior using Microsoft.Extensions.AI from matching that of using the OpenAI client despite nearly identical setup. This causes problems when using reference types in function declaration signatures when creating a AIFunctionDeclaration via AIFunctionFactory.CreateDeclaration as the definitions for object types are not provided to the model in the prompt, leading to a failure of the model to create a valid / deserializable arguments.
extensions/src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIClientExtensions.cs
Line 255 in 140e405
It appears that by the ToolsJson not having a "definitions" object prevents tool calling behavior using Microsoft.Extensions.AI from matching that of using the OpenAI client despite nearly identical setup. This causes problems when using reference types in function declaration signatures when creating a AIFunctionDeclaration via
AIFunctionFactory.CreateDeclarationas the definitions for object types are not provided to the model in the prompt, leading to a failure of the model to create a valid / deserializable arguments.