@naturali/sdk 0.292.3 → 0.293.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/dist/index.cjs +8 -2
- package/dist/index.d.cts +45 -35
- package/dist/index.d.mts +45 -35
- package/dist/index.mjs +8 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2646,9 +2646,15 @@ var Documents = class {
|
|
|
2646
2646
|
* Parses an already-uploaded file and creates one Document split into one or
|
|
2647
2647
|
* more embedded chunks. The source format is detected from the file's content
|
|
2648
2648
|
* type: PDFs are parsed page-by-page; `text/plain` and `text/markdown` files
|
|
2649
|
-
* are read as a single source.
|
|
2649
|
+
* are read as a single source. Any other type (`image*`, `audio*`, …) is
|
|
2650
|
+
* converted to text by the tool of the project's matching ingestion rule
|
|
2651
|
+
* (`POST /ingestion-rules`); with no matching rule it is refused with
|
|
2652
|
+
* `400 UNSUPPORTED_FILE_TYPE`. How the source is chunked is controlled by
|
|
2650
2653
|
* `chunk_strategy`.
|
|
2651
2654
|
*
|
|
2655
|
+
* Ingestion produces text for retrieval. For a model to read the original
|
|
2656
|
+
* file, send it as a `file` part of a generation instead.
|
|
2657
|
+
*
|
|
2652
2658
|
* A file can only back one Document — a second call with the same `file_id`
|
|
2653
2659
|
* returns `409 FILE_ALREADY_INGESTED`. To re-process an already-ingested file
|
|
2654
2660
|
* (e.g. with a different `chunk_strategy`), use
|
|
@@ -3074,7 +3080,7 @@ var Evaluations = class {
|
|
|
3074
3080
|
*
|
|
3075
3081
|
* Binds an agent under test to a dataset and a list of scorers. The agent and the dataset must belong to the same project as the eval; a cross-project reference is rejected with 400.
|
|
3076
3082
|
*
|
|
3077
|
-
* Scorer config is frozen here rather than read from the agent at run time, so two runs of the same eval are always judged by the same criteria and their comparison measures the agent instead of the config drifting underneath it.
|
|
3083
|
+
* Scorer config is frozen here rather than read from the agent at run time, so two runs of the same eval are always judged by the same criteria and their comparison measures the agent instead of the config drifting underneath it. Every scorer carries a `name`, unique within the eval.
|
|
3078
3084
|
*/
|
|
3079
3085
|
static createEval(options) {
|
|
3080
3086
|
return (options.client ?? client).post({
|