Implement AI analysis trigger endpoint and refactor related components
- Added a new endpoint to trigger on-demand agentic analysis for tenders via the AI service. - Introduced `TriggerAIAnalyze` method in the `TenderHandler` to handle requests and responses for AI analysis. - Updated the `tenderService` to include `TriggerAIAnalyze` method, which validates input and interacts with the AI summarizer client. - Enhanced the `AIAnalyzeResponse` and `AIAnalyzeDocument` structures to support the new analysis feature. - Refactored the `DocumentSummarizationWorker` and `TranslationWorker` to remove deprecated MinIO dependencies, streamlining the AI service interactions. This update improves the functionality of the tender management system by allowing users to trigger AI analysis on-demand, enhancing the overall user experience and system capabilities.
This commit is contained in:
@@ -573,3 +573,23 @@ type AIDocumentSummary struct {
|
||||
SummaryModel string `json:"summary_model"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// AIAnalyzeResponse represents the response for on-demand agentic analysis.
|
||||
type AIAnalyzeResponse struct {
|
||||
ContractFolderID string `json:"contract_folder_id"`
|
||||
NoticePublicationID string `json:"notice_publication_id"`
|
||||
Summary string `json:"summary"`
|
||||
Documents []AIAnalyzeDocument `json:"documents"`
|
||||
ToolCallsLog []string `json:"tool_calls_log"`
|
||||
Iterations int `json:"iterations"`
|
||||
Model string `json:"model"`
|
||||
}
|
||||
|
||||
// AIAnalyzeDocument describes one document referenced during analysis.
|
||||
type AIAnalyzeDocument struct {
|
||||
Filename string `json:"filename"`
|
||||
SizeBytes int64 `json:"size_bytes"`
|
||||
TimesRead int `json:"times_read"`
|
||||
TimesQueried int `json:"times_queried"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user