@toloka-platform/sdk 0.2.0-preview.2 → 0.2.0-preview.4

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.
Files changed (110) hide show
  1. package/README.md +10 -4
  2. package/dist/cli/toloka.js +162 -154
  3. package/dist/cli/toloka.js.jsc +0 -0
  4. package/dist/cli/toloka.js.jsc.sha256 +1 -1
  5. package/dist/cli/toloka.js.sha256 +1 -1
  6. package/docs/authoring.md +18 -1
  7. package/docs/cli-v2.md +6 -4
  8. package/docs/cli.md +58 -11
  9. package/docs/getting-started.md +3 -3
  10. package/docs/limitations.md +1 -1
  11. package/docs/testing.md +1 -1
  12. package/docs/troubleshooting.md +1 -1
  13. package/examples/face-image-collection/README.md +2 -2
  14. package/openapi/gen/api.ts +78 -0
  15. package/openapi/gen/models/baseModel.ts +1 -0
  16. package/openapi/gen/models/checkReport.ts +2 -1
  17. package/openapi/gen/models/checkReportAnyOfTwoseven.ts +5 -0
  18. package/openapi/gen/models/checkReportAnyOfTwosevenResultsItem.ts +6 -0
  19. package/openapi/gen/models/checkReportAnyOfTwosevenResultsItemVerdict.ts +2 -0
  20. package/openapi/gen/models/currentUser.ts +3 -0
  21. package/openapi/gen/models/currentUserTeamsItem.ts +6 -0
  22. package/openapi/gen/models/deliveryOrder.ts +9 -0
  23. package/openapi/gen/models/deliveryOrderClientName.ts +2 -0
  24. package/openapi/gen/models/getTrainingRunMetricHistoryParams.ts +4 -0
  25. package/openapi/gen/models/gistingTrainingConfiguration.ts +6 -2
  26. package/openapi/gen/models/gistingTrainingConfigurationBatchSize.ts +2 -0
  27. package/openapi/gen/models/gistingTrainingConfigurationGistTokens.ts +2 -0
  28. package/openapi/gen/models/gistingTrainingConfigurationInput.ts +6 -2
  29. package/openapi/gen/models/gistingTrainingConfigurationInputBatchSize.ts +2 -0
  30. package/openapi/gen/models/gistingTrainingConfigurationInputGistTokens.ts +2 -0
  31. package/openapi/gen/models/index.ts +28 -4
  32. package/openapi/gen/models/listDeliveryOrders200.ts +5 -0
  33. package/openapi/gen/models/sftTrainingConfiguration.ts +6 -3
  34. package/openapi/gen/models/sftTrainingConfigurationBatchSize.ts +2 -0
  35. package/openapi/gen/models/sftTrainingConfigurationInput.ts +6 -3
  36. package/openapi/gen/models/sftTrainingConfigurationInputBatchSize.ts +2 -0
  37. package/openapi/gen/models/sftTrainingConfigurationInputLoraRank.ts +2 -0
  38. package/openapi/gen/models/sftTrainingConfigurationLoraRank.ts +2 -0
  39. package/openapi/gen/models/trainingRunMetricHistory.ts +9 -0
  40. package/openapi/gen/models/trainingRunMetricHistoryMetric.ts +2 -0
  41. package/openapi/gen/models/trainingRunMetricHistoryPointsItem.ts +9 -0
  42. package/openapi/gen/models/trainingRunMetricHistoryPointsItemNonFinite.ts +2 -0
  43. package/openapi/gen/models/trainingRunMetricHistoryPointsItemValue.ts +2 -0
  44. package/openapi/gen/models/trainingRunMetrics.ts +9 -0
  45. package/openapi/gen/models/trainingRunMetricsMetricsItem.ts +8 -0
  46. package/openapi/gen/models/trainingRunMetricsMetricsItemLatest.ts +9 -0
  47. package/openapi/gen/models/trainingRunMetricsMetricsItemLatestNonFinite.ts +2 -0
  48. package/openapi/gen/models/trainingRunMetricsMetricsItemLatestValue.ts +2 -0
  49. package/openapi/gen/models/trainingRunMetricsMetricsItemMetric.ts +2 -0
  50. package/openapi/gen/models/trainingRunMetricsUnavailableReason.ts +2 -0
  51. package/package.json +2 -2
  52. package/skills/catalog.json +55 -7
  53. package/skills/toloka-build/SKILL.md +35 -21
  54. package/skills/toloka-build/references/node-semantics.md +13 -11
  55. package/skills/toloka-build/references/workflow-and-cli.md +31 -20
  56. package/skills/toloka-fine-tuning/SKILL.md +155 -0
  57. package/skills/toloka-get-started/SKILL.md +70 -0
  58. package/skills/toloka-gisting/SKILL.md +166 -0
  59. package/skills/toloka-report-issue/references/report-template.md +1 -1
  60. package/src/authoring/index.ts +14 -0
  61. package/src/checks/task-ui-typecheck.ts +12 -10
  62. package/src/cli/analytics.ts +88 -15
  63. package/src/cli/auth.ts +93 -21
  64. package/src/cli/auto-update.ts +36 -39
  65. package/src/cli/check.ts +88 -39
  66. package/src/cli/cli-entry.ts +3 -2
  67. package/src/cli/cli-error.ts +43 -0
  68. package/src/cli/commands/auth.ts +89 -0
  69. package/src/cli/commands/config.ts +28 -0
  70. package/src/cli/commands/dataset.ts +85 -0
  71. package/src/cli/commands/delivery-order.ts +18 -0
  72. package/src/cli/commands/models.ts +121 -0
  73. package/src/cli/commands/pipeline.ts +131 -0
  74. package/src/cli/commands/project.ts +168 -0
  75. package/src/cli/commands/report.ts +43 -0
  76. package/src/cli/commands/secret.ts +40 -0
  77. package/src/cli/commands/skill.ts +36 -0
  78. package/src/cli/commands/source.ts +204 -0
  79. package/src/cli/commands/status.ts +17 -0
  80. package/src/cli/commands/training.ts +261 -0
  81. package/src/cli/commands/version.ts +14 -0
  82. package/src/cli/config.ts +7 -8
  83. package/src/cli/context.ts +251 -0
  84. package/src/cli/credentials.ts +12 -4
  85. package/src/cli/data.ts +96 -34
  86. package/src/cli/delivery-orders.ts +47 -0
  87. package/src/cli/environment.ts +26 -0
  88. package/src/cli/file-system.ts +6 -2
  89. package/src/cli/format-error.ts +45 -2
  90. package/src/cli/init.ts +14 -11
  91. package/src/cli/models.ts +43 -12
  92. package/src/cli/program.ts +120 -1347
  93. package/src/cli/project-context.ts +126 -43
  94. package/src/cli/project.ts +80 -28
  95. package/src/cli/report.ts +24 -9
  96. package/src/cli/runs.ts +33 -8
  97. package/src/cli/sdk-version.ts +38 -0
  98. package/src/cli/settings.ts +13 -5
  99. package/src/cli/skill.ts +67 -24
  100. package/src/cli/source.ts +3 -2
  101. package/src/cli/terminal-io.ts +110 -0
  102. package/src/cli/trainings.ts +242 -57
  103. package/src/cli/version.ts +3 -3
  104. package/src/client.ts +21 -9
  105. package/src/importer.ts +32 -2
  106. package/src/transport.ts +13 -1
  107. package/openapi/gen/models/gistingTrainingConfigurationInputRegime.ts +0 -2
  108. package/openapi/gen/models/gistingTrainingConfigurationRegime.ts +0 -2
  109. package/openapi/gen/models/sftTrainingConfigurationInputRegime.ts +0 -2
  110. package/openapi/gen/models/sftTrainingConfigurationRegime.ts +0 -2
Binary file
@@ -1 +1 @@
1
- 4bc560d638ddf49386ccbb12f7eeaaa0922fd26ab13c69065cbb8540c27cbe50 toloka.js.jsc
1
+ ee914e999937f98c40a657d10640ea64acda93b2e50f4a9306e25453c8897248 toloka.js.jsc
@@ -1 +1 @@
1
- e7e688bae427a1230ea0cbcacf81224527dc592f0e9087d584462d5ab3ec2059 toloka.js
1
+ fabf11ce7545f788c03870778c18deda006d89c95c839ae8c1592f4eaa287366 toloka.js
package/docs/authoring.md CHANGED
@@ -86,6 +86,21 @@ Register authored code behavior with `test.code(pipeline, node, name, callback)`
86
86
 
87
87
  One human-work task type. The node owns the entire expert journey: instruction, UI, entity schemas, quality criteria, quality assurance, audience, pricing, Training, and Exam.
88
88
 
89
+ Choose entity cardinality from the task, not from the component's JavaScript value shape. If one labeler produces one logical result, keep the entity static: omit `dynamic` and `maxEntities`, and use a path without `[*]`.
90
+
91
+ ```ts
92
+ {
93
+ field: caption,
94
+ entityType: "SHORT_ANSWER",
95
+ jsonPath: "$.caption",
96
+ description: "The one caption written for this image.",
97
+ }
98
+ ```
99
+
100
+ Use `dynamic: true` only when one labeler produces multiple independent entities. Set `maxEntities` to a task-grounded upper bound rather than a generic default. A component may expose an array while still producing one logical entity; for a single upload or recording, keep a scalar field and static entity and select the completed first value with a path such as `$.video_file[0].downloadLink`.
101
+
102
+ The following task is legitimately dynamic because the labeler can draw one independent box for every visible face:
103
+
89
104
  ```ts
90
105
  import { generation } from "@toloka-platform/sdk";
91
106
 
@@ -209,7 +224,7 @@ export const routeDisputed = match("route_disputed", {
209
224
  about: { name: "route_disputed" },
210
225
  conditions: [
211
226
  {
212
- name: "is disputed",
227
+ name: "is_disputed",
213
228
  predicates: [{ field: verdict, jsonPath: "$", operator: "text_eq", value: "disputed" }],
214
229
  },
215
230
  ],
@@ -217,6 +232,8 @@ export const routeDisputed = match("route_disputed", {
217
232
  });
218
233
  ```
219
234
 
235
+ Each condition name must be unique within the Match node and contain 2–32 characters. Start with a lowercase letter, use only lowercase letters, digits, and underscores, and end with a letter or digit. `match()` rejects invalid or duplicate names locally before any platform request.
236
+
220
237
  ## Connect ports
221
238
 
222
239
  `connect(from, to)` is the only way to create an edge. Ports are typed, so a wrong direction is a compile error.
package/docs/cli-v2.md CHANGED
@@ -9,7 +9,7 @@ The platform object is a **project** (`pp.…`, today's pipeline project). Windm
9
9
  Today the checkout is a pipeline tree that happens to mention a project.
10
10
 
11
11
  - A directory is a project root if it has `toloka.json` **or** a `pipelines/` folder. No pipelines, no root.
12
- - `init` writes agent skills before a project exists. It writes `toloka.json` only from an explicit `--project-id`, `TOLOKA_PROJECT_ID` / `POTATO_PROJECT_ID`, or an existing checkout; it never binds a new checkout from the machine registry.
12
+ - `init` writes agent skills before a project exists. It writes `toloka.json` only from an explicit `--project-id`, `TOLOKA_PROJECT_ID`, or an existing checkout; it never binds a new checkout from the machine registry.
13
13
  - A checkout attaches when `project create` or `import` writes `toloka.json`, or when `init` receives explicit project identity.
14
14
  - `run`, `status`, `runs`, and `cost` pick a pipeline from `toloka.json`. Zero pipelines is an error. Several pipelines opens a picker. The command names pretend there is "the" pipeline.
15
15
  - `status` means "latest run of some pipeline", not "this project".
@@ -61,7 +61,7 @@ A checkout can later grow other folders (`datasets/`, `files/`, whatever we auth
61
61
  Highest wins:
62
62
 
63
63
  1. `--project-id`
64
- 2. `TOLOKA_PROJECT_ID` (keep accepting `POTATO_PROJECT_ID` until we rename the rest of the env surface)
64
+ 2. `TOLOKA_PROJECT_ID` (the legacy `POTATO_*` names are still read for one preview cycle with a deprecation warning)
65
65
  3. `toloka.json` in the discovered checkout (walk up from cwd, or `--source-root`)
66
66
  4. `current` in the machine registry
67
67
  5. Fail: `No project selected. Run toloka project create for a new project, toloka project add for an existing project, or cd into a checkout.`
@@ -86,13 +86,14 @@ toloka project remove cat-labeling # local unbind only
86
86
 
87
87
  `project add` with no arguments prompts for alias and id, like `wmill workspace add`. The new alias becomes `current`.
88
88
 
89
- Create a live project and bind it in one step:
89
+ Create a live project and bind it in one step. The delivery order follows the owning team, not the account (`toloka whoami` marks internal teams `(internal)` on its `Teams:` line): a project in an internal team must carry an active id from `toloka delivery-order list`, and a project in an external team must not carry one, even when the account is internal:
90
90
 
91
91
  ```sh
92
92
  toloka project create cat-labeling --team-id <teamId>
93
+ toloka project create cat-labeling --team-id <teamId> --delivery-order-id <orderId>
93
94
  ```
94
95
 
95
- `POST /projects` requires `teamId`. There is no public team-list endpoint today, so `--team-id` is required unless every visible project shares one team, in which case we reuse that id. If teams differ, refuse and ask.
96
+ `POST /projects` requires `teamId`. `GET /me` lists the caller's teams with their write access, so `--team-id` is optional when the account has exactly one writable team; with several, the CLI refuses and names them.
96
97
 
97
98
  `project create` writes the machine alias, sets `current`, and if cwd has no `toloka.json`, writes one.
98
99
 
@@ -125,6 +126,7 @@ Resource commands never search the disk for a pipeline first. They load the proj
125
126
  | `plan` / `apply` / `validate` | whole project | no |
126
127
  | `secret set` | project | no |
127
128
  | `dataset list` | project | no |
129
+ | `dataset create <name>` | project | no |
128
130
  | `dataset fields <name>` | named dataset in this project | no |
129
131
  | `dataset load <name>` | named dataset in this project | no |
130
132
  | `dataset upload <name>` | named dataset in this project | no |
package/docs/cli.md CHANGED
@@ -4,7 +4,7 @@ The `toloka` CLI reads TypeScript source as the desired state, compares it with
4
4
 
5
5
  This CLI is Beta software. Commands, flags, and output can change before general availability.
6
6
 
7
- `toloka` requires Bun 1.4.0. The published package ships matching CLI bytecode; the launcher falls back to TypeScript source in a development checkout when the bytecode is absent.
7
+ `toloka` requires Bun 1.4.0 or newer. The published package ships CLI bytecode built with Bun 1.4.0; another Bun version runs the same bundled JavaScript without that cache and starts slower. The launcher falls back to TypeScript source in a development checkout when the bytecode is absent.
8
8
 
9
9
  ## Configuration
10
10
 
@@ -13,28 +13,30 @@ Credentials and the platform base URL resolve from the same precedence order, hi
13
13
  | Precedence | API key source |
14
14
  | ----------- | ------------------------------------------ |
15
15
  | 1 (highest) | `--api-key` flag |
16
- | 2 | `POTATO_API_KEY` environment variable |
16
+ | 2 | `TOLOKA_API_KEY` environment variable |
17
17
  | 3 (lowest) | credentials file written by `toloka login` |
18
18
 
19
19
  | Precedence | Base URL source |
20
20
  | ----------- | --------------------------------------- |
21
21
  | 1 (highest) | `--base-url` flag |
22
- | 2 | `POTATO_BASE_URL` environment variable |
22
+ | 2 | `TOLOKA_BASE_URL` environment variable |
23
23
  | 3 | base URL stored in the credentials file |
24
24
  | 4 (default) | `https://platform.toloka.ai` |
25
25
 
26
26
  | Precedence | Project id source |
27
27
  | ----------- | --------------------------------------------- |
28
28
  | 1 (highest) | `--project-id` flag |
29
- | 2 | `TOLOKA_PROJECT_ID`, then `POTATO_PROJECT_ID` |
29
+ | 2 | `TOLOKA_PROJECT_ID` |
30
30
  | 3 | `projectId` in `toloka.json` |
31
31
  | 4 (lowest) | `current` alias in the credentials file |
32
32
 
33
+ Earlier releases named these variables `POTATO_API_KEY`, `POTATO_BASE_URL`, and `POTATO_PROJECT_ID`. The CLI still reads each legacy name when its `TOLOKA_*` counterpart is unset, prefers the `TOLOKA_*` value when both are set, and prints `POTATO_API_KEY is deprecated and will stop being read; set TOLOKA_API_KEY instead.` (and the same line for the other two) on stderr once per command. The legacy names stop being read in the first stable `0.2.0` release; rename them now to silence the warning.
34
+
33
35
  `toloka login` verifies the key against the platform before saving anything. It writes `$XDG_CONFIG_HOME/toloka/credentials.json`, which defaults to `~/.config/toloka/credentials.json`, with file mode `0600` and a parent directory with mode `0700`. The file may also store local project aliases. The legacy `~/.toloka/credentials.json` is still read when the new path has no file. `toloka logout` deletes the stored file but does not revoke the key.
34
36
 
35
37
  Machine settings live next to that credentials file in `settings.json` and default `auto-update` to `true`. A globally installed `toloka` checks `https://registry.npmjs.org/` at most once per day and, when a newer `@toloka-platform/sdk` version has been published for at least 24 hours, installs it with `bun add --global` and re-runs the original command. The check is pinned to that registry; a checkout `.env` cannot retarget it. `config`, `version`, and `help` never trigger a check. Project-local installs, CI, and `TOLOKA_SKIP_AUTO_UPDATE=1` also skip it. `TOLOKA_AUTO_UPDATE=0` turns it off for one command; `TOLOKA_AUTO_UPDATE=1` turns it on even when the setting is false.
36
38
 
37
- Ordinary usage events (`sdk_cli_command_completed` / `sdk_cli_command_failed`) go to Toloka's PostHog project so we can see which commands run and which error classes they hit. Their payloads contain only an allowlisted command classifier, duration, exit code, outcome or error code, SDK and Bun versions, actor, and channel. Raw arguments, flag values, environment variables, API keys, secret names, base URLs and hosts, local paths, project ids, error messages, stack traces, and source context are not sent. GeoIP enrichment is disabled. Distinct id starts as a random UUID stored next to the credentials file. After a successful authenticated command, the CLI calls `GET /me` and aliases that UUID onto the platform user id without setting person properties. Set `TOLOKA_TELEMETRY=0` or `DO_NOT_TRACK=1` to disable capture. CI environments are disabled unless `TOLOKA_TELEMETRY=1`. The explicitly approved full-text `report` event is documented in [report](#report).
39
+ Ordinary usage events (`sdk_cli_command_completed` / `sdk_cli_command_failed`) go to Toloka's PostHog project so we can see which commands run and which error classes they hit. Every failed command with an exception also emits a sanitized PostHog Error Tracking `$exception`; usage errors such as unknown commands or invalid flags do not. Command events contain only an allowlisted command classifier, duration, exit code, outcome or error code, optional HTTP status and server request ID, SDK and Bun versions, actor, and channel. Error Tracking receives the same bounded metadata plus a synthetic exception; raw arguments, flag values, environment variables, API keys, secret names, base URLs and hosts, local paths, project ids, error messages, stack traces, response bodies, and source context are not sent. GeoIP enrichment is disabled. Distinct id starts as a random UUID stored next to the credentials file. After a successful authenticated command, the CLI calls `GET /me` and aliases that UUID onto the platform user id without setting person properties. Set `TOLOKA_TELEMETRY=0` or `DO_NOT_TRACK=1` to disable capture. CI environments are disabled unless `TOLOKA_TELEMETRY=1`. The explicitly approved full-text `report` event is documented in [report](#report).
38
40
 
39
41
  The root program accepts these flags before any command:
40
42
 
@@ -47,6 +49,10 @@ The root program accepts these flags before any command:
47
49
 
48
50
  Commands resolve the project root by walking up from the working directory until they find a `toloka.json` file. The CLI reports that directory on stderr when it differs from the working directory. Passing `--source-root` disables discovery. With no marker found, the working directory is used. `init` and `report` do not walk up: they use the working directory or `--source-root` only. The authentication commands `login`, `logout`, and `auth-status` do not need a project root.
49
51
 
52
+ ## Errors and hints
53
+
54
+ A failing command prints its message to stderr and exits `1`. Most messages are followed by a `Hint: …` line with the next command to run; messages that already spell out the remedy carry no hint. Platform failures print `Potato API request failed with status <code> (request id: <id>)`, the response body, and a status-based hint: `401`/`403` point at `toloka whoami` and `toloka login`, `404` at the selected project and the matching list command, `429` asks you to wait, and `5xx` asks you to retry and then send a report with `toloka report <report.md>`.
55
+
50
56
  ## Resources and Base Actions
51
57
 
52
58
  The CLI is resource-first: `toloka <resource> <action>`. A Base Action has one meaning wherever a resource implements it. A resource exposes only the Base Actions that have real behavior; there are no placeholder actions.
@@ -80,11 +86,11 @@ toloka project switch <alias>
80
86
  toloka project current
81
87
  toloka project url
82
88
  toloka project remove <alias>
83
- toloka project create [alias] [--name <name>] [--team-id <id>]
89
+ toloka project create [alias] [--name <name>] [--team-id <id>] [--delivery-order-id <id>]
84
90
  toloka project untrack <pipeline|dataset> <name> [--confirm]
85
91
  ```
86
92
 
87
- `add`, `switch`, `remove`, and `create` write the machine registry in the credentials file. They refuse `--api-key` / `--base-url` / `POTATO_*` when those would select a different key or platform than the stored file. `project list` prints project id, name, and team id. `create` reuses the only visible team when every listed project shares one; otherwise pass `--team-id`.
93
+ `add`, `switch`, `remove`, and `create` write the machine registry in the credentials file. They refuse `--api-key` / `--base-url` / `TOLOKA_*` when those would select a different key or platform than the stored file. `project list` prints project id, name, and team id. `create` uses the account's only writable team (`GET /me` lists the teams; `whoami` prints them) and asks for `--team-id` when there are several. A project owned by an internal team also needs `--delivery-order-id`; `toloka delivery-order list` shows the orders and answers with an explanation for accounts without internal teams.
88
94
 
89
95
  `project untrack` removes one pipeline or dataset binding from `toloka.json` without deleting the live resource. It previews the name and id in a terminal; outside a terminal, pass `--confirm` after reviewing the state file.
90
96
 
@@ -92,16 +98,29 @@ toloka project untrack <pipeline|dataset> <name> [--confirm]
92
98
 
93
99
  `url` fetches the selected project to resolve its team and prints only its platform UI URL to stdout, making the output safe to capture in scripts and agent workflows.
94
100
 
101
+ ## delivery-order
102
+
103
+ Lists the Sunday delivery orders this key can attach on `project create`. The command is always registered; the platform answers `403` for accounts without an internal team, which the CLI reports as `Delivery orders are available to internal teams only.`
104
+
105
+ ```sh
106
+ toloka delivery-order list
107
+ ```
108
+
109
+ Prints `ID`, `NAME`, `STATUS`, and `CLIENT` columns. Empty output is `No delivery orders visible.`
110
+
95
111
  ## login
96
112
 
97
113
  Stores an API key for this machine after verifying it.
98
114
 
99
115
  ```sh
100
116
  toloka login
117
+ toloka login --api-key-stdin < key.txt
101
118
  ```
102
119
 
103
120
  The command explains how to generate an API key, prompts for it with masked input, and verifies it against the platform before saving. On success it prints `Authenticated against <base-url>: N project(s) visible.` and `Saved credentials to <path>.`
104
121
 
122
+ Without a terminal there is no prompt. `--api-key-stdin` reads the key from standard input, so it never appears in shell history or the process list; `--api-key <key>` and `TOLOKA_API_KEY` also work but expose the key to both.
123
+
105
124
  ## logout
106
125
 
107
126
  Removes stored credentials from this machine.
@@ -120,7 +139,7 @@ Shows which platform and key the CLI would use. Alias: `whoami`.
120
139
  toloka auth-status [--show-token]
121
140
  ```
122
141
 
123
- On success it prints the platform URL with its source, the API key masked unless `--show-token` is passed, the selected project, and `Reachable: N project(s) visible.` The project line is printed even when no key is in effect or the platform is not reachable. It exits `1` when no key is in effect or the platform is not reachable.
142
+ On success it prints the platform URL with its source, the API key masked unless `--show-token` is passed, the selected project, `Reachable: N project(s) visible.`, `Internal: true` or `Internal: false` for the account, and a `Teams:` line that marks each team `(internal)` and `(read-only)` where that applies. The project line is printed even when the probe fails. It exits `1` when no key is in effect, when the platform rejects the key (`Rejected: …`, followed by the advice to run `toloka login`), when the platform does not answer (`Not reachable: …`; the key was not evaluated), or when the platform fails (`Platform error: …`).
124
143
 
125
144
  ## config
126
145
 
@@ -143,7 +162,7 @@ Initializes the current project directory and installs the Agent Bootstrap entry
143
162
  toloka init
144
163
  ```
145
164
 
146
- `init` does not require a selected platform project. It always maintains one `<toloka>` … `</toloka>` Agent Bootstrap block in `AGENTS.md` and writes minimal pointers to it: `.claude/skills/toloka-bootstrap/SKILL.md` when `.claude/` exists (or when no agent configuration exists at all) and `.cursor/rules/toloka-bootstrap.mdc` with `alwaysApply: true` when `.cursor/rules/` exists. The bootstrap tells an agent to run `toloka --help`, search the bundled Skill Catalog with `toloka skill search`, install a matching skill with `toloka skill install`, and read `.agents/skills/<skill-id>/SKILL.md`; it does not embed the build workflow. Bytes outside the block are preserved, and re-running `init` refreshes the block and both pointers in place without adding duplicates. When a project is already selected through `--project-id`, `TOLOKA_PROJECT_ID` / `POTATO_PROJECT_ID`, `toloka.json`, or the machine registry, it also writes `toloka.json` when missing. It does not walk up to a parent checkout.
165
+ `init` does not require a selected platform project. It always maintains one `<toloka>` … `</toloka>` Agent Bootstrap block in `AGENTS.md` and writes minimal pointers to it: `.claude/skills/toloka-bootstrap/SKILL.md` when `.claude/` exists (or when no agent configuration exists at all) and `.cursor/rules/toloka-bootstrap.mdc` with `alwaysApply: true` when `.cursor/rules/` exists. The bootstrap tells an agent to run `toloka --help`, search the bundled Skill Catalog with `toloka skill search`, install a matching skill with `toloka skill install`, and read `.agents/skills/<skill-id>/SKILL.md`; it does not embed the build workflow. Bytes outside the block are preserved, and re-running `init` refreshes the block and both pointers in place without adding duplicates. When a project is already selected through `--project-id`, `TOLOKA_PROJECT_ID`, `toloka.json`, or the machine registry, it also writes `toloka.json` when missing. It does not walk up to a parent checkout.
147
166
 
148
167
  `init` removes only Toloka-generated legacy entry points that still carry the `<!-- toloka:sdk-version … -->` marker: the full `toloka-build` and `toloka-pipeline-as-code` Claude skills and Cursor rules, plus the `<!-- toloka:begin -->` … `<!-- toloka:end -->` block in `AGENTS.md`, which is replaced by the `<toloka>` block in place. Files without that marker, other skills and rules, and installed skills under `.agents/skills/` are left untouched. An `AGENTS.md` whose current or legacy block is unterminated, reversed, or duplicated is refused with the file's full path before anything, including `toloka.json`, is written.
149
168
 
@@ -252,7 +271,7 @@ toloka base-model list [--json]
252
271
  toloka base-model get <id> [--json]
253
272
  ```
254
273
 
255
- Human-readable output is the default. `base-model list` prints aligned ID, name, provider, and upstream-model columns; `base-model get` prints labeled fields including the pinned revision. Pass `--json` for machine-readable output.
274
+ Human-readable output is the default. `base-model list` prints aligned ID, name, provider, upstream-model, revision (first 12 characters) and upstream-snapshot URL columns; `base-model get` prints labeled fields including the full pinned revision and the `https://huggingface.co/<model>/tree/<revision>` snapshot URL. Pass `--json` for machine-readable output.
256
275
 
257
276
  ## model
258
277
 
@@ -268,12 +287,34 @@ toloka model archive <name-or-id> [--json]
268
287
 
269
288
  `model create` creates project-owned Model metadata linked to one catalog Base Model; it does not create a Model Version. Human-readable output is the default for every command in this group. Pass `--json` for machine-readable objects or arrays. Weight upload, validation, download, and Model Version creation are deferred.
270
289
 
290
+ ## training
291
+
292
+ Create a reusable Training draft, price it, and run it.
293
+
294
+ ```sh
295
+ toloka training list [--json]
296
+ toloka training get <name-or-id> [--json]
297
+ toloka training create <name> [--method sft|gisting] (--base-model <id> | --model-version <id>) --dataset <id> [--train-filter field=value] [--validation-dataset <id> [--validation-filter field=value]] [--prompt-file <path>] [--lora-rank 8|16|32 | --gist-tokens 8|32|64] [--epochs 1..5] [--learning-rate <rate>] [--batch-size 8|16|32|64] [--max-sequence-length <tokens>] [--json]
298
+ toloka training update <name-or-id> [--base-model <id> | --model-version <id>] [--dataset <id>] [--train-filter field=value] [--validation-dataset <id> [--validation-filter field=value]] [--prompt-file <path>] [--lora-rank 8|16|32 | --gist-tokens 8|32|64] [--epochs 1..5] [--learning-rate <rate>] [--batch-size 8|16|32|64] [--max-sequence-length <tokens>] [--json]
299
+ toloka training cost <name-or-id> [--idempotency-key <key>] [--json]
300
+ toloka training run <name-or-id> [--estimate-file <path>] [--version-name <name>] [--idempotency-key <key>] [--json]
301
+ toloka training runs <name-or-id> [--json]
302
+ toloka training status <training-run-id> [--json]
303
+ toloka training resume <training-run-id> [--json]
304
+ toloka training cancel <training-run-id> [--json]
305
+ toloka training logs <training-run-id>
306
+ toloka training metrics <training-run-id> [--key <metric>] [--resolution <n>] [--json]
307
+ ```
308
+
309
+ Hyperparameters are optional flags on `training create` and `training update`: `--epochs 1..5` (default 3), `--learning-rate` (SFT 0.00001–0.001, default 0.00015; gisting 0.001–0.3, default 0.03), `--batch-size 8|16|32|64` (default 8; sequences per optimizer step across all GPUs) and `--max-sequence-length 64..16384` (default 12288 for SFT, 3072 for gisting) apply to both methods; `--lora-rank 8|16|32` (default 16) is SFT-only and `--gist-tokens 8|32|64` (default 32) is gisting-only — passing one to the other method fails before any request. `--regime` and `--eval-steps` no longer exist. `training update` has no `--method` flag: the method stays as created, and every flag you omit keeps its current value. `training cost` is blocked when the longest example exceeds `--max-sequence-length` or when the training selection leaves fewer rows than `--batch-size` after the 10% holdout. `training get` prints the resolved recipe, so omitted flags are visible as their defaults.
310
+
271
311
  ## dataset
272
312
 
273
313
  Catalog and row commands for datasets in the selected project. Name or id is accepted; duplicate names must be addressed by id.
274
314
 
275
315
  ```sh
276
316
  toloka dataset list
317
+ toloka dataset create <name>
277
318
  toloka dataset fields <name>
278
319
  toloka dataset load <name> --out <file> [--limit <n>] [--timeout <ms>]
279
320
  toloka dataset upload <name> <file>
@@ -281,6 +322,8 @@ toloka dataset upload <name> <file>
281
322
 
282
323
  `dataset list` prints live `name` and id. It does not page items.
283
324
 
325
+ `dataset create` makes an empty dataset in the selected project; the first `dataset upload` infers its columns from the rows.
326
+
284
327
  `dataset fields` prints inferred `field()` TypeScript, or `Dataset <name> has no inferred fields yet.`
285
328
 
286
329
  `dataset load` starts a platform export, waits for it (default 60s; pass `--timeout`), downloads the JSON array, and writes JSONL to `--out`. `--limit` slices after download; it still waits for the full export. On timeout the message names the export id. Failed downloads and invalid payloads leave `--out` untouched.
@@ -313,12 +356,14 @@ toloka skill install <skillId> [--force]
313
356
 
314
357
  `list` prints every skill in the catalog with its installation status: `not-installed` when `.agents/skills/<skillId>` is absent, `current` when the installed files match the catalog digest, and `stale` when they differ. Each skill line (`id`, status, name) is followed by one indented description line. `--json` prints the Skill Descriptors (`id`, `name`, `description`, `tags`, `version`, `digest`, `files`) plus `status` and never includes file contents.
315
358
 
316
- `search` matches `<query>` case-insensitively against each skill's id, name, description, and tags and prints the matches in the same format. When nothing matches it says so (or prints `[]` with `--json`), exits 0, and installs nothing.
359
+ `search` matches `<query>` case-insensitively against each skill's id, name, description, and tags and prints the matches in the same format. When nothing matches it prints `No skills match "<query>" in the catalog bundled with @toloka-platform/sdk <version>. …` (or `[]` with `--json`), exits 0, and installs nothing.
317
360
 
318
361
  `install` copies the complete skill — its `SKILL.md` entry point and every reference — from the package into `.agents/skills/<skillId>/` under the project root and prints the destination. Every path is confined to that directory and the command refuses to write through symbolic links. An existing `.agents/skills/<skillId>` is refused unless `--force` is passed. With `--force` the new copy is written to a temporary sibling directory and verified against the catalog digest, the existing directory is renamed to a backup, the verified copy is moved into place, and the backup is removed; a failed swap restores the backup, so the directory never holds a mixed version. A malformed catalog, an unsafe path, or a digest mismatch fails before any existing file changes.
319
362
 
320
363
  After an SDK upgrade `list` reports installed skills whose catalog digest changed as `stale` until they are refreshed with `install --force`. Local edits to an installed skill also make it `stale`; `list` and `search` never modify local files.
321
364
 
365
+ The catalog is bound to the installed package version, so a skill that a newer release ships is simply absent from an older CLI. `install` then exits 1 with `Skill "<skillId>" is not in the catalog bundled with @toloka-platform/sdk <version>. Run toloka skill list to see the available skills; a newer release may ship it (bun add --global @toloka-platform/sdk@<channel>).` and creates nothing. `<channel>` is the channel of the installed version (`preview` for a `-preview.N` version, otherwise `latest`); reinstall from it and retry.
366
+
322
367
  ## Exit codes
323
368
 
324
369
  `toloka pipeline run --wait` maps the run outcome to the process exit code.
@@ -331,6 +376,8 @@ After an SDK upgrade `list` reports installed skills whose catalog digest change
331
376
 
332
377
  Every other failure exits non-zero with a message on stderr: missing project identity, a rejected login, an unauthenticated `auth-status`, or a failed `secret set`.
333
378
 
379
+ An unknown command exits 1 before anything else runs, even when `--help` is present: `toloka training --help` on a build without `training` prints `error: unknown command 'training'` followed by `toloka <version> does not have it. Run toloka --help to list its commands; a runbook that uses it may need a newer release.` on stderr, and does not print the root help. Only a command the installed version defines exits 0 with `--help`.
380
+
334
381
  ## The reconcile loop
335
382
 
336
383
  Treat the TypeScript source as authoritative. The canonical sequence is: run the complete local gate, validate against the platform, plan, apply, then plan again to confirm convergence.
@@ -11,7 +11,7 @@ curl -fsSL https://platform.toloka.ai/cli/install.sh | sh
11
11
  bun add @toloka-platform/sdk@latest
12
12
  ```
13
13
 
14
- The installer requires Bun 1.4.0, installs `@toloka-platform/sdk` globally, and exposes `toloka` through Bun's global binary directory. The published CLI includes matching precompiled bytecode. The project install makes SDK imports resolvable.
14
+ The installer requires Bun 1.4.0 or newer, installs `@toloka-platform/sdk` globally, and exposes `toloka` through Bun's global binary directory. The published CLI includes bytecode built with Bun 1.4.0; another Bun version runs the same bundled JavaScript without that cache and starts slower. The project install makes SDK imports resolvable.
15
15
 
16
16
  ## Sign in
17
17
 
@@ -33,11 +33,11 @@ Check what the CLI will use at any time:
33
33
  toloka whoami
34
34
  ```
35
35
 
36
- CI does not need `login`. Set `POTATO_API_KEY` and the stored file is ignored. See the precedence table in the [CLI reference](./cli.md).
36
+ CI does not need `login`. Set `TOLOKA_API_KEY` and the stored file is ignored. See the precedence table in the [CLI reference](./cli.md).
37
37
 
38
38
  ## Start with an agent
39
39
 
40
- For a guided first run, start a fresh coding-agent session and ask it to follow `https://platform.toloka.ai/agents/data-labeling.md`. The guide takes the agent through installation, credentials, project selection, local tests, plan approval, apply, cost review, and a bounded sample run.
40
+ For a guided first run, start a fresh coding-agent session and ask it to follow the [Toloka agent bootstrap](https://platform.toloka.ai/agents/SKILL.md). It routes to the data-labeling, fine-tuning, or gisting runbook and the matching packaged skill.
41
41
 
42
42
  Initialize the current directory and install the Agent Bootstrap. No platform project needs to be selected yet.
43
43
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  What this Beta SDK does not do yet, stated plainly so you can decide what to depend on.
4
4
 
5
- `@toloka-platform/sdk` is `0.2.0-preview.2`. This is a Beta: the authoring API, the CLI surface, and the generated source layout can change before general availability. Pin an exact version. Do not depend on this in production yet.
5
+ `@toloka-platform/sdk` is `0.2.0-preview.3`. This is a Beta: the authoring API, the CLI surface, and the generated source layout can change before general availability. Pin an exact version. Do not depend on this in production yet.
6
6
 
7
7
  ## Local checks do not certify deployability
8
8
 
package/docs/testing.md CHANGED
@@ -94,7 +94,7 @@ For a structured or array-valued Field, derive the dataset field schema from the
94
94
 
95
95
  ## Runtime rules
96
96
 
97
- `ui.code` must parse as one JSX root. Every identifier must be a component returned by `componentDocumentation()` or a documented `actions` API. `toloka check` applies full TypeScript semantic checking with declarations bundled in the SDK; the real launcher then renders the same JSX in browser scenarios. Treat a component's `propsType` and `example` together as its contract.
97
+ `ui.code` must parse as one TSX root. Every identifier must be a component returned by `componentDocumentation()` or a documented `actions` API. `toloka check` applies full TypeScript semantic checking with declarations bundled in the SDK; the real launcher then renders the same TSX in browser scenarios. Treat a component's `propsType` and `example` together as its contract.
98
98
 
99
99
  `preprocess` and `postprocess` are JavaScript function bodies, not TypeScript:
100
100
 
@@ -92,7 +92,7 @@ toloka pipeline results <runId> --failed
92
92
  Missing API key. Run toloka login once to store credentials for this machine.
93
93
  ```
94
94
 
95
- Run `toloka login`, or set `POTATO_API_KEY` in an environment where interactive login is not possible. `toloka whoami` reports which platform and which key source is in effect, and exits non-zero when the platform is unreachable.
95
+ Run `toloka login`. Where interactive login is not possible, pipe the key to `toloka login --api-key-stdin` or set `TOLOKA_API_KEY`. `toloka whoami` reports which platform and which key source is in effect, and exits non-zero when the platform is unreachable.
96
96
 
97
97
  ## Authentication fails with a key you just generated
98
98
 
@@ -11,8 +11,8 @@ toloka init
11
11
  Then configure the API and import an existing project:
12
12
 
13
13
  ```sh
14
- export POTATO_API_KEY=api-key
15
- export POTATO_BASE_URL=https://potato.example.com
14
+ export TOLOKA_API_KEY=api-key
15
+ export TOLOKA_BASE_URL=https://potato.example.com
16
16
  toloka import pp.0190abcd-abcd-7abc-8abc-abcdefabcdef
17
17
  # Imported project pp.0190abcd-abcd-7abc-8abc-abcdefabcdef with 1 pipeline and 1 dataset into ...
18
18
  ```
@@ -30,12 +30,14 @@ import type {
30
30
  ExportPipeline200,
31
31
  GetDatasetInferredFields200,
32
32
  GetTrainingRunLogsParams,
33
+ GetTrainingRunMetricHistoryParams,
33
34
  ImportPipelineBody,
34
35
  ListBaseModels200,
35
36
  ListDatasetFields200,
36
37
  ListDatasetFieldsParams,
37
38
  ListDatasetItems200,
38
39
  ListDatasetItemsParams,
40
+ ListDeliveryOrders200,
39
41
  ListModelVersions200,
40
42
  ListModelVersionsParams,
41
43
  ListPipelineChecks200,
@@ -93,6 +95,8 @@ import type {
93
95
  TrainingRun,
94
96
  TrainingRunId,
95
97
  TrainingRunLogs,
98
+ TrainingRunMetricHistory,
99
+ TrainingRunMetrics,
96
100
  UpdatePipelineBody,
97
101
  UpdateProjectBody,
98
102
  UpdateTrainingMetadataBody,
@@ -587,6 +591,59 @@ export const getTrainingRunLogs = async (trainingRunId: TrainingRunId,
587
591
 
588
592
 
589
593
 
594
+ export const getGetTrainingRunMetricsUrl = (trainingRunId: TrainingRunId,) => {
595
+
596
+
597
+
598
+
599
+ return `/api/v2-beta/training-runs/${trainingRunId}/metrics`
600
+ }
601
+
602
+ export const getTrainingRunMetrics = async (trainingRunId: TrainingRunId, options?: RequestInit): Promise<TrainingRunMetrics> => {
603
+
604
+ return potatoFetch<TrainingRunMetrics>(getGetTrainingRunMetricsUrl(trainingRunId),
605
+ {
606
+ ...options,
607
+ method: 'GET'
608
+
609
+
610
+ }
611
+ );}
612
+
613
+
614
+
615
+ export const getGetTrainingRunMetricHistoryUrl = (trainingRunId: TrainingRunId,
616
+ metricKey: string,
617
+ params?: GetTrainingRunMetricHistoryParams,) => {
618
+ const normalizedParams = new URLSearchParams();
619
+
620
+ Object.entries(params || {}).forEach(([key, value]) => {
621
+
622
+ if (value !== undefined) {
623
+ normalizedParams.append(key, value === null ? 'null' : value.toString())
624
+ }
625
+ });
626
+
627
+ const stringifiedParams = normalizedParams.toString();
628
+
629
+ return stringifiedParams.length > 0 ? `/api/v2-beta/training-runs/${trainingRunId}/metrics/${metricKey}?${stringifiedParams}` : `/api/v2-beta/training-runs/${trainingRunId}/metrics/${metricKey}`
630
+ }
631
+
632
+ export const getTrainingRunMetricHistory = async (trainingRunId: TrainingRunId,
633
+ metricKey: string,
634
+ params?: GetTrainingRunMetricHistoryParams, options?: RequestInit): Promise<TrainingRunMetricHistory> => {
635
+
636
+ return potatoFetch<TrainingRunMetricHistory>(getGetTrainingRunMetricHistoryUrl(trainingRunId,metricKey,params),
637
+ {
638
+ ...options,
639
+ method: 'GET'
640
+
641
+
642
+ }
643
+ );}
644
+
645
+
646
+
590
647
  export const getResumeTrainingRunUrl = (trainingRunId: TrainingRunId,) => {
591
648
 
592
649
 
@@ -650,6 +707,27 @@ export const getCurrentUser = async ( options?: RequestInit): Promise<CurrentUse
650
707
 
651
708
 
652
709
 
710
+ export const getListDeliveryOrdersUrl = () => {
711
+
712
+
713
+
714
+
715
+ return `/api/v2-beta/delivery-orders`
716
+ }
717
+
718
+ export const listDeliveryOrders = async ( options?: RequestInit): Promise<ListDeliveryOrders200> => {
719
+
720
+ return potatoFetch<ListDeliveryOrders200>(getListDeliveryOrdersUrl(),
721
+ {
722
+ ...options,
723
+ method: 'GET'
724
+
725
+
726
+ }
727
+ );}
728
+
729
+
730
+
653
731
  export const getListProjectsUrl = (params?: ListProjectsParams,) => {
654
732
  const normalizedParams = new URLSearchParams();
655
733
 
@@ -6,4 +6,5 @@ export interface BaseModel {
6
6
  provider: string;
7
7
  upstreamModel: string;
8
8
  upstreamRevision: string;
9
+ upstreamUrl: string;
9
10
  }
@@ -3,5 +3,6 @@ import type { CheckReportAnyOfSix } from './checkReportAnyOfSix';
3
3
  import type { CheckReportAnyOfOnezero } from './checkReportAnyOfOnezero';
4
4
  import type { CheckReportAnyOfTwoone } from './checkReportAnyOfTwoone';
5
5
  import type { CheckReportAnyOfTwofive } from './checkReportAnyOfTwofive';
6
+ import type { CheckReportAnyOfTwoseven } from './checkReportAnyOfTwoseven';
6
7
 
7
- export type CheckReport = CheckReportAnyOf | CheckReportAnyOfSix | CheckReportAnyOfOnezero | CheckReportAnyOfTwoone | CheckReportAnyOfTwofive;
8
+ export type CheckReport = CheckReportAnyOf | CheckReportAnyOfSix | CheckReportAnyOfOnezero | CheckReportAnyOfTwoone | CheckReportAnyOfTwofive | CheckReportAnyOfTwoseven;
@@ -0,0 +1,5 @@
1
+ import type { CheckReportAnyOfTwosevenResultsItem } from './checkReportAnyOfTwosevenResultsItem';
2
+
3
+ export type CheckReportAnyOfTwoseven = {
4
+ results: CheckReportAnyOfTwosevenResultsItem[];
5
+ };
@@ -0,0 +1,6 @@
1
+ import type { CheckReportAnyOfTwosevenResultsItemVerdict } from './checkReportAnyOfTwosevenResultsItemVerdict';
2
+
3
+ export type CheckReportAnyOfTwosevenResultsItem = {
4
+ criterionId: string;
5
+ verdict: CheckReportAnyOfTwosevenResultsItemVerdict;
6
+ };
@@ -0,0 +1,2 @@
1
+
2
+ export type CheckReportAnyOfTwosevenResultsItemVerdict = 'pass' | 'fail' | 'unable_to_process' | 'incorrect_data' | 'jsonpath_error' | 'error' | 'skipped';
@@ -1,6 +1,9 @@
1
1
  import type { CurrentUserEmail } from './currentUserEmail';
2
+ import type { CurrentUserTeamsItem } from './currentUserTeamsItem';
2
3
 
3
4
  export interface CurrentUser {
4
5
  id: string;
5
6
  email: CurrentUserEmail;
7
+ internal: boolean;
8
+ teams: CurrentUserTeamsItem[];
6
9
  }
@@ -0,0 +1,6 @@
1
+
2
+ export type CurrentUserTeamsItem = {
3
+ id: string;
4
+ writable: boolean;
5
+ internal: boolean;
6
+ };
@@ -0,0 +1,9 @@
1
+ import type { DeliveryOrderClientName } from './deliveryOrderClientName';
2
+
3
+ export interface DeliveryOrder {
4
+ id: string;
5
+ name: string;
6
+ mondayId: string;
7
+ status: string;
8
+ clientName: DeliveryOrderClientName;
9
+ }
@@ -0,0 +1,2 @@
1
+
2
+ export type DeliveryOrderClientName = string | null;
@@ -0,0 +1,4 @@
1
+
2
+ export type GetTrainingRunMetricHistoryParams = {
3
+ resolution?: number;
4
+ };
@@ -1,6 +1,7 @@
1
1
  import type { TrainingModelSource } from './trainingModelSource';
2
2
  import type { TrainingDatasetSelection } from './trainingDatasetSelection';
3
- import type { GistingTrainingConfigurationRegime } from './gistingTrainingConfigurationRegime';
3
+ import type { GistingTrainingConfigurationGistTokens } from './gistingTrainingConfigurationGistTokens';
4
+ import type { GistingTrainingConfigurationBatchSize } from './gistingTrainingConfigurationBatchSize';
4
5
 
5
6
  export interface GistingTrainingConfiguration {
6
7
  method: 'gisting';
@@ -8,6 +9,9 @@ export interface GistingTrainingConfiguration {
8
9
  training: TrainingDatasetSelection;
9
10
  validation?: TrainingDatasetSelection;
10
11
  promptFileId: string;
11
- regime: GistingTrainingConfigurationRegime;
12
+ gistTokens: GistingTrainingConfigurationGistTokens;
12
13
  epochs: number;
14
+ learningRate: number;
15
+ batchSize: GistingTrainingConfigurationBatchSize;
16
+ maxSequenceLength: number;
13
17
  }
@@ -0,0 +1,2 @@
1
+
2
+ export type GistingTrainingConfigurationBatchSize = 8 | 16 | 32 | 64;
@@ -0,0 +1,2 @@
1
+
2
+ export type GistingTrainingConfigurationGistTokens = 8 | 32 | 64;
@@ -1,6 +1,7 @@
1
1
  import type { TrainingModelSource } from './trainingModelSource';
2
2
  import type { TrainingDatasetSelectionInput } from './trainingDatasetSelectionInput';
3
- import type { GistingTrainingConfigurationInputRegime } from './gistingTrainingConfigurationInputRegime';
3
+ import type { GistingTrainingConfigurationInputGistTokens } from './gistingTrainingConfigurationInputGistTokens';
4
+ import type { GistingTrainingConfigurationInputBatchSize } from './gistingTrainingConfigurationInputBatchSize';
4
5
 
5
6
  export interface GistingTrainingConfigurationInput {
6
7
  method: 'gisting';
@@ -8,6 +9,9 @@ export interface GistingTrainingConfigurationInput {
8
9
  training: TrainingDatasetSelectionInput;
9
10
  validation?: TrainingDatasetSelectionInput;
10
11
  promptFileId: string;
11
- regime?: GistingTrainingConfigurationInputRegime;
12
+ gistTokens?: GistingTrainingConfigurationInputGistTokens;
12
13
  epochs?: number;
14
+ learningRate?: number;
15
+ batchSize?: GistingTrainingConfigurationInputBatchSize;
16
+ maxSequenceLength?: number;
13
17
  }
@@ -0,0 +1,2 @@
1
+
2
+ export type GistingTrainingConfigurationInputBatchSize = 8 | 16 | 32 | 64;
@@ -0,0 +1,2 @@
1
+
2
+ export type GistingTrainingConfigurationInputGistTokens = 8 | 32 | 64;