diff --git a/AIStudyApp/AIStudyApp/Core/Models/APIModels.swift b/AIStudyApp/AIStudyApp/Core/Models/APIModels.swift index 9e48aa7..601d438 100644 --- a/AIStudyApp/AIStudyApp/Core/Models/APIModels.swift +++ b/AIStudyApp/AIStudyApp/Core/Models/APIModels.swift @@ -421,8 +421,9 @@ struct ChatMessage: Codable, Identifiable { struct ChatCitation: Codable, Identifiable { let id: String let chunkId: String? - let content: String? - let score: Double? + let sourceTitle: String? + let excerptText: String? + let pageNumber: Int? } struct CreateSessionRequest: Codable { diff --git a/AIStudyApp/AIStudyApp/Features/AI/AIChatPage.swift b/AIStudyApp/AIStudyApp/Features/AI/AIChatPage.swift index f63af47..3748843 100644 --- a/AIStudyApp/AIStudyApp/Features/AI/AIChatPage.swift +++ b/AIStudyApp/AIStudyApp/Features/AI/AIChatPage.swift @@ -33,7 +33,7 @@ struct AIChatPage: View { ForEach(citations.prefix(3)) { c in HStack(spacing: 4) { Image(systemName: "doc.text").font(.system(size: 9)).foregroundColor(Color.zxF04) - Text(c.content?.prefix(60).description ?? "").font(.system(size: 10)).foregroundColor(Color.zxF04).lineLimit(1) + Text(c.excerptText?.prefix(60).description ?? "").font(.system(size: 10)).foregroundColor(Color.zxF04).lineLimit(1) }.padding(.horizontal, 8).padding(.vertical, 4) .background(Color.zxFill004).clipShape(Capsule()) }