mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Observability AI Assistant] [KB] Allow documents to not have labels
(#176194)
This commit is contained in:
parent
099e2d4cf8
commit
b774cc6606
2 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ export interface KnowledgeBaseEntryCategory {
|
|||
|
||||
export function categorizeEntries({ entries }: { entries: KnowledgeBaseEntry[] }) {
|
||||
return entries.reduce((acc, entry) => {
|
||||
const categoryName = entry.labels.category ?? entry.id;
|
||||
const categoryName = entry.labels?.category ?? entry.id;
|
||||
|
||||
const index = acc.findIndex((item) => item.categoryName === categoryName);
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ export interface KnowledgeBaseEntry {
|
|||
confidence: 'low' | 'medium' | 'high';
|
||||
is_correction: boolean;
|
||||
public: boolean;
|
||||
labels: Record<string, string>;
|
||||
labels?: Record<string, string>;
|
||||
role: KnowledgeBaseEntryRole;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue