@alquimia-ai/tools 1.2.0 → 1.3.0
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/providers/index.d.mts +12 -5
- package/dist/providers/index.d.ts +12 -5
- package/dist/providers/index.js +16 -9
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/index.mjs +16 -9
- package/dist/providers/index.mjs.map +1 -1
- package/dist/types/index.d.mts +13 -1
- package/dist/types/index.d.ts +13 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/types/index.d.mts
CHANGED
|
@@ -116,5 +116,17 @@ interface DocumentSearchResult {
|
|
|
116
116
|
};
|
|
117
117
|
score: number;
|
|
118
118
|
}
|
|
119
|
+
type ElevenLabsVoiceSettings = {
|
|
120
|
+
stability: number;
|
|
121
|
+
similarity_boost: number;
|
|
122
|
+
style: number;
|
|
123
|
+
};
|
|
124
|
+
type ElevenLabsRequestSpecs = {
|
|
125
|
+
optimize_streaming_latency: string;
|
|
126
|
+
output_format: string;
|
|
127
|
+
model_id: string;
|
|
128
|
+
language: string;
|
|
129
|
+
voice_settings: ElevenLabsVoiceSettings;
|
|
130
|
+
};
|
|
119
131
|
|
|
120
|
-
export { type AIMessageChunk, type AIMessageChunkData, type ActionResponse, type AlquimiaMessage, type ApiError, type ApmSpan, type BaseAPIConfig, type ConversationsMap, type DocumentSearchResult, type IToolSpec, type ITooler, type RatingData, ToolFactory, type ToolSummary, type Tooler };
|
|
132
|
+
export { type AIMessageChunk, type AIMessageChunkData, type ActionResponse, type AlquimiaMessage, type ApiError, type ApmSpan, type BaseAPIConfig, type ConversationsMap, type DocumentSearchResult, type ElevenLabsRequestSpecs, type ElevenLabsVoiceSettings, type IToolSpec, type ITooler, type RatingData, ToolFactory, type ToolSummary, type Tooler };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -116,5 +116,17 @@ interface DocumentSearchResult {
|
|
|
116
116
|
};
|
|
117
117
|
score: number;
|
|
118
118
|
}
|
|
119
|
+
type ElevenLabsVoiceSettings = {
|
|
120
|
+
stability: number;
|
|
121
|
+
similarity_boost: number;
|
|
122
|
+
style: number;
|
|
123
|
+
};
|
|
124
|
+
type ElevenLabsRequestSpecs = {
|
|
125
|
+
optimize_streaming_latency: string;
|
|
126
|
+
output_format: string;
|
|
127
|
+
model_id: string;
|
|
128
|
+
language: string;
|
|
129
|
+
voice_settings: ElevenLabsVoiceSettings;
|
|
130
|
+
};
|
|
119
131
|
|
|
120
|
-
export { type AIMessageChunk, type AIMessageChunkData, type ActionResponse, type AlquimiaMessage, type ApiError, type ApmSpan, type BaseAPIConfig, type ConversationsMap, type DocumentSearchResult, type IToolSpec, type ITooler, type RatingData, ToolFactory, type ToolSummary, type Tooler };
|
|
132
|
+
export { type AIMessageChunk, type AIMessageChunkData, type ActionResponse, type AlquimiaMessage, type ApiError, type ApmSpan, type BaseAPIConfig, type ConversationsMap, type DocumentSearchResult, type ElevenLabsRequestSpecs, type ElevenLabsVoiceSettings, type IToolSpec, type ITooler, type RatingData, ToolFactory, type ToolSummary, type Tooler };
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/index.ts","../../src/types/type.ts"],"sourcesContent":["export * from './type'","import { Span } from \"@elastic/apm-rum\";\nimport { Message } from \"ai\";\nexport interface ITooler {\n tooler: Array<{\n name: string;\n parameters: Record<string, any>;\n }>;\n}\n\nexport interface IToolSpec {\n name: string;\n parameters: Record<string, any>;\n}\n\nexport abstract class ToolFactory {\n protected toolSpec: IToolSpec | null = null;\n\n constructor(toolSpec: IToolSpec) {\n this.toolSpec = toolSpec;\n }\n\n static createTool(toolSpec: IToolSpec): IToolSpec {\n return toolSpec;\n }\n\n abstract execute(): Promise<any>;\n}\n\nexport interface AIMessageChunk {\n type: string;\n data?: AIMessageChunkData;\n answer?: string;\n tooler?: Tooler;\n error_code?: string;\n error_detail?: string;\n loading?: boolean;\n}\n\nexport interface AIMessageChunkData {\n content: string;\n additional_kwargs?: Record<string, unknown>;\n response_metadata?: Record<string, unknown>;\n type: string;\n name?: string | null;\n id?: string | null;\n example?: boolean;\n tool_calls?: ToolCall[];\n invalid_tool_calls?: InvalidToolCall[];\n usage_metadata?: any;\n tool_call_chunks?: unknown[];\n error_code?: string;\n error_detail?: string;\n}\n\ntype ToolCall = {\n name: string;\n args: Record<string, any>;\n id?: string | null;\n};\n\ntype InvalidToolCall = {\n name: string | null;\n args: string | null;\n id: string | null;\n error: string | null;\n};\n\nexport interface BaseAPIConfig {\n baseUrl: string;\n route: string;\n token?: string;\n headers?: Record<string, string>;\n}\n\nexport interface RatingData {\n assistantId: string;\n sessionId: string;\n topicId: number;\n score?: number;\n description?: string;\n}\n\nexport type AlquimiaMessage = Message & {\n error_code?: string;\n error_detail?: string;\n loading?: boolean;\n created_at?: string;\n additionalInfo?: string;\n tooler?: Tooler;\n};\n\nexport interface ActionResponse<T = void> {\n success: boolean;\n data?: T;\n error?: {\n message: string;\n code?: string;\n details?: any;\n name?: string;\n cause?: string;\n status?: string;\n };\n}\n\nexport type ApmSpan = Span & {\n id?: string \n traceId?: string\n} | undefined\n\nexport type ApiError = Error & {\n message: string;\n name: string;\n cause: string;\n code?: string | number;\n status?: string | number;\n}\n\nexport type Tooler = {\n tool_summary?: ToolSummary;\n tool_output?: Record<string, any>;\n}\n\nexport type ToolSummary = {\n name: string;\n parameters: Record<string, any>;\n}\n\nexport interface ConversationsMap {\n [topicId: string]: string;\n}\n\nexport interface DocumentSearchResult {\n pageContent: string;\n metadata: {\n source: string;\n _id: string;\n _collection_name: string;\n };\n score: number;\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACcO,IAAe,cAAf,MAA2B;AAAA,EAGhC,YAAY,UAAqB;AAFjC,SAAU,WAA6B;AAGrC,SAAK,WAAW;AAAA,EAClB;AAAA,EAEA,OAAO,WAAW,UAAgC;AAChD,WAAO;AAAA,EACT;AAGF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts","../../src/types/type.ts"],"sourcesContent":["export * from './type'","import { Span } from \"@elastic/apm-rum\";\nimport { Message } from \"ai\";\nexport interface ITooler {\n tooler: Array<{\n name: string;\n parameters: Record<string, any>;\n }>;\n}\n\nexport interface IToolSpec {\n name: string;\n parameters: Record<string, any>;\n}\n\nexport abstract class ToolFactory {\n protected toolSpec: IToolSpec | null = null;\n\n constructor(toolSpec: IToolSpec) {\n this.toolSpec = toolSpec;\n }\n\n static createTool(toolSpec: IToolSpec): IToolSpec {\n return toolSpec;\n }\n\n abstract execute(): Promise<any>;\n}\n\nexport interface AIMessageChunk {\n type: string;\n data?: AIMessageChunkData;\n answer?: string;\n tooler?: Tooler;\n error_code?: string;\n error_detail?: string;\n loading?: boolean;\n}\n\nexport interface AIMessageChunkData {\n content: string;\n additional_kwargs?: Record<string, unknown>;\n response_metadata?: Record<string, unknown>;\n type: string;\n name?: string | null;\n id?: string | null;\n example?: boolean;\n tool_calls?: ToolCall[];\n invalid_tool_calls?: InvalidToolCall[];\n usage_metadata?: any;\n tool_call_chunks?: unknown[];\n error_code?: string;\n error_detail?: string;\n}\n\ntype ToolCall = {\n name: string;\n args: Record<string, any>;\n id?: string | null;\n};\n\ntype InvalidToolCall = {\n name: string | null;\n args: string | null;\n id: string | null;\n error: string | null;\n};\n\nexport interface BaseAPIConfig {\n baseUrl: string;\n route: string;\n token?: string;\n headers?: Record<string, string>;\n}\n\nexport interface RatingData {\n assistantId: string;\n sessionId: string;\n topicId: number;\n score?: number;\n description?: string;\n}\n\nexport type AlquimiaMessage = Message & {\n error_code?: string;\n error_detail?: string;\n loading?: boolean;\n created_at?: string;\n additionalInfo?: string;\n tooler?: Tooler;\n};\n\nexport interface ActionResponse<T = void> {\n success: boolean;\n data?: T;\n error?: {\n message: string;\n code?: string;\n details?: any;\n name?: string;\n cause?: string;\n status?: string;\n };\n}\n\nexport type ApmSpan = Span & {\n id?: string \n traceId?: string\n} | undefined\n\nexport type ApiError = Error & {\n message: string;\n name: string;\n cause: string;\n code?: string | number;\n status?: string | number;\n}\n\nexport type Tooler = {\n tool_summary?: ToolSummary;\n tool_output?: Record<string, any>;\n}\n\nexport type ToolSummary = {\n name: string;\n parameters: Record<string, any>;\n}\n\nexport interface ConversationsMap {\n [topicId: string]: string;\n}\n\nexport interface DocumentSearchResult {\n pageContent: string;\n metadata: {\n source: string;\n _id: string;\n _collection_name: string;\n };\n score: number;\n}\n\nexport type ElevenLabsVoiceSettings = {\n stability: number;\n similarity_boost: number;\n style: number;\n};\n\nexport type ElevenLabsRequestSpecs = {\n optimize_streaming_latency: string;\n output_format: string;\n model_id: string;\n language: string;\n voice_settings: ElevenLabsVoiceSettings;\n};"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACcO,IAAe,cAAf,MAA2B;AAAA,EAGhC,YAAY,UAAqB;AAFjC,SAAU,WAA6B;AAGrC,SAAK,WAAW;AAAA,EAClB;AAAA,EAEA,OAAO,WAAW,UAAgC;AAChD,WAAO;AAAA,EACT;AAGF;","names":[]}
|
package/dist/types/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/type.ts"],"sourcesContent":["import { Span } from \"@elastic/apm-rum\";\nimport { Message } from \"ai\";\nexport interface ITooler {\n tooler: Array<{\n name: string;\n parameters: Record<string, any>;\n }>;\n}\n\nexport interface IToolSpec {\n name: string;\n parameters: Record<string, any>;\n}\n\nexport abstract class ToolFactory {\n protected toolSpec: IToolSpec | null = null;\n\n constructor(toolSpec: IToolSpec) {\n this.toolSpec = toolSpec;\n }\n\n static createTool(toolSpec: IToolSpec): IToolSpec {\n return toolSpec;\n }\n\n abstract execute(): Promise<any>;\n}\n\nexport interface AIMessageChunk {\n type: string;\n data?: AIMessageChunkData;\n answer?: string;\n tooler?: Tooler;\n error_code?: string;\n error_detail?: string;\n loading?: boolean;\n}\n\nexport interface AIMessageChunkData {\n content: string;\n additional_kwargs?: Record<string, unknown>;\n response_metadata?: Record<string, unknown>;\n type: string;\n name?: string | null;\n id?: string | null;\n example?: boolean;\n tool_calls?: ToolCall[];\n invalid_tool_calls?: InvalidToolCall[];\n usage_metadata?: any;\n tool_call_chunks?: unknown[];\n error_code?: string;\n error_detail?: string;\n}\n\ntype ToolCall = {\n name: string;\n args: Record<string, any>;\n id?: string | null;\n};\n\ntype InvalidToolCall = {\n name: string | null;\n args: string | null;\n id: string | null;\n error: string | null;\n};\n\nexport interface BaseAPIConfig {\n baseUrl: string;\n route: string;\n token?: string;\n headers?: Record<string, string>;\n}\n\nexport interface RatingData {\n assistantId: string;\n sessionId: string;\n topicId: number;\n score?: number;\n description?: string;\n}\n\nexport type AlquimiaMessage = Message & {\n error_code?: string;\n error_detail?: string;\n loading?: boolean;\n created_at?: string;\n additionalInfo?: string;\n tooler?: Tooler;\n};\n\nexport interface ActionResponse<T = void> {\n success: boolean;\n data?: T;\n error?: {\n message: string;\n code?: string;\n details?: any;\n name?: string;\n cause?: string;\n status?: string;\n };\n}\n\nexport type ApmSpan = Span & {\n id?: string \n traceId?: string\n} | undefined\n\nexport type ApiError = Error & {\n message: string;\n name: string;\n cause: string;\n code?: string | number;\n status?: string | number;\n}\n\nexport type Tooler = {\n tool_summary?: ToolSummary;\n tool_output?: Record<string, any>;\n}\n\nexport type ToolSummary = {\n name: string;\n parameters: Record<string, any>;\n}\n\nexport interface ConversationsMap {\n [topicId: string]: string;\n}\n\nexport interface DocumentSearchResult {\n pageContent: string;\n metadata: {\n source: string;\n _id: string;\n _collection_name: string;\n };\n score: number;\n}"],"mappings":";AAcO,IAAe,cAAf,MAA2B;AAAA,EAGhC,YAAY,UAAqB;AAFjC,SAAU,WAA6B;AAGrC,SAAK,WAAW;AAAA,EAClB;AAAA,EAEA,OAAO,WAAW,UAAgC;AAChD,WAAO;AAAA,EACT;AAGF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/types/type.ts"],"sourcesContent":["import { Span } from \"@elastic/apm-rum\";\nimport { Message } from \"ai\";\nexport interface ITooler {\n tooler: Array<{\n name: string;\n parameters: Record<string, any>;\n }>;\n}\n\nexport interface IToolSpec {\n name: string;\n parameters: Record<string, any>;\n}\n\nexport abstract class ToolFactory {\n protected toolSpec: IToolSpec | null = null;\n\n constructor(toolSpec: IToolSpec) {\n this.toolSpec = toolSpec;\n }\n\n static createTool(toolSpec: IToolSpec): IToolSpec {\n return toolSpec;\n }\n\n abstract execute(): Promise<any>;\n}\n\nexport interface AIMessageChunk {\n type: string;\n data?: AIMessageChunkData;\n answer?: string;\n tooler?: Tooler;\n error_code?: string;\n error_detail?: string;\n loading?: boolean;\n}\n\nexport interface AIMessageChunkData {\n content: string;\n additional_kwargs?: Record<string, unknown>;\n response_metadata?: Record<string, unknown>;\n type: string;\n name?: string | null;\n id?: string | null;\n example?: boolean;\n tool_calls?: ToolCall[];\n invalid_tool_calls?: InvalidToolCall[];\n usage_metadata?: any;\n tool_call_chunks?: unknown[];\n error_code?: string;\n error_detail?: string;\n}\n\ntype ToolCall = {\n name: string;\n args: Record<string, any>;\n id?: string | null;\n};\n\ntype InvalidToolCall = {\n name: string | null;\n args: string | null;\n id: string | null;\n error: string | null;\n};\n\nexport interface BaseAPIConfig {\n baseUrl: string;\n route: string;\n token?: string;\n headers?: Record<string, string>;\n}\n\nexport interface RatingData {\n assistantId: string;\n sessionId: string;\n topicId: number;\n score?: number;\n description?: string;\n}\n\nexport type AlquimiaMessage = Message & {\n error_code?: string;\n error_detail?: string;\n loading?: boolean;\n created_at?: string;\n additionalInfo?: string;\n tooler?: Tooler;\n};\n\nexport interface ActionResponse<T = void> {\n success: boolean;\n data?: T;\n error?: {\n message: string;\n code?: string;\n details?: any;\n name?: string;\n cause?: string;\n status?: string;\n };\n}\n\nexport type ApmSpan = Span & {\n id?: string \n traceId?: string\n} | undefined\n\nexport type ApiError = Error & {\n message: string;\n name: string;\n cause: string;\n code?: string | number;\n status?: string | number;\n}\n\nexport type Tooler = {\n tool_summary?: ToolSummary;\n tool_output?: Record<string, any>;\n}\n\nexport type ToolSummary = {\n name: string;\n parameters: Record<string, any>;\n}\n\nexport interface ConversationsMap {\n [topicId: string]: string;\n}\n\nexport interface DocumentSearchResult {\n pageContent: string;\n metadata: {\n source: string;\n _id: string;\n _collection_name: string;\n };\n score: number;\n}\n\nexport type ElevenLabsVoiceSettings = {\n stability: number;\n similarity_boost: number;\n style: number;\n};\n\nexport type ElevenLabsRequestSpecs = {\n optimize_streaming_latency: string;\n output_format: string;\n model_id: string;\n language: string;\n voice_settings: ElevenLabsVoiceSettings;\n};"],"mappings":";AAcO,IAAe,cAAf,MAA2B;AAAA,EAGhC,YAAY,UAAqB;AAFjC,SAAU,WAA6B;AAGrC,SAAK,WAAW;AAAA,EAClB;AAAA,EAEA,OAAO,WAAW,UAAgC;AAChD,WAAO;AAAA,EACT;AAGF;","names":[]}
|