tender summary response fix
This commit is contained in:
@@ -166,25 +166,25 @@ func (w *DocumentSummarizationWorker) summarizeDocumentViaAI(ctx context.Context
|
||||
return "", "", err.Error()
|
||||
}
|
||||
|
||||
noticeID := strings.TrimSpace(t.NoticePublicationID)
|
||||
if noticeID == "" {
|
||||
if strings.TrimSpace(t.NoticePublicationID) == "" {
|
||||
return "", "", "tender has no notice_publication_id for AI summarize request"
|
||||
}
|
||||
if strings.TrimSpace(t.ContractFolderID) == "" {
|
||||
return "", "", "tender has no contract_folder_id for AI summarize request"
|
||||
}
|
||||
|
||||
req := ai_summarizer.SummarizeRequest{
|
||||
NoticeID: noticeID,
|
||||
DocumentURL: docURL,
|
||||
Title: t.Title,
|
||||
Description: t.Description,
|
||||
Country: t.CountryCode,
|
||||
Currency: t.Currency,
|
||||
SubmissionDeadline: "",
|
||||
AuthorityName: authorityNameFromTender(t),
|
||||
}
|
||||
if t.EstimatedValue > 0 {
|
||||
v := t.EstimatedValue
|
||||
req.EstimatedValue = &v
|
||||
}
|
||||
req := ai_summarizer.NewSummarizeRequest(ai_summarizer.SummarizeRequestInput{
|
||||
ContractFolderID: t.ContractFolderID,
|
||||
NoticePublicationID: t.NoticePublicationID,
|
||||
DocumentURL: docURL,
|
||||
Title: t.Title,
|
||||
Description: t.Description,
|
||||
Country: t.CountryCode,
|
||||
Currency: t.Currency,
|
||||
SubmissionDeadline: t.SubmissionDeadline,
|
||||
EstimatedValue: t.EstimatedValue,
|
||||
AuthorityName: authorityNameFromTender(t),
|
||||
})
|
||||
|
||||
resp, err := w.AIClient.FetchSummaryOnDemand(ctx, req)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user