diff --git a/.changeset/tidy-bulldogs-accept.md b/.changeset/tidy-bulldogs-accept.md new file mode 100644 index 00000000..d13c3de2 --- /dev/null +++ b/.changeset/tidy-bulldogs-accept.md @@ -0,0 +1,8 @@ +--- +"@empiricalrun/scorer": minor +"@empiricalrun/types": minor +"@empiricalrun/cli": minor +"web": minor +--- + +feat: add support for merging inputs and add multi-turn chat example diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index 12f0b9d7..132db468 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -44,10 +44,6 @@ export default function Page(): JSX.Element { () => (dataset?.samples || [])?.map((s) => s.id), [dataset], ); - const datasetInputNames = useMemo( - () => Object.keys(dataset?.samples?.[0]?.inputs || {}), - [dataset], - ); const runColumnHeaders = useMemo( () => tableHeaders.filter((h) => h.type == "completion"), [tableHeaders], @@ -202,7 +198,6 @@ export default function Page(): JSX.Element {
addDatasetSample(sample)} onSampleInputUpdate={updateDatasetSampleInput} onSampleRemove={(sample) => { diff --git a/apps/web/components/json-as-tab.tsx b/apps/web/components/json-as-tab.tsx index 4e7208e4..fbc8898d 100644 --- a/apps/web/components/json-as-tab.tsx +++ b/apps/web/components/json-as-tab.tsx @@ -49,12 +49,6 @@ export function JsonAsTab({ const { activeTab: remoteActiveTab, onChangeTab: remoteOnChangeTab } = useSyncedTabs(tabs, storeKey); const [activeTab, setActiveTab] = useState(); - const activeTabValue = useMemo(() => { - if (activeTab && data) { - return data[activeTab]; - } - return undefined; - }, [activeTab, data]); useEffect(() => { if (remoteActiveTab && data[remoteActiveTab]) { @@ -67,6 +61,8 @@ export function JsonAsTab({ const onChangeTab = useCallback( (tab: string) => { setActiveTab(tab); + console.log(JSON.stringify(data)); + console.log("setting remote active tab", tab); remoteOnChangeTab(tab); }, [remoteOnChangeTab], @@ -76,7 +72,7 @@ export function JsonAsTab({ <>
<> - {activeTabValue && showExpandOption && ( + {showExpandOption && (