Skip to content

Commit

Permalink
fix: 修复接口设置提示信息看不到的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Pylogmon committed May 22, 2023
1 parent 88c9b13 commit d853755
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/interfaces/google.js
Expand Up @@ -20,7 +20,7 @@ export const info = {
needs: [
{
config_key: 'google_proxy',
place_hold: 'eg: translate.google.com',
place_hold: 'default: translate.google.com',
display_name: '镜像站地址',
},
],
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/lingva.js
Expand Up @@ -20,7 +20,7 @@ export const info = {
needs: [
{
config_key: 'lingva_domain',
place_hold: 'lingva.ml',
place_hold: 'default: lingva.ml',
display_name: '自定义域名',
},
],
Expand Down
6 changes: 3 additions & 3 deletions src/interfaces/openai.js
Expand Up @@ -19,12 +19,12 @@ export const info = {
needs: [
{
config_key: 'openai_domain',
place_hold: 'api.openai.com(不要加协议头,使用OpenAI官方api此项留空即可)',
place_hold: 'default: api.openai.com\n(不要加协议头,使用OpenAI官方api此项留空即可)',
display_name: '自定义域名',
},
{
config_key: 'openai_path',
place_hold: '/v1/chat/completions(一般不需要改,留空即可,Azure用户根据自己情况修改)',
place_hold: 'default: /v1/chat/completions\n(一般不需要改,留空即可,Azure用户根据自己情况修改)',
display_name: '请求路径',
},
{
Expand All @@ -35,7 +35,7 @@ export const info = {
{
config_key: 'openai_prompt',
place_hold:
'You are a professional translation engine, please translate the text into a colloquial, professional, elegant and fluent content, without the style of machine translation. You must only translate the text content, never interpret it.',
'default: You are a professional translation engine, please translate the text into a colloquial, professional, elegant and fluent content, without the style of machine translation. You must only translate the text content, never interpret it.',
display_name: '自定义翻译Prompt',
},
],
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/openai_code.js
Expand Up @@ -20,7 +20,7 @@ export const info = {
{
config_key: 'openai_code_prompt',
place_hold:
'You are a code explanation engine, you can only explain the code, do not interpret or translate it. Also, please report any bugs you find in the code to the author of the code.',
'default: You are a code explanation engine, you can only explain the code, do not interpret or translate it. Also, please report any bugs you find in the code to the author of the code.',
display_name: '自定义Prompt',
},
],
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/openai_polish.js
Expand Up @@ -19,7 +19,7 @@ export const info = {
needs: [
{
config_key: 'openai_polish_prompt',
place_hold: "You are a text embellisher, you can only embellish the text, don't interpret it.",
place_hold: "default: You are a text embellisher, you can only embellish the text, don't interpret it.",
display_name: '自定义Prompt',
},
],
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/openai_summary.js
Expand Up @@ -19,7 +19,7 @@ export const info = {
needs: [
{
config_key: 'openai_summary_prompt',
place_hold: "You are a text summarizer, you can only summarize the text, don't interpret it.",
place_hold: "default: You are a text summarizer, you can only summarize the text, don't interpret it.",
display_name: '自定义Prompt',
},
],
Expand Down
6 changes: 3 additions & 3 deletions src/windows/Config/pages/InterfaceConfig/index.jsx
Expand Up @@ -24,7 +24,7 @@ export default function InterfaceConfig() {
<Tooltip>
<Select
size='small'
sx={{ width: '300px' }}
sx={{ width: '50%' }}
value={openaiService}
onChange={(e) => {
setOpenaiService(e.target.value);
Expand All @@ -43,13 +43,13 @@ export default function InterfaceConfig() {
return (
<ConfigItem
label={`${interfaceConfigs[x]['interface_name']}-${y['needs_display_name']}`}
help={y['needs_place_hold']}
>
<TextField
size='small'
type={visible ? 'text' : 'password'}
sx={{ width: '300px' }}
sx={{ width: '50%' }}
key={nanoid()}
placeholder={y['needs_place_hold']}
defaultValue={y['needs_config_value']}
onChange={(e) => {
let configs = interfaceConfigs;
Expand Down

0 comments on commit d853755

Please sign in to comment.