Skip to content

Commit

Permalink
Merge pull request #1756 from Agenta-AI/hotfix/multiselect
Browse files Browse the repository at this point in the history
fix(app): #1747 Fix showing params in the playground
  • Loading branch information
mmabrouk authored Jun 4, 2024
2 parents e830680 + 15e51da commit c4277ea
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions agenta-web/src/components/Playground/Views/ParametersCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,26 @@ export const ModelParameters: React.FC<ModelParametersProps> = ({
}
return (
<>
{optParams?.some((param) => !param.input && param.type === "number") && (
{optParams?.some(
(param) =>
!param.input &&
(param.type === "number" ||
param.type === "integer" ||
param.type === "array" ||
param.type === "grouped_choice" ||
param.type === "boolean"),
) && (
<Row gutter={0} className={classes.row1}>
<Card className={classes.card} title="Model Parameters">
{optParams
?.filter(
(param) =>
(!param.input &&
(param.type === "number" ||
param.type === "integer" ||
param.type === "array" ||
param.type === "grouped_choice")) ||
param.type === "boolean",
!param.input &&
(param.type === "number" ||
param.type === "integer" ||
param.type === "array" ||
param.type === "grouped_choice" ||
param.type === "boolean"),
)
.map((param, index) => (
<Row key={index} className={classes.row2}>
Expand Down

0 comments on commit c4277ea

Please sign in to comment.