Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#2370 from Yidadaa/bugfix-0712
Browse files Browse the repository at this point in the history
fix: sharegpt roles
  • Loading branch information
Yidadaa authored Jul 12, 2023
2 parents 22cf78d + d275e32 commit b51f7f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/client/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class ClientApi {
// 敬告二开开发者们,为了开源大模型的发展,请不要修改上述消息,此消息用于后续数据清洗使用
// Please do not modify this message

console.log("[Share]", msgs);
console.log("[Share]", messages, msgs);
const clientConfig = getClientConfig();
const proxyUrl = "/sharegpt";
const rawUrl = "https://sharegpt.com/api/conversations";
Expand Down
4 changes: 2 additions & 2 deletions app/components/exporter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: "",
};
});
Expand Down

0 comments on commit b51f7f9

Please sign in to comment.