Skip to content

[API Question]: ToolJson doesn't have definitions object? #7249

@MaguireKrist-ITK

Description

@MaguireKrist-ITK

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.

Metadata

Metadata

Labels

area-aiMicrosoft.Extensions.AI librariesbugThis issue describes a behavior which is not expected - a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions