microsoft / microsoft/semantic-kernel-java
Java: When calling getContent or getItems, get null if the other property was set.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 276
- Forks
- 56
- Avg merge
- 17h 45m
- Merged PRs (30d)
- 4
Description
In Java, when creating a ChatMessageContent, you can either set the content or items of the object. If you then retrieve either, the system isn't able to smartly pull from the right source.
For example, if I set content to "hello world" and I call getItems(), I should receive an array of KernelContent with a single TextContent inside of it. The reverse should also be true.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the Java ChatMessageContent class and inspect getContent() and getItems() along with how content and items are stored. Reproduce both access orders described in the issue, then add coverage for each conversion direction. Done means setting content makes getItems() expose one TextContent, and setting items makes getContent() return the corresponding content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100