Skip to content

Commit 350e66f

Browse files
committed
Update JsonSchemaGenerator.java
1 parent 8d45caf commit 350e66f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-ai-model/src/main/java/org/springframework/ai/util/json/schema/JsonSchemaGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public static String generateForMethodInput(Method method, SchemaOption... schem
129129
String parameterName = method.getParameters()[i].getName();
130130
Type parameterType = method.getGenericParameterTypes()[i];
131131
if (parameterType instanceof Class<?> parameterClass
132-
&& ClassUtils.isAssignable(parameterClass, ToolContext.class)) {
132+
&& ClassUtils.isAssignable(ToolContext.class, parameterClass)) {
133133
// A ToolContext method parameter is not included in the JSON Schema
134134
// generation.
135135
// It's a special type used by Spring AI to pass contextual data to tools

0 commit comments

Comments
 (0)