@d-ai/omp 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -31,7 +31,7 @@ omp login dai
31
31
  1. `1`:浏览器授权。生产走 `https://dai.itbug.shop`,`DAI_BASE_URL` 指向 `127.0.0.1` 或 `localhost` 时走本地。
32
32
  2. `2`:粘贴 `ddsk_` API key。
33
33
 
34
- 模型列表跟这次登录的站点。OAuth 登录后,没再设置 `DAI_BASE_URL` 也会用凭证里的 issuer,而不是改去生产。`/v1/models` 目前只认 `ddsk_`;OAuth 令牌被拒时改用该站点的公开文本目录。
34
+ 模型列表跟这次登录的站点。OAuth 登录后,没再设置 `DAI_BASE_URL` 也会用凭证里的 issuer,而不是改去生产。OAuth 和 `ddsk_` 都会请求 `/v1/models`;接口拒绝时改用该站点的公开文本目录。
35
35
 
36
36
  也可以不登录,直接 `export DAI_API_KEY=ddsk_...`。
37
37
 
package/dist/index.js CHANGED
@@ -1221,8 +1221,7 @@ function registerDaiProvider(pi) {
1221
1221
  name: "D.AI",
1222
1222
  baseUrl: "https://dai.itbug.shop/v1",
1223
1223
  api: "openai-completions",
1224
- apiKey: "DAI_API_KEY",
1225
- authHeader: true,
1224
+ apiKey: "$DAI_API_KEY",
1226
1225
  models: [],
1227
1226
  async fetchDynamicModels(apiKey) {
1228
1227
  const key = typeof apiKey === "string" ? apiKey.trim() : "";
package/package.json CHANGED
@@ -1,17 +1,23 @@
1
1
  {
2
2
  "name": "@d-ai/omp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "omp plugin: log in to D.AI and use its text models",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
- "keywords": ["omp-plugin", "pi-package"],
7
+ "keywords": [
8
+ "omp-plugin",
9
+ "pi-package"
10
+ ],
8
11
  "homepage": "https://dai.itbug.shop",
9
12
  "repository": {
10
13
  "type": "git",
11
- "url": "https://github.com/mdddj/dd_server_rust_private.git",
14
+ "url": "git+https://github.com/mdddj/dd_server_rust_private.git",
12
15
  "directory": "sdks/omp"
13
16
  },
14
- "files": ["dist", "README.md"],
17
+ "files": [
18
+ "dist",
19
+ "README.md"
20
+ ],
15
21
  "scripts": {
16
22
  "build": "tsdown",
17
23
  "typecheck": "tsc --noEmit",
@@ -28,7 +34,9 @@
28
34
  "typescript": "^7.0.2"
29
35
  },
30
36
  "omp": {
31
- "extensions": ["./dist/index.js"]
37
+ "extensions": [
38
+ "./dist/index.js"
39
+ ]
32
40
  },
33
41
  "publishConfig": {
34
42
  "access": "public"