Implement AI onboarding and recommendation features in company service

- Added new AI onboarding and recommendation endpoints in the company handler for starting onboarding and retrieving ranked tender recommendations.
- Introduced `StartAIOnboarding` and `GetAIRecommendations` methods in the company service to handle AI interactions.
- Updated the company service constructor to include the AI recommendation client.
- Enhanced the AI summarizer client with methods for onboarding and fetching recommendations.
- Added response structures for onboarding and recommended tenders in the company form.

This update enhances the tender management system by integrating AI capabilities for onboarding and tender recommendations, improving user experience and operational efficiency.
This commit is contained in:
Mazyar
2026-06-11 01:08:59 +03:30
parent 4f05516fc2
commit 3b26c4f5e1
8 changed files with 389 additions and 10 deletions
+23 -9
View File
@@ -34,23 +34,37 @@ type Service interface {
// UploadDocuments uploads files and attaches them to a company
UploadDocuments(ctx context.Context, companyID, uploadedBy string, files []*multipart.FileHeader) (*UploadDocumentsResponse, error)
// StartAIOnboarding sends company data to the AI team for recommendation onboarding
StartAIOnboarding(ctx context.Context, companyID string) (*OnboardingResponse, error)
// GetAIRecommendations returns ranked tender recommendations from the AI team
GetAIRecommendations(ctx context.Context, companyID string) ([]RecommendedTenderResponse, error)
}
// companyService implements the Service interface
type companyService struct {
repository Repository
categoryService company_category.Service
fileStore filestore.FileStoreService
logger logger.Logger
repository Repository
categoryService company_category.Service
fileStore filestore.FileStoreService
aiRecommendationClient AIRecommendationClient
logger logger.Logger
}
// NewService creates a new company service
func NewService(repository Repository, categoryService company_category.Service, fileStore filestore.FileStoreService, logger logger.Logger) Service {
func NewService(
repository Repository,
categoryService company_category.Service,
fileStore filestore.FileStoreService,
aiRecommendationClient AIRecommendationClient,
logger logger.Logger,
) Service {
return &companyService{
repository: repository,
categoryService: categoryService,
fileStore: fileStore,
logger: logger,
repository: repository,
categoryService: categoryService,
fileStore: fileStore,
aiRecommendationClient: aiRecommendationClient,
logger: logger,
}
}