Homebox's location fields were flattened into single-purpose keys (locationName/locationDescription), which gave EmbeddingService no way to group related fields when rendering vector-store content. extraData is now Map<String, Map<String, Object>>, letting HomeboxItemClient express "location" as its own section; buildExtraData renders each section as a header with indented fields instead of a flat "Extradata: key: value" line.
19 lines
484 B
Java
19 lines
484 B
Java
package com.vaessl.app.shared;
|
|
|
|
import java.util.Map;
|
|
import jakarta.validation.constraints.NotNull;
|
|
|
|
public record ServiceItem(String id, @NotNull String title, String description,
|
|
Map<String, Map<String, Object>> extraData) {
|
|
|
|
public String getExtra(String key) {
|
|
if (extraData == null) {
|
|
return null;
|
|
} else {
|
|
Object value = extraData.get(key);
|
|
|
|
return value != null ? String.valueOf(value) : null;
|
|
}
|
|
}
|
|
}
|