Skip to content

Commit

Permalink
Merge branch 'main' into issue-1450/-expand-evaluation-output-on-resu…
Browse files Browse the repository at this point in the history
…lt-overflow
  • Loading branch information
bekossy committed Mar 23, 2024
2 parents dd84372 + a567db7 commit f77f150
Showing 1 changed file with 43 additions and 32 deletions.
75 changes: 43 additions & 32 deletions agenta-web/src/components/Evaluations/EvaluationCardView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -361,33 +361,38 @@ const EvaluationCardView: React.FC<Props> = ({
</Button>
</div>

<ParamsForm
isChatVariant={isChat}
onParamChange={(name, value) =>
isChat
? onChatChange(value)
: onInputChange(
{target: {value}} as any,
scenarioId,
scenario.inputs.findIndex((ip) => ip.input_name === name),
)
}
inputParams={
isChat
? [{name: "chat", value: chat} as any]
: variantData[0].inputParams?.map((item) => ({
...item,
value: scenario.inputs.find(
(ip) => ip.input_name === item.name,
)?.input_value,
})) || []
}
key={scenarioId}
useChatDefaultValue
form={form}
onFinish={() => onRun(scenarioId)}
imageSize="large"
/>
<div>
<Typography.Text style={{fontSize: 20}}>Inputs</Typography.Text>
<ParamsForm
isChatVariant={isChat}
onParamChange={(name, value) =>
isChat
? onChatChange(value)
: onInputChange(
{target: {value}} as any,
scenarioId,
scenario.inputs.findIndex(
(ip) => ip.input_name === name,
),
)
}
inputParams={
isChat
? [{name: "chat", value: chat} as any]
: variantData[0].inputParams?.map((item) => ({
...item,
value: scenario.inputs.find(
(ip) => ip.input_name === item.name,
)?.input_value,
})) || []
}
key={scenarioId}
useChatDefaultValue
form={form}
onFinish={() => onRun(scenarioId)}
imageSize="large"
/>
</div>

<div className={classes.toolBar}>
<Tooltip title="Instructions">
Expand All @@ -405,11 +410,17 @@ const EvaluationCardView: React.FC<Props> = ({
</div>

<div>
{!isAbTesting && (
<Typography.Text style={{fontSize: 20}}>
Model Response
</Typography.Text>
)}
<div style={{marginBottom: "1rem"}}>
{!isAbTesting ? (
<Typography.Text style={{fontSize: 20}}>
Model Response
</Typography.Text>
) : (
<Typography.Text style={{fontSize: 20}}>
Outputs
</Typography.Text>
)}
</div>

<EvaluationCard
isChat={isChat}
Expand Down

0 comments on commit f77f150

Please sign in to comment.