Merge pull request #2370 from Yidadaa/bugfix-0712

fix: sharegpt roles
This commit is contained in:
Yifei Zhang
2023-07-12 23:21:22 +08:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -244,11 +244,11 @@ export function RenderExport(props: {
}
const renderMsgs = messages.map((v, i) => {
const [_, role] = v.id.split(":");
const [role, _] = v.id.split(":");
return {
id: i.toString(),
role: role as any,
content: v.innerHTML,
content: role === "user" ? v.textContent ?? "" : v.innerHTML,
date: "",
};
});