File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ jobs:
106106 run : |
107107 cd chat2db-client
108108 yarn install
109- yarn run build:web:prod --appVersion=1.0.${{ github.run_id }} --appPort=10822
109+ yarn run build:web:desktop --appVersion=1.0.${{ github.run_id }} --appPort=10822
110110 cp -r dist ../chat2db-server/chat2db-server-start/src/main/resources/static/front
111111
112112 # 编译服务端java版本
Original file line number Diff line number Diff line change 11import { formatDate } from './src/utils/date' ;
22import { defineConfig } from 'umi' ;
33const MonacoWebpackPlugin = require ( 'monaco-editor-webpack-plugin' ) ;
4- const UMI_PublicPath = process . env . UMI_PublicPath || './static/front/ ' ;
4+ const UMI_PublicPath = process . env . UMI_PublicPath || './' ;
55
66const chainWebpack = ( config : any , { webpack } : any ) => {
77 config . plugin ( 'monaco-editor' ) . use ( MonacoWebpackPlugin , [
Original file line number Diff line number Diff line change @@ -51,11 +51,26 @@ export default function SettingAI(props: IProps) {
5151 } }
5252 value = { chatGPTConfig ?. aiSqlSource }
5353 >
54+ < Radio value = { AiSqlSourceType . CHAT2DB } > Chat2DB AI</ Radio >
5455 < Radio value = { AiSqlSourceType . OPENAI } > Open AI</ Radio >
5556 < Radio value = { AiSqlSourceType . AZUREAI } > Azure AI</ Radio >
5657 < Radio value = { AiSqlSourceType . RESTAI } > { i18n ( 'setting.tab.custom' ) } </ Radio >
5758 </ Radio . Group >
5859 </ div >
60+ { chatGPTConfig ?. aiSqlSource === AiSqlSourceType . OPENAI && (
61+ < div >
62+ < div className = { styles . title } > Api Key</ div >
63+ < div className = { classnames ( styles . content , styles . chatGPTKey ) } >
64+ < Input
65+ placeholder = { i18n ( 'setting.placeholder.chat2dbApiKey' ) }
66+ value = { chatGPTConfig . apiKey }
67+ onChange = { ( e ) => {
68+ setChatGPTConfig ( { ...chatGPTConfig , apiKey : e . target . value } ) ;
69+ } }
70+ />
71+ </ div >
72+ </ div >
73+ ) }
5974 { chatGPTConfig ?. aiSqlSource === AiSqlSourceType . OPENAI && (
6075 < div >
6176 < div className = { styles . title } > Api Key</ div >
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export default {
2424 'setting.label.customAiUrl' : 'User-defined interface Url' ,
2525 'setting.placeholder.httpsProxy' : 'Not required. Set HTTP proxy {1} when requesting OPENAI interface.' ,
2626 'setting.placeholder.apiKey' : 'OpenAI official website to view the APIKEY' ,
27+ 'setting.placeholder.chat2dbApiKey' : '使用Chat2DB提供的APIKEY' ,
2728 'setting.placeholder.customUrl' : 'URL of the REST interface of the AI' ,
2829 'setting.placeholder.apiHost' : 'This parameter is mandatory. The default value is https://api.openai.com/' ,
2930 'setting.message.urlTestError' : 'The interface test failed. Procedure' ,
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export default {
2424 'setting.label.customAiUrl' : '自定义接口Url' ,
2525 'setting.placeholder.httpsProxy' : '非必填,用于设置请求OPENAI接口时的HTTP代理{1}' ,
2626 'setting.placeholder.apiKey' : '使用OpenAi接口时必填,可前往OpenAI官网查看APIKEY' ,
27+ 'setting.placeholder.chat2dbApiKey' : '使用Chat2DB提供的APIKEY' ,
2728 'setting.placeholder.customUrl' : '选择自定义AI时必填,用于设置自定义AI的REST接口URL' ,
2829 'setting.placeholder.apiHost' : '非必填,默认值为 https://api.openai.com/' ,
2930 'setting.message.urlTestError' : '接口测试不通过' ,
You can’t perform that action at this time.
0 commit comments