Add AI procedure reference formatting and parsing functions with unit tests
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
- Introduced `FormatAIProcedureRef` and `ParseAIProcedureRef` functions in the `tender` domain for handling AI service tender references. - Added unit tests for these functions in `ai_reference_test.go` to ensure correct parsing and formatting behavior. - Updated the `TenderResponse` struct to include a new `ProcedureRef` field for improved data representation. - Enhanced the `GetByProcedureReference` method in the repository to retrieve tenders based on the new procedure reference format. - Modified the `Recommend` method in the service layer to utilize the new procedure reference handling, improving the recommendation process. This update enhances the handling of AI procedure references, ensuring better data integrity and usability in the tender management system.
This commit is contained in:
@@ -234,8 +234,9 @@ type TenderResponse struct {
|
||||
OverallSummary string `json:"overall_summary,omitempty"`
|
||||
Language string `json:"language,omitempty"`
|
||||
|
||||
Rank int `json:"rank,omitempty"`
|
||||
Analysis string `json:"analysis,omitempty"`
|
||||
Rank int `json:"rank,omitempty"`
|
||||
Analysis string `json:"analysis,omitempty"`
|
||||
ProcedureRef string `json:"procedure_ref,omitempty"`
|
||||
}
|
||||
|
||||
// TenderDocumentResponse represents a scraped tender document available for download.
|
||||
|
||||
Reference in New Issue
Block a user