@things-factory/integration-openai 10.1.236 → 10.1.241

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.
@@ -0,0 +1,7 @@
1
+ # OpenAI Admin 커넥터
2
+
3
+ OpenAI 조직의 Admin API 에 연결합니다(비용 읽기).
4
+
5
+ - **Admin 키** — platform.openai.com › Organization settings › Admin keys 에서 만든 `sk-admin-...` 키. 프로젝트 키는 거절됩니다. 조직 소유자만 만들 수 있습니다.
6
+ - **조직 ID** — Organization settings › General 의 `org-...`. 구독 계정의 「계정 식별자」에 같은 값을 적습니다.
7
+ - **엔드포인트** — 비워 두면 `https://api.openai.com`.
@@ -0,0 +1,15 @@
1
+ # OpenAI 월 비용
2
+
3
+ 커넥션의 조직이 API 사용에 쓴 비용을 이번 달 전까지 닫힌 달마다, 항목(line item — 모델과 쓰임)별로 읽습니다(Costs API). 다음 단계에서 `local-graphql-mutate` 로 `syncSaasCosts(costs: $costs)` 를 부르면 계정 식별자가 그 조직 ID 인 구독 계정에 청구 기록이 쓰입니다.
4
+
5
+ ## 파라미터
6
+
7
+ - `months` — 읽을 달 수(1~12, 비우면 3)
8
+
9
+ ## 결과
10
+
11
+ `vendorAccount`(조직 ID) · `currency`(`USD`) · `months`(달마다 `lines` — `label` 항목 · `amount` 달러).
12
+
13
+ ## 다음 단계
14
+
15
+ `local-graphql-mutate` — mutation `mutation ($costs: [SaasCostsInput!]!) { syncSaasCosts(costs: $costs) { results { accountName written kept } unmatched } }`, 변수 `costs` → 이 단계 이름. 계정 식별자가 맞는 구독 계정이 없으면 `unmatched` 에 그 id 가 나온다 — 그 값을 계정 식별자에 적는다.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/integration-openai",
3
- "version": "10.1.236",
3
+ "version": "10.1.241",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -20,11 +20,12 @@
20
20
  "build": "tsc --p tsconfig.json",
21
21
  "build:server": "npm run clean:server && tsc",
22
22
  "clean:server": "rm -rf dist-server",
23
- "clean": "npm run clean:server"
23
+ "clean": "npm run clean:server",
24
+ "test": "node --test test/*.test.mjs"
24
25
  },
25
26
  "dependencies": {
26
- "@things-factory/ai-client-base": "^10.1.234",
27
- "@things-factory/integration-base": "^10.1.236"
27
+ "@things-factory/ai-client-base": "^10.1.241",
28
+ "@things-factory/integration-base": "^10.1.241"
28
29
  },
29
- "gitHead": "1560112ae8ae5a5d296b4fce1d5a1be05e30e8c2"
30
+ "gitHead": "d7fe2e1a1eb7c02cb21b897da26d385df014f908"
30
31
  }
@@ -1,3 +1,6 @@
1
1
  {
2
+ "label.admin-key": "Admin key",
3
+ "label.months": "months",
4
+ "label.organization-id": "Organization ID",
2
5
  "label.prompt": "prompt"
3
6
  }
@@ -1,3 +1,6 @@
1
1
  {
2
+ "label.admin-key": "Admin key",
3
+ "label.months": "months",
4
+ "label.organization-id": "Organization ID",
2
5
  "label.prompt": "prompt"
3
6
  }
@@ -1,3 +1,6 @@
1
1
  {
2
+ "label.admin-key": "Admin key",
3
+ "label.months": "months",
4
+ "label.organization-id": "Organization ID",
2
5
  "label.prompt": "プロンプト"
3
6
  }
@@ -1,3 +1,6 @@
1
1
  {
2
+ "label.admin-key": "Admin 키",
3
+ "label.months": "개월 수",
4
+ "label.organization-id": "조직 ID",
2
5
  "label.prompt": "프롬프트"
3
6
  }
@@ -1,3 +1,6 @@
1
1
  {
2
+ "label.admin-key": "Admin key",
3
+ "label.months": "months",
4
+ "label.organization-id": "Organization ID",
2
5
  "label.prompt": "prompt"
3
6
  }
@@ -1,3 +1,6 @@
1
1
  {
2
+ "label.admin-key": "Admin key",
3
+ "label.months": "months",
4
+ "label.organization-id": "Organization ID",
2
5
  "label.prompt": "提示"
3
6
  }