Skip to content

Commit bfb9a5f

Browse files
committed
Merge branch 'dev' of github.com:opentiny/genui-sdk into homepage-optimize
2 parents 99d597a + dd0c82a commit bfb9a5f

6 files changed

Lines changed: 17 additions & 17 deletions

File tree

docs/src/components/server/api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { startServer } from '@opentiny/genui-sdk-server';
3535
startServer({
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

7777
equipChatCompletions(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';
120120
import http from 'http';
121121

122122
const chatCompletion = new FetchChatCompletions({
123-
apiKey: 'your-api-key',
123+
apiKey: '',
124124
baseURL: 'https://api.openai.com/v1',
125125
});
126126

docs/src/components/server/cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ yarn global add @opentiny/genui-sdk-server
2020

2121
```env
2222
BASE_URL=https://api.openai.com/v1
23-
API_KEY=your-api-key-here
23+
API_KEY=
2424
PORT=3100
2525
```
2626

@@ -120,7 +120,7 @@ genui-sdk-server -e /path/to/.env -p 3000
120120
```bash
121121
# 设置系统环境变量
122122
export BASE_URL=https://api.openai.com/v1
123-
export API_KEY=your-api-key
123+
export API_KEY=
124124
export PORT=3000
125125

126126
# 启动服务

docs/src/examples/chat/custom-fetch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ export function createOpenAICustomFetch(config: OpenAIConfig): CustomRequest {
345345
* 默认的 customFetch 实现(使用环境变量配置)
346346
*/
347347
export 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
```

docs/src/guide/server-usage.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ yarn add @opentiny/genui-sdk-server
4646

4747
```env
4848
BASE_URL=https://api.openai.com/v1
49-
API_KEY=your-api-key-here
49+
API_KEY=
5050
PORT=3100
5151
```
5252

@@ -65,7 +65,7 @@ npx genui-sdk-server --envFile .env.production
6565
npx 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';
7676
startServer({
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

9494
equipChatCompletions(app, {
9595
route: '/chat/completions',
96-
apiKey: 'your-api-key',
96+
apiKey: '',
9797
baseURL: 'https://api.openai.com/v1',
9898
});
9999

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sites/homepage/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
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",

0 commit comments

Comments
 (0)