Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#4466 from ChatGPTNextWeb/chore-fix
Browse files Browse the repository at this point in the history
feat: modify some propmt in DEFAULT_INPUT_TEMPLATE about expressing l…
  • Loading branch information
Dean-YZG authored Apr 8, 2024
2 parents 1b83dd0 + 02b0e79 commit db533fc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/components/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ function escapeBrackets(text: string) {
}

function _MarkDownContent(props: { content: string }) {
const escapedContent = useMemo(
() => escapeBrackets(escapeDollarNumber(props.content)),
[props.content],
);
const escapedContent = useMemo(() => {
console.log("================", props.content);
return escapeBrackets(escapeDollarNumber(props.content));
}, [props.content]);

return (
<ReactMarkdown
Expand Down
10 changes: 9 additions & 1 deletion app/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,20 @@ export const Google = {
};

export const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang
// export const DEFAULT_SYSTEM_TEMPLATE = `
// You are ChatGPT, a large language model trained by {{ServiceProvider}}.
// Knowledge cutoff: {{cutoff}}
// Current model: {{model}}
// Current time: {{time}}
// Latex inline: $x^2$
// Latex block: $$e=mc^2$$
// `;
export const DEFAULT_SYSTEM_TEMPLATE = `
You are ChatGPT, a large language model trained by {{ServiceProvider}}.
Knowledge cutoff: {{cutoff}}
Current model: {{model}}
Current time: {{time}}
Latex inline: $x^2$
Latex inline: \(x^2\)
Latex block: $$e=mc^2$$
`;

Expand Down

0 comments on commit db533fc

Please sign in to comment.