Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support function calling for reflection Method with multiple arguments #1099

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tzolov
Copy link
Contributor

@tzolov tzolov commented Jul 23, 2024

No description provided.

KAMO030 added a commit to KAMO030/spring-ai that referenced this pull request Jul 24, 2024
-- add FunctionCallbackMethodProcessor to support parsing.
-- add the FunctionCalling annotation to declare
-- add FunctionCallbackMethodProcessorIT as test

Dependent on spring-projects#1099
KAMO030 added a commit to KAMO030/spring-ai that referenced this pull request Jul 24, 2024
-- add FunctionCallbackMethodProcessor to support parsing.
-- add the FunctionCalling annotation to declare
-- add FunctionCallbackMethodProcessorIT as test

Dependent on spring-projects#1099
String className = entry.getKey();
Class<?> clazz = entry.getValue();

JsonSchema schema = schemaGen.generateSchema(clazz);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking into BeanOutputConverter we could use the following code to reuse the "victools" json schema that I believe is what supports the 2020_12 draft as standard jackson doesn't support that version of the schema. If jackson now supports it, that would be great.

		JacksonModule jacksonModule = new JacksonModule();
		SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(DRAFT_2020_12, PLAIN_JSON)
			.with(jacksonModule);
		SchemaGeneratorConfig config = configBuilder.build();
		SchemaGenerator generator = new SchemaGenerator(config);
		JsonNode jsonNode = generator.generateSchema(this.typeRef.getType());
        ...  convert node to string..


@markpollack markpollack self-assigned this Jul 24, 2024
@csterwa csterwa mentioned this pull request Sep 12, 2024
10 tasks
@tzolov tzolov force-pushed the function-calling-method-utils branch from f47fe19 to 8d11a01 Compare October 4, 2024 13:10
@markpollack markpollack added this to the 1.0.0-M4 milestone Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants