Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -692,10 +692,10 @@ private ReflectionAIFunctionDescriptor(DescriptorKey key, JsonSerializerOptions
JsonSerializerOptions = serializerOptions;
JsonSchema = AIJsonUtilities.CreateFunctionJsonSchema(
key.Method,
Name,
Description,
serializerOptions,
schemaOptions);
title: string.Empty, // Forces skipping of the title keyword
description: string.Empty, // Forces skipping of the description keyword
serializerOptions: serializerOptions,
inferenceOptions: schemaOptions);
}

public string Name { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public static void CreateFunctionJsonSchema_ReturnsExpectedValue()

Assert.NotNull(func.UnderlyingMethod);

JsonElement resolvedSchema = AIJsonUtilities.CreateFunctionJsonSchema(func.UnderlyingMethod, title: func.Name);
JsonElement resolvedSchema = AIJsonUtilities.CreateFunctionJsonSchema(func.UnderlyingMethod, title: string.Empty);
AssertDeepEquals(resolvedSchema, func.JsonSchema);
}

Expand Down Expand Up @@ -333,8 +333,6 @@ public static void CreateFunctionJsonSchema_OptionalParameters(bool requireAllPr

JsonElement expected = JsonDocument.Parse($$"""
{
"title": "get_weather",
"description": "Gets the current weather for a current location",
"type": "object",
"properties": {
"city": {
Expand Down Expand Up @@ -369,11 +367,7 @@ public static void CreateFunctionJsonSchema_OptionalParameters(bool requireAllPr
Assert.NotNull(func.UnderlyingMethod);
AssertDeepEquals(expected, func.JsonSchema);

JsonElement resolvedSchema = AIJsonUtilities.CreateFunctionJsonSchema(
func.UnderlyingMethod,
title: func.Name,
description: func.Description,
inferenceOptions: inferenceOptions);
JsonElement resolvedSchema = AIJsonUtilities.CreateFunctionJsonSchema(func.UnderlyingMethod, title: string.Empty, description: string.Empty, inferenceOptions: inferenceOptions);
AssertDeepEquals(expected, resolvedSchema);
}

Expand Down
Loading