Skip to content

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

Closed

Description

@gdong42

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.

Activity

  1. evchaki commented on Oct 19, 2023

    @evchaki
    Contributor

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

  2. evchaki commented on Oct 19, 2023

    @evchaki
    Contributor

    Bruno Borges (@brunoborges) - can you take a look

  3. added 2 commits that reference this issue on Oct 26, 2023
    0e6cae3
    a541ad5
  4. johnoliver commented on Oct 30, 2023

    @johnoliver
    Member

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

  5. moved this from Backlog - Bugs to Sprint: Done in Java Semantic Kernelon Oct 30, 2023
  6. added 2 commits that reference this issue on Jun 5, 2024
    05e5f1b
    0deefa1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

javaIssue or PR regarding Java code

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions