Skip to content

Commit

Permalink
🐛 command r plus error
Browse files Browse the repository at this point in the history
  • Loading branch information
zhzLuke96 committed May 29, 2024
1 parent 7f6e04b commit 09bbbb7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/TokenizerPanel/TokenizerPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,21 @@ const TokenizerInfo = ({
<tbody>
{Object.entries(info).map(([key, value]) => {
if (key === "chat_template") {
let chat_template_content = value;
if (typeof value === "object") {
chat_template_content = value.default ?? Object.values(value)[0];
}
if (typeof chat_template_content !== "string") {
chat_template_content = "";
}
return (
<tr key={key}>
<td>{key}</td>
<td>
<textarea
readOnly
placeholder="No chat template provided."
value={value ?? ""}
value={chat_template_content}
style={{ width: "100%", height: "100px", resize: "none" }}
></textarea>
</td>
Expand Down

0 comments on commit 09bbbb7

Please sign in to comment.