Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { chat } from "https://esm.town/v/webup/chat";
export const chatSampleTransform = (async () => {
const text = `
Got this for my daughter for her birthday because she keeps taking
mine from my room. Yes, adults also like pandas too. She takes
it everywhere with her, and it's super soft and cute. One of the
ears is a bit lower than the other, and I donn't think that was
designed to be asymmetrical. It's a bit small for what I paid for it
though. I think there might be other options that are bigger for
the same price. It arrived a day earlier than expected, so I got
to play with it myself before I gave it to my daughter.
`;
const prompt = `
针对以下三个双引号之间的英文评论文本:
首先进行拼写及语法纠错,然后将其转化成中文,
再将其转化成优质淘宝评论的风格,从各种角度出发,分别说明产品的就点与缺点,并进行总结。
润色一下描述,使评论更具有吸引力。
输出结果格式为:
【优点】xxx
【缺点】xxx
【总结】xxx
注意,只需填写 xxx 部分,将结果分段输出成 Markdown 标题及列表格式。
""${text}""
`;
return await chat(prompt);
})();
October 23, 2023