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

Java: Prompt template config file fails silently when format is invalid #3238

Closed
gdong42 opened this issue Oct 19, 2023 · 3 comments
Closed
Assignees
Labels
java Issue or PR regarding Java code

Comments

@gdong42
Copy link

gdong42 commented Oct 19, 2023

Currently, if the JSON file for the semantic function template configuration is invalid, such as having an unknown field, SK does not parse the configuration and does not provide any visible errors or warnings. I encountered a situation where the configuration did not take effect, and after spending some time to debug, I was able to identify the root cause. It was due to I had a typo in the field and the deserialization of the JSON configuration ignored any parsing errors and discarded the error information.

https://github.com/microsoft/semantic-kernel/blob/d16b3ebf5144c47b44a4979fcd805724e1a4aff5/java/semantickernel-api/src/main/java/com/microsoft/semantickernel/extensions/KernelExtensions.java#L171C1-L175C1

It would be nice to show the user when the provided configuration file is invalid, along with the parsing error information.

@shawncal shawncal added java Issue or PR regarding Java code triage labels Oct 19, 2023
@evchaki evchaki moved this to Backlog - Bugs in Java Semantic Kernel Oct 19, 2023
@evchaki
Copy link
Contributor

evchaki commented Oct 19, 2023

@gdong42 - thanks for finding this. We will have the team take a look.

@evchaki
Copy link
Contributor

evchaki commented Oct 19, 2023

@brunoborges - can you take a look

@johnoliver
Copy link
Member

This is fixed in the latest code, fix will go out in the next release

@github-project-automation github-project-automation bot moved this from Backlog - Bugs to Sprint: Done in Java Semantic Kernel Oct 30, 2023
johnoliver added a commit to johnoliver/semantic-kernel that referenced this issue Jun 5, 2024
johnoliver added a commit to johnoliver/semantic-kernel that referenced this issue Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java Issue or PR regarding Java code
Projects
No open projects
Status: Sprint: Done
Development

No branches or pull requests

5 participants