pi-gigachat-models 0.2.0 → 0.2.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 +14 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
# pi-gigachat-models
|
|
2
2
|
|
|
3
|
+
**Author:** [Anton Kholodkov](mailto:khanton@yandex.ru)
|
|
4
|
+
|
|
3
5
|
GigaChat provider (models and chat completions) for [pi](https://pi.dev). The package registers a `gigachat` provider with
|
|
4
6
|
Authorization-key login (`/login gigachat`), live model discovery, SSE token
|
|
5
7
|
streaming and function calling.
|
|
6
8
|
|
|
9
|
+
**Published to npm:** `npm install pi-gigachat-models`
|
|
10
|
+
|
|
7
11
|
The wire protocol follows the public GigaChat OpenAPI description:
|
|
8
12
|
<https://developers.sber.ru/docs/files/openapi/gigachat/api.yml>
|
|
9
13
|
|
|
10
14
|
## Install
|
|
11
15
|
|
|
12
16
|
```bash
|
|
13
|
-
#
|
|
14
|
-
pi
|
|
15
|
-
|
|
16
|
-
# Install as a personal package
|
|
17
|
-
pi install /path/to/gigachat
|
|
17
|
+
# Install from npm (published)
|
|
18
|
+
npm install pi-gigachat-models
|
|
18
19
|
|
|
19
|
-
# Or
|
|
20
|
+
# Or with pi
|
|
20
21
|
pi install npm:pi-gigachat-models
|
|
21
22
|
```
|
|
22
23
|
|
|
@@ -28,8 +29,7 @@ pi install npm:pi-gigachat-models
|
|
|
28
29
|
|
|
29
30
|
The flow asks for:
|
|
30
31
|
|
|
31
|
-
1. **API scope** — `GIGACHAT_API_PERS` (individual)
|
|
32
|
-
`GIGACHAT_API_CORP` (legal entities).
|
|
32
|
+
1. **API scope** — `GIGACHAT_API_PERS` (individual). **Note:** Only `GIGACHAT_API_PERS` is currently tested and supported. `GIGACHAT_API_B2B` and `GIGACHAT_API_CORP` are not supported yet.
|
|
33
33
|
2. **Authorization key** — the Base64 `client_id:client_secret` value from the
|
|
34
34
|
GigaChat API console. Pasting a full `Basic ...` header or a quoted value is
|
|
35
35
|
fine; it is normalized.
|
|
@@ -51,10 +51,11 @@ After login:
|
|
|
51
51
|
|
|
52
52
|
`/logout gigachat` removes the stored key.
|
|
53
53
|
|
|
54
|
-
Legal-entity scopes (`B2B`, `CORP`)
|
|
55
|
-
certificate (mTLS) on the token endpoint
|
|
56
|
-
uses `fetch`, which has no portable way to present a
|
|
57
|
-
|
|
54
|
+
Legal-entity scopes (`B2B`, `CORP`) are not supported yet. They would require a
|
|
55
|
+
GigaChat API client certificate (mTLS) on the token endpoint, which is not
|
|
56
|
+
implemented: the provider uses `fetch`, which has no portable way to present a
|
|
57
|
+
client certificate. Only `GIGACHAT_API_PERS` (individual) keys are tested and
|
|
58
|
+
supported.
|
|
58
59
|
|
|
59
60
|
## TLS and certificates
|
|
60
61
|
|
|
@@ -153,7 +154,7 @@ Not supported yet:
|
|
|
153
154
|
## Development
|
|
154
155
|
|
|
155
156
|
```bash
|
|
156
|
-
npm install #
|
|
157
|
+
npm install # install dependencies
|
|
157
158
|
npm run typecheck # strict TypeScript check, no emit
|
|
158
159
|
npm test # node --test, no network access required
|
|
159
160
|
npm run coverage # node's built-in coverage report for the test suite
|