Skip to content

Conversation

@sobychacko
Copy link
Contributor

Following removal of Spring Boot's ConstructorBinding, convert record types to regular POJOs to maintain JSON serialization. Update API classes:

  • Convert FunctionTool and Function records to standard Java classes with getters/setters
  • Update test assertions to use getter methods instead of record accessors
  • Fix failing tests in MiniMax, OpenAi and ZhiPu API implementations

This keeps core API models independent of Spring Boot while ensuring proper serialization through standard Java beans.

Following removal of Spring Boot's ConstructorBinding, convert record types
to regular POJOs to maintain JSON serialization. Update API classes:

- Convert FunctionTool and Function records to standard Java classes with
 getters/setters
- Update test assertions to use getter methods instead of record accessors
- Fix failing tests in MiniMax, OpenAi and ZhiPu API implementations

This keeps core API models independent of Spring Boot while ensuring proper
serialization through standard Java beans.
@markpollack
Copy link
Member

There are failing tests related to the changes. I suspect that the OPEN_AI_KEY may not have been set or the tests in spring-ai-openai weren't run before the PR was submitted. There is an issue with converting the records to classes and the calls to the openai model fail as response_format is null.

@markpollack
Copy link
Member

I'm disabling the failing tests in OpenAiResponseFormatPropertiesTests so that we can sort this out later. Look for @Disabled("GH-1645")

@markpollack markpollack closed this Nov 2, 2024
@markpollack markpollack added this to the 1.0.0-M4 milestone Nov 2, 2024
@markpollack markpollack self-assigned this Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants