@antfly/sdk 0.0.10 → 0.0.11
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 +6 -0
- package/dist/index.d.cts +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +6 -0
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -720,6 +720,12 @@ var AntflyClient = class {
|
|
|
720
720
|
callbacks.onFollowUpQuestion(JSON.parse(data));
|
|
721
721
|
}
|
|
722
722
|
break;
|
|
723
|
+
case "eval":
|
|
724
|
+
if (callbacks.onEvalResult) {
|
|
725
|
+
const evalResult = JSON.parse(data);
|
|
726
|
+
callbacks.onEvalResult(evalResult);
|
|
727
|
+
}
|
|
728
|
+
break;
|
|
723
729
|
case "done":
|
|
724
730
|
if (callbacks.onDone) {
|
|
725
731
|
const doneData = JSON.parse(data);
|
package/dist/index.d.cts
CHANGED
|
@@ -1797,6 +1797,15 @@ interface components$1 {
|
|
|
1797
1797
|
* @default true
|
|
1798
1798
|
*/
|
|
1799
1799
|
with_streaming?: boolean;
|
|
1800
|
+
/**
|
|
1801
|
+
* @description Background knowledge that guides the agent's understanding of the domain.
|
|
1802
|
+
* Similar to CLAUDE.md, this provides context that applies to all steps
|
|
1803
|
+
* (classification, retrieval, and answer generation).
|
|
1804
|
+
*
|
|
1805
|
+
* Example: "This is a technical documentation search. Results should be
|
|
1806
|
+
* filtered to only include official documentation, not community posts."
|
|
1807
|
+
*/
|
|
1808
|
+
agent_knowledge?: string;
|
|
1800
1809
|
/**
|
|
1801
1810
|
* @description Filters accumulated from previous conversation turns.
|
|
1802
1811
|
* These are applied to all queries automatically.
|
|
@@ -4273,6 +4282,8 @@ interface components$1 {
|
|
|
4273
4282
|
classification?: components$1["schemas"]["ClassificationStepConfig"];
|
|
4274
4283
|
/** @description Configuration for answer generation */
|
|
4275
4284
|
answer?: components$1["schemas"]["AnswerStepConfig"];
|
|
4285
|
+
/** @description Configuration for confidence scoring */
|
|
4286
|
+
confidence?: components$1["schemas"]["ConfidenceStepConfig"];
|
|
4276
4287
|
/** @description Configuration for tool calling behavior */
|
|
4277
4288
|
tools?: components$1["schemas"]["ChatToolsConfig"];
|
|
4278
4289
|
};
|
|
@@ -6814,6 +6825,12 @@ type FilterSpec = components$1["schemas"]["FilterSpec"];
|
|
|
6814
6825
|
type ClarificationRequest = components$1["schemas"]["ClarificationRequest"];
|
|
6815
6826
|
type WebSearchConfig = components$1["schemas"]["WebSearchConfig"];
|
|
6816
6827
|
type FetchConfig = components$1["schemas"]["FetchConfig"];
|
|
6828
|
+
type EvalConfig = components$1["schemas"]["EvalConfig"];
|
|
6829
|
+
type EvalResult = components$1["schemas"]["EvalResult"];
|
|
6830
|
+
type EvalScores = components$1["schemas"]["EvalScores"];
|
|
6831
|
+
type EvaluatorScore = components$1["schemas"]["EvaluatorScore"];
|
|
6832
|
+
type EvalSummary = components$1["schemas"]["EvalSummary"];
|
|
6833
|
+
type EvaluatorName = components$1["schemas"]["EvaluatorName"];
|
|
6817
6834
|
type AntflyError = components$1["schemas"]["Error"];
|
|
6818
6835
|
type ResponseData<T extends keyof operations> = operations[T]["responses"] extends {
|
|
6819
6836
|
200: infer R;
|
|
@@ -6867,6 +6884,7 @@ interface AnswerAgentStreamCallbacks {
|
|
|
6867
6884
|
onAnswer?: (chunk: string) => void;
|
|
6868
6885
|
onConfidence?: (data: AnswerConfidence) => void;
|
|
6869
6886
|
onFollowUpQuestion?: (question: string) => void;
|
|
6887
|
+
onEvalResult?: (data: EvalResult) => void;
|
|
6870
6888
|
onDone?: (data?: {
|
|
6871
6889
|
complete: boolean;
|
|
6872
6890
|
}) => void;
|
|
@@ -7465,4 +7483,4 @@ declare function geoBoundingBox(field: string, bounds: {
|
|
|
7465
7483
|
* ```
|
|
7466
7484
|
*/
|
|
7467
7485
|
|
|
7468
|
-
export { type AnswerAgentRequest, type AnswerAgentResult, type AnswerAgentStreamCallbacks, type AnswerConfidence, AntflyClient, type AntflyConfig, type AntflyError, type AntflyType, type BackupRequest, type BatchRequest, type ChatAgentRequest, type ChatAgentResult, type ChatAgentSteps, type ChatAgentStreamCallbacks, type ChatMessage, type ChatMessageRole, type ChatToolCall, type ChatToolName, type ChatToolResult, type ChatToolsConfig, type ClarificationRequest, type ClassificationTransformationResult, type CreateTableRequest, type CreateUserRequest, type DocumentSchema, type EmbedderConfig, type EmbedderProvider, type FacetOption, type FacetResult, type FetchConfig, type FilterSpec, type GenerateResult, type GeneratorConfig, type GeneratorProvider, type IndexConfig, type IndexStatus, type Permission, type PermissionType, type QueryBuilderRequest, type QueryBuilderResult, type QueryHit, type QueryOptions, type QueryRequest, type QueryResponses, type QueryResult, type QueryStrategy, type RAGRequest, type RAGResult, type RAGStreamCallbacks, type RerankerConfig, type ResourceType, type ResponseData, type RestoreRequest, type RouteType, type SemanticQueryMode, type Table, type TableSchema, type TableStatus, type TermFacetResult, type UpdatePasswordRequest, type User, type WebSearchConfig, type WebSearchResultItem, type components as bleve_components, boolean, type components$1 as components, conjunction, dateRange, AntflyClient as default, disjunction, docIds, embedderProviders, fuzzy, generatorProviders, geoBoundingBox, geoDistance, match, matchAll, matchNone, matchPhrase, numericRange, type operations, type paths, prefix, queryString, term };
|
|
7486
|
+
export { type AnswerAgentRequest, type AnswerAgentResult, type AnswerAgentStreamCallbacks, type AnswerConfidence, AntflyClient, type AntflyConfig, type AntflyError, type AntflyType, type BackupRequest, type BatchRequest, type ChatAgentRequest, type ChatAgentResult, type ChatAgentSteps, type ChatAgentStreamCallbacks, type ChatMessage, type ChatMessageRole, type ChatToolCall, type ChatToolName, type ChatToolResult, type ChatToolsConfig, type ClarificationRequest, type ClassificationTransformationResult, type CreateTableRequest, type CreateUserRequest, type DocumentSchema, type EmbedderConfig, type EmbedderProvider, type EvalConfig, type EvalResult, type EvalScores, type EvalSummary, type EvaluatorName, type EvaluatorScore, type FacetOption, type FacetResult, type FetchConfig, type FilterSpec, type GenerateResult, type GeneratorConfig, type GeneratorProvider, type IndexConfig, type IndexStatus, type Permission, type PermissionType, type QueryBuilderRequest, type QueryBuilderResult, type QueryHit, type QueryOptions, type QueryRequest, type QueryResponses, type QueryResult, type QueryStrategy, type RAGRequest, type RAGResult, type RAGStreamCallbacks, type RerankerConfig, type ResourceType, type ResponseData, type RestoreRequest, type RouteType, type SemanticQueryMode, type Table, type TableSchema, type TableStatus, type TermFacetResult, type UpdatePasswordRequest, type User, type WebSearchConfig, type WebSearchResultItem, type components as bleve_components, boolean, type components$1 as components, conjunction, dateRange, AntflyClient as default, disjunction, docIds, embedderProviders, fuzzy, generatorProviders, geoBoundingBox, geoDistance, match, matchAll, matchNone, matchPhrase, numericRange, type operations, type paths, prefix, queryString, term };
|
package/dist/index.d.ts
CHANGED
|
@@ -1797,6 +1797,15 @@ interface components$1 {
|
|
|
1797
1797
|
* @default true
|
|
1798
1798
|
*/
|
|
1799
1799
|
with_streaming?: boolean;
|
|
1800
|
+
/**
|
|
1801
|
+
* @description Background knowledge that guides the agent's understanding of the domain.
|
|
1802
|
+
* Similar to CLAUDE.md, this provides context that applies to all steps
|
|
1803
|
+
* (classification, retrieval, and answer generation).
|
|
1804
|
+
*
|
|
1805
|
+
* Example: "This is a technical documentation search. Results should be
|
|
1806
|
+
* filtered to only include official documentation, not community posts."
|
|
1807
|
+
*/
|
|
1808
|
+
agent_knowledge?: string;
|
|
1800
1809
|
/**
|
|
1801
1810
|
* @description Filters accumulated from previous conversation turns.
|
|
1802
1811
|
* These are applied to all queries automatically.
|
|
@@ -4273,6 +4282,8 @@ interface components$1 {
|
|
|
4273
4282
|
classification?: components$1["schemas"]["ClassificationStepConfig"];
|
|
4274
4283
|
/** @description Configuration for answer generation */
|
|
4275
4284
|
answer?: components$1["schemas"]["AnswerStepConfig"];
|
|
4285
|
+
/** @description Configuration for confidence scoring */
|
|
4286
|
+
confidence?: components$1["schemas"]["ConfidenceStepConfig"];
|
|
4276
4287
|
/** @description Configuration for tool calling behavior */
|
|
4277
4288
|
tools?: components$1["schemas"]["ChatToolsConfig"];
|
|
4278
4289
|
};
|
|
@@ -6814,6 +6825,12 @@ type FilterSpec = components$1["schemas"]["FilterSpec"];
|
|
|
6814
6825
|
type ClarificationRequest = components$1["schemas"]["ClarificationRequest"];
|
|
6815
6826
|
type WebSearchConfig = components$1["schemas"]["WebSearchConfig"];
|
|
6816
6827
|
type FetchConfig = components$1["schemas"]["FetchConfig"];
|
|
6828
|
+
type EvalConfig = components$1["schemas"]["EvalConfig"];
|
|
6829
|
+
type EvalResult = components$1["schemas"]["EvalResult"];
|
|
6830
|
+
type EvalScores = components$1["schemas"]["EvalScores"];
|
|
6831
|
+
type EvaluatorScore = components$1["schemas"]["EvaluatorScore"];
|
|
6832
|
+
type EvalSummary = components$1["schemas"]["EvalSummary"];
|
|
6833
|
+
type EvaluatorName = components$1["schemas"]["EvaluatorName"];
|
|
6817
6834
|
type AntflyError = components$1["schemas"]["Error"];
|
|
6818
6835
|
type ResponseData<T extends keyof operations> = operations[T]["responses"] extends {
|
|
6819
6836
|
200: infer R;
|
|
@@ -6867,6 +6884,7 @@ interface AnswerAgentStreamCallbacks {
|
|
|
6867
6884
|
onAnswer?: (chunk: string) => void;
|
|
6868
6885
|
onConfidence?: (data: AnswerConfidence) => void;
|
|
6869
6886
|
onFollowUpQuestion?: (question: string) => void;
|
|
6887
|
+
onEvalResult?: (data: EvalResult) => void;
|
|
6870
6888
|
onDone?: (data?: {
|
|
6871
6889
|
complete: boolean;
|
|
6872
6890
|
}) => void;
|
|
@@ -7465,4 +7483,4 @@ declare function geoBoundingBox(field: string, bounds: {
|
|
|
7465
7483
|
* ```
|
|
7466
7484
|
*/
|
|
7467
7485
|
|
|
7468
|
-
export { type AnswerAgentRequest, type AnswerAgentResult, type AnswerAgentStreamCallbacks, type AnswerConfidence, AntflyClient, type AntflyConfig, type AntflyError, type AntflyType, type BackupRequest, type BatchRequest, type ChatAgentRequest, type ChatAgentResult, type ChatAgentSteps, type ChatAgentStreamCallbacks, type ChatMessage, type ChatMessageRole, type ChatToolCall, type ChatToolName, type ChatToolResult, type ChatToolsConfig, type ClarificationRequest, type ClassificationTransformationResult, type CreateTableRequest, type CreateUserRequest, type DocumentSchema, type EmbedderConfig, type EmbedderProvider, type FacetOption, type FacetResult, type FetchConfig, type FilterSpec, type GenerateResult, type GeneratorConfig, type GeneratorProvider, type IndexConfig, type IndexStatus, type Permission, type PermissionType, type QueryBuilderRequest, type QueryBuilderResult, type QueryHit, type QueryOptions, type QueryRequest, type QueryResponses, type QueryResult, type QueryStrategy, type RAGRequest, type RAGResult, type RAGStreamCallbacks, type RerankerConfig, type ResourceType, type ResponseData, type RestoreRequest, type RouteType, type SemanticQueryMode, type Table, type TableSchema, type TableStatus, type TermFacetResult, type UpdatePasswordRequest, type User, type WebSearchConfig, type WebSearchResultItem, type components as bleve_components, boolean, type components$1 as components, conjunction, dateRange, AntflyClient as default, disjunction, docIds, embedderProviders, fuzzy, generatorProviders, geoBoundingBox, geoDistance, match, matchAll, matchNone, matchPhrase, numericRange, type operations, type paths, prefix, queryString, term };
|
|
7486
|
+
export { type AnswerAgentRequest, type AnswerAgentResult, type AnswerAgentStreamCallbacks, type AnswerConfidence, AntflyClient, type AntflyConfig, type AntflyError, type AntflyType, type BackupRequest, type BatchRequest, type ChatAgentRequest, type ChatAgentResult, type ChatAgentSteps, type ChatAgentStreamCallbacks, type ChatMessage, type ChatMessageRole, type ChatToolCall, type ChatToolName, type ChatToolResult, type ChatToolsConfig, type ClarificationRequest, type ClassificationTransformationResult, type CreateTableRequest, type CreateUserRequest, type DocumentSchema, type EmbedderConfig, type EmbedderProvider, type EvalConfig, type EvalResult, type EvalScores, type EvalSummary, type EvaluatorName, type EvaluatorScore, type FacetOption, type FacetResult, type FetchConfig, type FilterSpec, type GenerateResult, type GeneratorConfig, type GeneratorProvider, type IndexConfig, type IndexStatus, type Permission, type PermissionType, type QueryBuilderRequest, type QueryBuilderResult, type QueryHit, type QueryOptions, type QueryRequest, type QueryResponses, type QueryResult, type QueryStrategy, type RAGRequest, type RAGResult, type RAGStreamCallbacks, type RerankerConfig, type ResourceType, type ResponseData, type RestoreRequest, type RouteType, type SemanticQueryMode, type Table, type TableSchema, type TableStatus, type TermFacetResult, type UpdatePasswordRequest, type User, type WebSearchConfig, type WebSearchResultItem, type components as bleve_components, boolean, type components$1 as components, conjunction, dateRange, AntflyClient as default, disjunction, docIds, embedderProviders, fuzzy, generatorProviders, geoBoundingBox, geoDistance, match, matchAll, matchNone, matchPhrase, numericRange, type operations, type paths, prefix, queryString, term };
|
package/dist/index.js
CHANGED
|
@@ -665,6 +665,12 @@ var AntflyClient = class {
|
|
|
665
665
|
callbacks.onFollowUpQuestion(JSON.parse(data));
|
|
666
666
|
}
|
|
667
667
|
break;
|
|
668
|
+
case "eval":
|
|
669
|
+
if (callbacks.onEvalResult) {
|
|
670
|
+
const evalResult = JSON.parse(data);
|
|
671
|
+
callbacks.onEvalResult(evalResult);
|
|
672
|
+
}
|
|
673
|
+
break;
|
|
668
674
|
case "done":
|
|
669
675
|
if (callbacks.onDone) {
|
|
670
676
|
const doneData = JSON.parse(data);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antfly/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "TypeScript SDK for Antfly API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://github.com/antflydb/antfly-ts/tree/main/packages/sdk#readme",
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@types/node": "^25.0.
|
|
44
|
-
"@vitest/ui": "^4.0.
|
|
43
|
+
"@types/node": "^25.0.3",
|
|
44
|
+
"@vitest/ui": "^4.0.16",
|
|
45
45
|
"openapi-typescript": "^7.10.1",
|
|
46
46
|
"tsup": "^8.5.1",
|
|
47
47
|
"tsx": "^4.21.0",
|
|
48
|
-
"vitest": "^4.0.
|
|
48
|
+
"vitest": "^4.0.16"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"openapi-fetch": "^0.15.0"
|