@h-ai/ai 1.0.0-beta.22 → 1.0.0-beta.23
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.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { aiM, AIConfigSchema, MemoryConfigSchema, ModelEntrySchema, AudioModelEntrySchema, ImageModelEntrySchema, MCPExternalServerSchema, RetrievalSourceSchema, KnowledgeConfigSchema, TokenConfigSchema, SummaryConfigSchema, CompressConfigSchema, ACPConfigSchema, ACPAgentSchema, ACPWorkspaceSchema, AudioConfigSchema, resolveAudioModel, ensureAudioCredential, resolveModelApi, resolveModelEntry, sessionIdentitySchema, branchNameSchema, ImageConfigSchema, resolveImageModel, ACPPublishSchema } from './chunk-
|
|
2
|
-
export { A2AConfigSchema, A2ASkillConfigSchema, ACPAgentSchema, ACPConfigSchema, ACPPublishSchema, ACPRepositorySchema, ACPWorkspaceSchema, AIConfigSchema, AUDIO_WS_PATH, ApiTypeSchema, AudioConfigSchema, AudioFormatSchema, AudioModelEntrySchema, AudioOperationSchema, AudioOperationsSchema, AudioProviderSchema, AudioWsClientMessageSchema, AudioWsDoneMessageSchema, AudioWsStartMessageSchema, AudioWsTextMessageSchema, CompressConfigSchema, CompressionStrategySchema, EmbeddingConfigSchema, EntityTypeSchema, FileConfigSchema, ImageConfigSchema, ImageModelEntrySchema, ImageProviderSchema, KnowledgeConfigSchema, LLMConfigSchema, MCPConfigSchema, MCPExternalServerSchema, MCPServerCapabilitiesSchema, MCPServerConfigSchema, MemoryConfigSchema, MemoryTypeSchema, ModelCapabilitiesSchema, ModelEntrySchema, ModelScenarioSchema, OptionalSecretSchema, RetrievalConfigSchema, RetrievalSourceSchema, SummaryConfigSchema, TokenConfigSchema, ensureAudioCredential, resolveAudioModel, resolveImageModel, resolveModelApi, resolveModelEntry, serializePlayableAudio } from './chunk-
|
|
1
|
+
import { aiM, AIConfigSchema, MemoryConfigSchema, ModelEntrySchema, AudioModelEntrySchema, ImageModelEntrySchema, MCPExternalServerSchema, RetrievalSourceSchema, KnowledgeConfigSchema, TokenConfigSchema, SummaryConfigSchema, CompressConfigSchema, ACPConfigSchema, ACPAgentSchema, ACPWorkspaceSchema, AudioConfigSchema, resolveAudioModel, ensureAudioCredential, resolveModelApi, resolveModelEntry, sessionIdentitySchema, branchNameSchema, ImageConfigSchema, resolveImageModel, ACPPublishSchema } from './chunk-CCXG2S7O.js';
|
|
2
|
+
export { A2AConfigSchema, A2ASkillConfigSchema, ACPAgentSchema, ACPConfigSchema, ACPPublishSchema, ACPRepositorySchema, ACPWorkspaceSchema, AIConfigSchema, AUDIO_WS_PATH, ApiTypeSchema, AudioConfigSchema, AudioFormatSchema, AudioModelEntrySchema, AudioOperationSchema, AudioOperationsSchema, AudioProviderSchema, AudioWsClientMessageSchema, AudioWsDoneMessageSchema, AudioWsStartMessageSchema, AudioWsTextMessageSchema, CompressConfigSchema, CompressionStrategySchema, EmbeddingConfigSchema, EntityTypeSchema, FileConfigSchema, ImageConfigSchema, ImageModelEntrySchema, ImageProviderSchema, KnowledgeConfigSchema, LLMConfigSchema, MCPConfigSchema, MCPExternalServerSchema, MCPServerCapabilitiesSchema, MCPServerConfigSchema, MemoryConfigSchema, MemoryTypeSchema, ModelCapabilitiesSchema, ModelEntrySchema, ModelScenarioSchema, OptionalSecretSchema, RetrievalConfigSchema, RetrievalSourceSchema, SummaryConfigSchema, TokenConfigSchema, ensureAudioCredential, resolveAudioModel, resolveImageModel, resolveModelApi, resolveModelEntry, serializePlayableAudio } from './chunk-CCXG2S7O.js';
|
|
3
3
|
import { HaiAIError } from './chunk-M77C3VAP.js';
|
|
4
4
|
export { HaiAIError } from './chunk-M77C3VAP.js';
|
|
5
5
|
import { TaskState, SendMessageRequest, Message, Role, AgentCard, TaskStatus, Task } from '@a2a-js/sdk';
|
|
@@ -10348,8 +10348,6 @@ function createAILLMFunctions(config, deps) {
|
|
|
10348
10348
|
}
|
|
10349
10349
|
}
|
|
10350
10350
|
async function chatWithRecord(request2) {
|
|
10351
|
-
if (request2.tempModel && Object.hasOwn(request2.tempModel, "api"))
|
|
10352
|
-
return err(HaiAIError.INVALID_REQUEST, aiM("ai_llmProtocolRenamed"));
|
|
10353
10351
|
const start = Date.now();
|
|
10354
10352
|
const context = {
|
|
10355
10353
|
model: request2.model ?? request2.tempModel?.model,
|
|
@@ -10414,8 +10412,6 @@ function createAILLMFunctions(config, deps) {
|
|
|
10414
10412
|
return result;
|
|
10415
10413
|
}
|
|
10416
10414
|
async function* chatStreamWithRecord(request2) {
|
|
10417
|
-
if (request2.tempModel && Object.hasOwn(request2.tempModel, "api"))
|
|
10418
|
-
throw new Error(aiM("ai_llmProtocolRenamed"));
|
|
10419
10415
|
const start = Date.now();
|
|
10420
10416
|
const logContext = {
|
|
10421
10417
|
model: request2.model ?? request2.tempModel?.model,
|
|
@@ -15249,8 +15245,6 @@ var streamOperations = {
|
|
|
15249
15245
|
};
|
|
15250
15246
|
var ai = {
|
|
15251
15247
|
async init(config, options) {
|
|
15252
|
-
if (Object.keys(process2.env).some((name) => /^HAI_AI_LLM_(?:MODELS_\d+_)?API$/.test(name)))
|
|
15253
|
-
return err(HaiAIError.CONFIGURATION_ERROR, aiM("ai_llmProtocolRenamed"));
|
|
15254
15248
|
if (initInProgress || closingPromise) {
|
|
15255
15249
|
logger31.warn("AI init already in progress, skipping concurrent call");
|
|
15256
15250
|
return err(HaiAIError.INIT_IN_PROGRESS, aiM("ai_initInProgress"));
|