microsoft / microsoft/semantic-kernel-java

Java: When calling getContent or getItems, get null if the other property was set.

Open
#142 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

java
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.