@sedum-dev/provider-typesafe 0.1.0-alpha.21 → 0.1.0-alpha.22
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.d.ts +1 -0
- package/dist/index.js +8 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -136,6 +136,7 @@ declare class TypeSafeAdapter implements Resolver, Judge, TargetChecker, VisionR
|
|
|
136
136
|
probabilities: number[];
|
|
137
137
|
calls: _sedum_dev_core.ProviderCall[];
|
|
138
138
|
chunkCount: number;
|
|
139
|
+
oversized: number[];
|
|
139
140
|
}>;
|
|
140
141
|
classifyBatch(sentences: readonly string[], options?: ProviderCallOptions): Promise<{
|
|
141
142
|
readonly answers: readonly ModelClassification[];
|
package/dist/index.js
CHANGED
|
@@ -503,7 +503,7 @@ function buildRelevanceRequests(diff, tests, model) {
|
|
|
503
503
|
diff,
|
|
504
504
|
tests,
|
|
505
505
|
(text, questions) => ({ model, state: { diff: text }, questions }),
|
|
506
|
-
{ pair: 28e3, batch: 56e3, questions: Infinity }
|
|
506
|
+
{ pair: 28e3, batch: 56e3, questions: Infinity, minDiff: 4096 }
|
|
507
507
|
);
|
|
508
508
|
}
|
|
509
509
|
|
|
@@ -1592,7 +1592,11 @@ var TypeSafeAdapter = class {
|
|
|
1592
1592
|
}
|
|
1593
1593
|
/** Experimental test-impact scoring; one independent Noul per complete test. */
|
|
1594
1594
|
async scoreRelevance(diff, tests, options) {
|
|
1595
|
-
const chunks = buildRelevanceRequests(
|
|
1595
|
+
const { batches: chunks, oversized } = buildRelevanceRequests(
|
|
1596
|
+
diff,
|
|
1597
|
+
tests,
|
|
1598
|
+
this.model
|
|
1599
|
+
);
|
|
1596
1600
|
const probabilities = tests.map(() => 0);
|
|
1597
1601
|
const calls = [];
|
|
1598
1602
|
for (const { request, indexes } of chunks) {
|
|
@@ -1624,7 +1628,8 @@ var TypeSafeAdapter = class {
|
|
|
1624
1628
|
return {
|
|
1625
1629
|
probabilities,
|
|
1626
1630
|
calls,
|
|
1627
|
-
chunkCount: new Set(chunks.map((chunk) => chunk.chunkIndex)).size
|
|
1631
|
+
chunkCount: new Set(chunks.map((chunk) => chunk.chunkIndex)).size,
|
|
1632
|
+
oversized
|
|
1628
1633
|
};
|
|
1629
1634
|
}
|
|
1630
1635
|
async classifyBatch(sentences, options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sedum-dev/provider-typesafe",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.22",
|
|
4
4
|
"repository": "https://github.com/sedum-dev/sedum",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@typesafe-ai/sdk": "0.6.0",
|
|
23
|
-
"@sedum-dev/core": "0.1.0-alpha.
|
|
23
|
+
"@sedum-dev/core": "0.1.0-alpha.22"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsup src/index.ts --format esm --dts --clean --out-dir dist",
|