perf: 细节样式

This commit is contained in:
Archer
2023-03-18 13:30:25 +08:00
parent 7ba14d2c14
commit 58a010c12c
6 changed files with 13 additions and 9 deletions

View File

@@ -55,7 +55,7 @@
.markdown h6 {
cursor: text;
font-weight: bold;
margin: 20px 0 10px;
margin: 10px 0;
padding: 0;
position: relative;
}
@@ -130,7 +130,7 @@
.markdown dl,
.markdown table,
.markdown pre {
margin: 15px 0;
margin: 10px 0;
}
.markdown hr {
background: url('https://a248.e.akamai.net/assets.github.com/assets/primer/markdown/dirty-shade-350cca8f57223ebd53603021b2e670f4f319f1b7.png')
@@ -351,10 +351,14 @@
}
.markdown {
text-align: justify;
word-break: break-all;
overflow-y: hidden;
tab-size: 4;
word-spacing: normal;
word-break: break-all;
p {
white-space: pre-line;
}
pre {
display: block;

View File

@@ -41,10 +41,10 @@ export const introPage = `
`;
export const chatProblem = `
**代理出错**
**代理出错**
服务器代理不稳定,可以过一会儿再尝试。
**API key 问题**
**API key 问题**
请把 openai 的 API key 粘贴到账号里再创建对话。如果是使用分享的对话,不需要填写 API key。
`;

View File

@@ -74,7 +74,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
{
model: model.service.chatModel,
temperature: temperature,
max_tokens: modelConstantsData.maxToken,
// max_tokens: modelConstantsData.maxToken,
messages: formatPrompts,
stream: true
},

View File

@@ -43,7 +43,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
model: model.service.modelName,
prompt: formatPrompt,
temperature: temperature,
max_tokens: modelConstantsData.maxToken,
// max_tokens: modelConstantsData.maxToken,
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0.6,

View File

@@ -22,7 +22,7 @@ const Empty = ({ intro }: { intro: string }) => {
{!!intro && (
<Card p={4} mb={10}>
<Header></Header>
<Box>{intro}</Box>
<Box whiteSpace={'pre-line'}>{intro}</Box>
</Card>
)}
<Card p={4} mb={10}>

View File

@@ -2,7 +2,7 @@ export const openaiError: Record<string, string> = {
context_length_exceeded: '内容超长了,请重置对话',
Unauthorized: 'API-KEY 不合法',
rate_limit_reached: '同时访问用户过多,请稍后再试',
'Bad Request': '上下文太多了,请重开对话~',
'Bad Request': 'Bad Request~ 可能内容太多了',
'Too Many Requests': '请求次数太多了,请慢点~'
};
export const proxyError: Record<string, boolean> = {