File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ import { startServer } from '@opentiny/genui-sdk-server';
3535startServer ({
3636 port: 3100 ,
3737 baseURL: ' https://api.openai.com/v1' ,
38- apiKey: ' your-api-key ' ,
38+ apiKey: ' ' ,
3939 maxAttempts: 10 ,
4040});
4141```
@@ -76,7 +76,7 @@ const app = express();
7676
7777equipChatCompletions (app , {
7878 route: ' /chat/completions' ,
79- apiKey: ' your-api-key ' ,
79+ apiKey: ' ' ,
8080 baseURL: ' https://api.openai.com/v1' ,
8181});
8282
@@ -120,7 +120,7 @@ import { FetchChatCompletions } from '@opentiny/genui-sdk-chat-completions';
120120import http from ' http' ;
121121
122122const chatCompletion = new FetchChatCompletions ({
123- apiKey: ' your-api-key ' ,
123+ apiKey: ' ' ,
124124 baseURL: ' https://api.openai.com/v1' ,
125125});
126126
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ yarn global add @opentiny/genui-sdk-server
2020
2121``` env
2222BASE_URL=https://api.openai.com/v1
23- API_KEY=your-api-key-here
23+ API_KEY=
2424PORT=3100
2525```
2626
@@ -120,7 +120,7 @@ genui-sdk-server -e /path/to/.env -p 3000
120120``` bash
121121# 设置系统环境变量
122122export BASE_URL=https://api.openai.com/v1
123- export API_KEY=your-api-key
123+ export API_KEY=
124124export PORT=3000
125125
126126# 启动服务
Original file line number Diff line number Diff line change @@ -345,7 +345,7 @@ export function createOpenAICustomFetch(config: OpenAIConfig): CustomRequest {
345345 * 默认的 customFetch 实现(使用环境变量配置)
346346 */
347347export const defaultCustomFetch = createOpenAICustomFetch ({
348- apiKey: import .meta .env .VITE_OPENAI_API_KEY || ' sk-test ' ,
348+ apiKey: import .meta .env .VITE_OPENAI_API_KEY ,
349349 baseURL: ' https://your-chat-backend/api' ,
350350});
351351```
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ yarn add @opentiny/genui-sdk-server
4646
4747``` env
4848BASE_URL=https://api.openai.com/v1
49- API_KEY=your-api-key-here
49+ API_KEY=
5050PORT=3100
5151```
5252
@@ -65,7 +65,7 @@ npx genui-sdk-server --envFile .env.production
6565npx genui-sdk-server --port 3000
6666
6767# 通过设置环境变量启动(git bash)
68- export API_KEY=********* BASE_URL=https://your-llm-server.com/api && npx genui-sdk-server
68+ export API_KEY= BASE_URL=https://your-llm-server.com/api && npx genui-sdk-server
6969```
7070
7171#### 方式二:编程方式
@@ -76,7 +76,7 @@ import { startServer } from '@opentiny/genui-sdk-server';
7676startServer ({
7777 port: 3100 ,
7878 baseURL: ' https://api.openai.com/v1' ,
79- apiKey: ' your-api-key ' ,
79+ apiKey: ' ' ,
8080 maxAttempts: 10 , // 端口冲突时最大尝试次数
8181});
8282```
@@ -93,7 +93,7 @@ app.use(cors());
9393
9494equipChatCompletions (app , {
9595 route: ' /chat/completions' ,
96- apiKey: ' your-api-key ' ,
96+ apiKey: ' ' ,
9797 baseURL: ' https://api.openai.com/v1' ,
9898});
9999
Original file line number Diff line number Diff line change 1010 "preview" : " vite preview"
1111 },
1212 "dependencies" : {
13- "@opentiny/genui-sdk-vue" : " 1.0 .0" ,
13+ "@opentiny/genui-sdk-vue" : " 1.1 .0" ,
1414 "@opentiny/tiny-robot-svgs" : " ^0.3.3" ,
1515 "@opentiny/vue" : " ~3.28.0" ,
1616 "@opentiny/vue-button" : " ~3.28.0" ,
You can’t perform that action at this time.
0 commit comments