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

Bug fix: fix failed prompt template validation if a variable name contains hyphen(-) #944

Conversation

nichozhan
Copy link
Contributor

@nichozhan nichozhan commented Jun 24, 2024

Bug fix for #943 .

After some troubleshooting, I find that the bug was introduced by old-versioned StringTemplate4.
There is an issue about this: antlr/stringtemplate4#94
I upgrade StringTemplate4 to the latest version and add a UT to cover this.

Thank you for taking time to contribute this pull request!
You might have already read the [contributor guide][1], but as a reminder, please make sure to:

  • Sign the contributor license agreement
  • Rebase your changes on the latest main branch and squash your commits
  • Add/Update unit tests as needed
  • Run a build and make sure all tests pass prior to submission

@markpollack markpollack self-assigned this Jul 2, 2024
@markpollack markpollack added this to the 1.0.0-M2 milestone Jul 2, 2024
@markpollack
Copy link
Member

Thanks for the update!

merged in 5417d19

@markpollack markpollack closed this Jul 2, 2024
szarpul added a commit to szarpul/spring-ai that referenced this pull request Jul 9, 2024
* After the fix done in spring-projects#944, the tests were still not passing.
* Following the fix for spring-projects#944, we should compare text blocks against normalized EOL.
* If our goal is to have normalized EOL, then there is no sens to hardcode a `\n` as the target value in `BeanOutputConverterTest.normalizesLineEndingsClassType` test.
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