Integrated AI summary

This commit is contained in:
Mazyar
2026-05-05 17:47:31 +03:30
parent ddbf1ca3d5
commit 65a19d1514
12 changed files with 989 additions and 11 deletions
+24
View File
@@ -65,6 +65,7 @@ type TenderResponse struct {
Status TenderStatus `json:"status"`
TenderID string `json:"tender_id"`
CreatedAt int64 `json:"created_at"`
OverallSummary string `json:"overall_summary,omitempty"` // AI-generated summary from the pipeline
}
type OrganizationResponse struct {
@@ -103,3 +104,26 @@ func (t *Tender) ToResponse() *TenderResponse {
return response
}
// AISummaryResponse represents the response for getting an AI-generated summary
type AISummaryResponse struct {
NoticeID string `json:"notice_id"`
OverallSummary string `json:"overall_summary"`
Source string `json:"source"` // "storage" or "on_demand"
}
// AISummarizeResponse represents the response for triggering on-demand AI summarization
type AISummarizeResponse struct {
NoticeID string `json:"notice_id"`
Summaries []AIDocumentSummary `json:"summaries"`
OverallSummary *string `json:"overall_summary"`
}
// AIDocumentSummary represents a single document summary from the AI service
type AIDocumentSummary struct {
DocumentName string `json:"document_name"`
DocumentType string `json:"document_type"`
Summary string `json:"summary"`
SummaryModel string `json:"summary_model"`
Error string `json:"error,omitempty"`
}