PackageRecommendations: Add distribution to package recommendations
- Add required distribution field to RecommendPackageRequest - Add modelVersion field to RecommendationsResponse - Update frontend to send RHEL major version to API - Add analytics tracking for distribution and modelVersion Enables version-specific package recommendations and model usage tracking.
This commit is contained in:
parent
6cefc6c199
commit
852d24e568
3 changed files with 15 additions and 0 deletions
|
|
@ -1567,6 +1567,10 @@ components:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
default: 3
|
default: 3
|
||||||
|
distribution:
|
||||||
|
type: string
|
||||||
|
description: RHEL major release (e.g. "rhel8", "rhel9", "rhel10")
|
||||||
|
example: "rhel9"
|
||||||
RecommendationsResponse:
|
RecommendationsResponse:
|
||||||
required:
|
required:
|
||||||
- packages
|
- packages
|
||||||
|
|
@ -1576,6 +1580,10 @@ components:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
modelVersion:
|
||||||
|
type: string
|
||||||
|
description: Version of the recommendation model used
|
||||||
|
example: "rpm_rex_42"
|
||||||
ClonesResponse:
|
ClonesResponse:
|
||||||
required:
|
required:
|
||||||
- meta
|
- meta
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,7 @@ const PackageRecommendations = () => {
|
||||||
recommendPackageRequest: {
|
recommendPackageRequest: {
|
||||||
packages: packages.map((pkg) => pkg.name),
|
packages: packages.map((pkg) => pkg.name),
|
||||||
recommendedPackages: 5,
|
recommendedPackages: 5,
|
||||||
|
distribution: distribution.replace('-', ''),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -98,6 +99,7 @@ const PackageRecommendations = () => {
|
||||||
isPreview: isBeta(),
|
isPreview: isBeta(),
|
||||||
shownRecommendations: response.data.packages,
|
shownRecommendations: response.data.packages,
|
||||||
selectedPackages: packages.map((pkg) => pkg.name),
|
selectedPackages: packages.map((pkg) => pkg.name),
|
||||||
|
distribution: distribution.replace('-', ''),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -266,6 +268,7 @@ const PackageRecommendations = () => {
|
||||||
(pkg) => pkg.name
|
(pkg) => pkg.name
|
||||||
),
|
),
|
||||||
shownRecommendations: data.packages,
|
shownRecommendations: data.packages,
|
||||||
|
distribution: distribution.replace('-', ''),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
addRecommendedPackage(pkg);
|
addRecommendedPackage(pkg);
|
||||||
|
|
|
||||||
|
|
@ -998,10 +998,14 @@ export type DistributionProfileItem =
|
||||||
export type DistributionProfileResponse = DistributionProfileItem[];
|
export type DistributionProfileResponse = DistributionProfileItem[];
|
||||||
export type RecommendationsResponse = {
|
export type RecommendationsResponse = {
|
||||||
packages: string[];
|
packages: string[];
|
||||||
|
/** Version of the recommendation model used */
|
||||||
|
modelVersion?: string | undefined;
|
||||||
};
|
};
|
||||||
export type RecommendPackageRequest = {
|
export type RecommendPackageRequest = {
|
||||||
packages: string[];
|
packages: string[];
|
||||||
recommendedPackages: number;
|
recommendedPackages: number;
|
||||||
|
/** RHEL major release (e.g. "rhel8", "rhel9", "rhel10") */
|
||||||
|
distribution?: string | undefined;
|
||||||
};
|
};
|
||||||
export const {
|
export const {
|
||||||
useGetArchitecturesQuery,
|
useGetArchitecturesQuery,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue