@umituz/web-ai 1.0.1 → 1.0.3

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.cts CHANGED
@@ -1,11 +1,12 @@
1
1
  export { C as ChatMessage, F as FinishReason, G as GenerationResult, P as ProviderHealth, S as StreamCallbacks, a as StructuredGeneration, b as StructuredTextRequest, T as TextRequest, c as TextTier, d as TokenUsage } from './index-fXjxTR5W.cjs';
2
- export { A as AIError, a as AIErrorMetadata, b as AIErrorType, T as TEXT_TIERS, c as TierModelMap, U as USER_FRIENDLY_ERROR_MESSAGES, i as isTextTier, m as mergeTierOverrides, r as resolveModel } from './index-DKHNcMbl.cjs';
3
- export { AIErrorBody, ApiKeyValidationRule, CompositeExecutor, DEFAULT_API_KEY_RULE, DEFAULT_ERROR_CLASSIFICATION_RULE, DEFAULT_HTTP_STATUS_RULE, DEFAULT_RETRY_BACKOFF_MULTIPLIER, DEFAULT_RETRY_INITIAL_DELAY_MS, DEFAULT_RETRY_JITTER_FACTOR, DEFAULT_RETRY_MAX_ATTEMPTS, DEFAULT_RETRY_MAX_DELAY_MS, DebounceManager, DebounceOptions, DedupeExecutor, DedupeExecutorOptions, ErrorClassificationRule, HttpStatusClassificationRule, IRequestExecutor, JSON_CODE_BLOCK_PATTERN, JSON_OBJECT_PATTERN, JsonResponseParser, LoggedError, NormalizedSseChunk, QueueExecutor, RetryExecutor, SSE_BRIDGE_EVENTS, SSE_DONE_MARKER, SSE_PREFIX, SseDeltaExtractor, SseResponseOptions, StreamingParserCallbacks, StreamingResponseParser, StructuredPromptBuilder, ThrottleManager, ThrottleOptions, asObjectArray, asRecord, asStringArray, asTrimmedOptionalString, buildCacheKey, buildHttpStatusFallback, clampScore, classifyHttpStatus, createSseResponse, debounce, debounceManager, describeAIErrorType, extractErrorMessageFromJsonBody, extractErrorMessageFromResponse, extractJsonArray, extractJsonCandidate, extractJsonFromCodeFence, extractJsonObject, extractSseDataPayload, formatErrorForLogging, isAuthErrorType, isRetryableErrorType, isSseDataLine, isSseDoneMarker, isValidApiKey, normalizeSseChunk, oneOfCatalog, repairCommonJsonDefects, resolveUserFriendlyErrorMessage, resolveUserFriendlyMessage, splitSseLines, throttle, throttleManager, validateApiKey } from './core/index.cjs';
2
+ export { A as AIError, a as AIErrorMetadata, b as AIErrorType, b as GroqErrorType, T as TEXT_TIERS, c as TierModelMap, U as USER_FRIENDLY_ERROR_MESSAGES, i as isTextTier, m as mergeTierOverrides, r as resolveModel } from './index-DKHNcMbl.cjs';
3
+ export { AIErrorBody, ApiKeyValidationRule, CompositeExecutor, DEFAULT_API_KEY_RULE, DEFAULT_ERROR_CLASSIFICATION_RULE, DEFAULT_HTTP_STATUS_RULE, DEFAULT_RETRY_BACKOFF_MULTIPLIER, DEFAULT_RETRY_INITIAL_DELAY_MS, DEFAULT_RETRY_JITTER_FACTOR, DEFAULT_RETRY_MAX_ATTEMPTS, DEFAULT_RETRY_MAX_DELAY_MS, DebounceManager, DebounceOptions, DedupeExecutor, DedupeExecutorOptions, ErrorClassificationRule, GroqError, GroqErrorMetadata, HttpStatusClassificationRule, IRequestExecutor, JSON_CODE_BLOCK_PATTERN, JSON_OBJECT_PATTERN, JsonResponseParser, LoggedError, NormalizedSseChunk, QueueExecutor, RetryExecutor, SSE_BRIDGE_EVENTS, SSE_DONE_MARKER, SSE_PREFIX, SseDeltaExtractor, SseResponseOptions, StreamingParserCallbacks, StreamingResponseParser, StructuredPromptBuilder, ThrottleManager, ThrottleOptions, asObjectArray, asRecord, asStringArray, asTrimmedOptionalString, buildCacheKey, buildHttpStatusFallback, clampScore, classifyHttpStatus, createSseResponse, debounce, debounceManager, describeAIErrorType, extractErrorMessageFromJsonBody, extractErrorMessageFromResponse, extractJsonArray, extractJsonCandidate, extractJsonFromCodeFence, extractJsonObject, extractSseDataPayload, formatErrorForLogging, isAuthErrorType, isRetryableErrorType, isSseDataLine, isSseDoneMarker, isValidApiKey, normalizeSseChunk, oneOfCatalog, repairCommonJsonDefects, resolveUserFriendlyErrorMessage, resolveUserFriendlyMessage, splitSseLines, throttle, throttleManager, validateApiKey } from './core/index.cjs';
4
4
  export { C as CacheManager, a as CacheOptions, b as CacheStats, c as cacheManager } from './cache-manager-Df9LLYGA.cjs';
5
5
  export { Q as QueueOptions, R as RequestDeduplicator, a as RequestQueue, b as RetryManager, c as RetryOptions, r as requestDeduplicator, d as requestQueue, e as retryManager, w as withRetry } from './request-deduplicator.util-NDo0_n1y.cjs';
6
6
  export { A as AnyProvider, C as CostEstimateRequest, I as IMediaProvider, a as IProviderBase, b as ITextProvider, P as ProviderCapability, c as ProviderFactory, d as ProviderFactoryConfig, i as isMediaProvider, e as isTextProvider } from './provider.factory-BxsfK4WW.cjs';
7
- export { AnthropicHttpTransport, AnthropicProvider, AnthropicRequestBuilder, BaseProvider, BaseProviderConfig, FalProvider, GEMINI_TIERS, GROQ_MODELS, GROQ_TIERS, GeminiProvider, GroqChatRequestBuilder, GroqHttpClient, GroqHttpTransport, GroqProvider, ProviderError, PrunaProgressStage, PrunaProvider, PrunaRequest, consumeAnthropicStream, consumeGroqStream, createFalProvider, createGeminiProvider, createPrunaProvider, defaultEffortForModel, extractContentFromSsePayload, generateWithPruna, mapAnthropicStopReason, toGroqMessages } from './providers/index.cjs';
8
- export { A as AIProviderConfig, a as ANTHROPIC_API_VERSION, b as ANTHROPIC_DEFAULT_MAX_TOKENS, c as ANTHROPIC_MODELS, d as ANTHROPIC_TIERS, e as AnthropicEffort, f as AnthropicMessagesRequest, g as AnthropicMessagesResponse, h as AnthropicProviderConfig, i as AnthropicStopReason, j as AnthropicStreamEvent, G as GroqChatChunk, k as GroqChatRequest, l as GroqChatResponse, m as GroqMessage, n as GroqProviderConfig, o as createAI } from './create-ai-DOI9jD3v.cjs';
7
+ export { API_ENDPOINTS, AnthropicHttpTransport, AnthropicProvider, AnthropicRequestBuilder, AppContainer, AuthenticationError, BaseProvider, BaseProviderConfig, DEFAULT_BASE_URL, DEFAULT_GENERATION_CONFIG, DEFAULT_MODELS, FalProvider, GEMINI_TIERS, GROQ_MODELS, GROQ_TIERS, GeminiProvider, GenerationFailedError, GroqChatRequestBuilder, GroqConfigStore, GroqHttpClient, GroqHttpClientDeps, GroqHttpTransport, GroqProvider, ProviderError, PrunaProgressStage, PrunaProvider, PrunaRequest, StructuredJsonRequest, TIMEOUTS, TimeoutError, ValidationError, configureProvider, consumeAnthropicStream, consumeGroqStream, createAssistantMessage, createFalProvider, createGeminiProvider, createMessage, createPrunaProvider, createSystemMessage, createUserMessage, defaultEffortForModel, extractContentFromSsePayload, extractTextFromMessages, formatMessagesForDisplay, generateImageThenVideo, generatePruna, generateWithPruna, getProvider, mapAnthropicStopReason, pollForResult, promptToMessages, requestStructuredJson, resetProvider, submitPrediction, toGroqMessages, uploadImage } from './providers/index.cjs';
8
+ export { A as AIProviderConfig, a as ANTHROPIC_API_VERSION, b as ANTHROPIC_DEFAULT_MAX_TOKENS, c as ANTHROPIC_MODELS, d as ANTHROPIC_TIERS, e as AnthropicEffort, f as AnthropicMessagesRequest, g as AnthropicMessagesResponse, h as AnthropicProviderConfig, i as AnthropicStopReason, j as AnthropicStreamEvent, G as GroqChatChunk, k as GroqChatRequest, l as GroqChatResponse, m as GroqChoice, n as GroqChunkChoice, o as GroqConfig, p as GroqErrorResponse, q as GroqGenerationConfig, r as GroqMessage, s as GroqMessageRole, t as GroqProviderConfig, u as GroqReasoningEffort, v as GroqUsage, S as StreamRequestOptions, w as createAI } from './create-ai-CXYKPK6G.cjs';
9
+ export { C as CancellationError, G as GenerateOptions, a as GenerationStage, I as IGroqChatService, b as IGroqHttpClient, c as ImageToImageInput, d as ImageToVideoInput, P as PrunaAspectRatio, e as PrunaInput, f as PrunaModelId, g as PrunaOutput, h as PrunaPredictionResponse, i as PrunaResolution, j as PrunaResult, S as StreamingCallbacks, k as StructuredGenerationOptions, T as TextGenerationOptions, l as TextGenerationService, m as TextToImageInput, n as TextToVideoInput } from './cancellation-error-DwHrDKBz.cjs';
9
10
  export { C as ChatConfig, a as ChatConversation, b as ChatMessageSender, c as ChatMessageType, d as ChatService, e as ChatTokenUsage, f as ConversationMessage, D as DEFAULT_PROMPT_STRATEGY, I as IChatService, g as IChatStorage, h as IMessageFormatter, S as SendMessageInput, i as SendMessageResult, j as SystemPromptStrategy, U as UseChatOptions, k as UseChatReturn, l as extractTokenUsage } from './chat.service-CL1qtYxe.cjs';
10
11
  export { ChatIdGenerator, chatIdGenerator, messageFormatter } from './chat/index.cjs';
11
12
  import './ProviderConfig-DIFa9nmG.cjs';
package/dist/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  export { C as ChatMessage, F as FinishReason, G as GenerationResult, P as ProviderHealth, S as StreamCallbacks, a as StructuredGeneration, b as StructuredTextRequest, T as TextRequest, c as TextTier, d as TokenUsage } from './index-fXjxTR5W.js';
2
- export { A as AIError, a as AIErrorMetadata, b as AIErrorType, T as TEXT_TIERS, c as TierModelMap, U as USER_FRIENDLY_ERROR_MESSAGES, i as isTextTier, m as mergeTierOverrides, r as resolveModel } from './index-DIHz8_OJ.js';
3
- export { AIErrorBody, ApiKeyValidationRule, CompositeExecutor, DEFAULT_API_KEY_RULE, DEFAULT_ERROR_CLASSIFICATION_RULE, DEFAULT_HTTP_STATUS_RULE, DEFAULT_RETRY_BACKOFF_MULTIPLIER, DEFAULT_RETRY_INITIAL_DELAY_MS, DEFAULT_RETRY_JITTER_FACTOR, DEFAULT_RETRY_MAX_ATTEMPTS, DEFAULT_RETRY_MAX_DELAY_MS, DebounceManager, DebounceOptions, DedupeExecutor, DedupeExecutorOptions, ErrorClassificationRule, HttpStatusClassificationRule, IRequestExecutor, JSON_CODE_BLOCK_PATTERN, JSON_OBJECT_PATTERN, JsonResponseParser, LoggedError, NormalizedSseChunk, QueueExecutor, RetryExecutor, SSE_BRIDGE_EVENTS, SSE_DONE_MARKER, SSE_PREFIX, SseDeltaExtractor, SseResponseOptions, StreamingParserCallbacks, StreamingResponseParser, StructuredPromptBuilder, ThrottleManager, ThrottleOptions, asObjectArray, asRecord, asStringArray, asTrimmedOptionalString, buildCacheKey, buildHttpStatusFallback, clampScore, classifyHttpStatus, createSseResponse, debounce, debounceManager, describeAIErrorType, extractErrorMessageFromJsonBody, extractErrorMessageFromResponse, extractJsonArray, extractJsonCandidate, extractJsonFromCodeFence, extractJsonObject, extractSseDataPayload, formatErrorForLogging, isAuthErrorType, isRetryableErrorType, isSseDataLine, isSseDoneMarker, isValidApiKey, normalizeSseChunk, oneOfCatalog, repairCommonJsonDefects, resolveUserFriendlyErrorMessage, resolveUserFriendlyMessage, splitSseLines, throttle, throttleManager, validateApiKey } from './core/index.js';
2
+ export { A as AIError, a as AIErrorMetadata, b as AIErrorType, b as GroqErrorType, T as TEXT_TIERS, c as TierModelMap, U as USER_FRIENDLY_ERROR_MESSAGES, i as isTextTier, m as mergeTierOverrides, r as resolveModel } from './index-DIHz8_OJ.js';
3
+ export { AIErrorBody, ApiKeyValidationRule, CompositeExecutor, DEFAULT_API_KEY_RULE, DEFAULT_ERROR_CLASSIFICATION_RULE, DEFAULT_HTTP_STATUS_RULE, DEFAULT_RETRY_BACKOFF_MULTIPLIER, DEFAULT_RETRY_INITIAL_DELAY_MS, DEFAULT_RETRY_JITTER_FACTOR, DEFAULT_RETRY_MAX_ATTEMPTS, DEFAULT_RETRY_MAX_DELAY_MS, DebounceManager, DebounceOptions, DedupeExecutor, DedupeExecutorOptions, ErrorClassificationRule, GroqError, GroqErrorMetadata, HttpStatusClassificationRule, IRequestExecutor, JSON_CODE_BLOCK_PATTERN, JSON_OBJECT_PATTERN, JsonResponseParser, LoggedError, NormalizedSseChunk, QueueExecutor, RetryExecutor, SSE_BRIDGE_EVENTS, SSE_DONE_MARKER, SSE_PREFIX, SseDeltaExtractor, SseResponseOptions, StreamingParserCallbacks, StreamingResponseParser, StructuredPromptBuilder, ThrottleManager, ThrottleOptions, asObjectArray, asRecord, asStringArray, asTrimmedOptionalString, buildCacheKey, buildHttpStatusFallback, clampScore, classifyHttpStatus, createSseResponse, debounce, debounceManager, describeAIErrorType, extractErrorMessageFromJsonBody, extractErrorMessageFromResponse, extractJsonArray, extractJsonCandidate, extractJsonFromCodeFence, extractJsonObject, extractSseDataPayload, formatErrorForLogging, isAuthErrorType, isRetryableErrorType, isSseDataLine, isSseDoneMarker, isValidApiKey, normalizeSseChunk, oneOfCatalog, repairCommonJsonDefects, resolveUserFriendlyErrorMessage, resolveUserFriendlyMessage, splitSseLines, throttle, throttleManager, validateApiKey } from './core/index.js';
4
4
  export { C as CacheManager, a as CacheOptions, b as CacheStats, c as cacheManager } from './cache-manager-Df9LLYGA.js';
5
5
  export { Q as QueueOptions, R as RequestDeduplicator, a as RequestQueue, b as RetryManager, c as RetryOptions, r as requestDeduplicator, d as requestQueue, e as retryManager, w as withRetry } from './request-deduplicator.util-NDo0_n1y.js';
6
6
  export { A as AnyProvider, C as CostEstimateRequest, I as IMediaProvider, a as IProviderBase, b as ITextProvider, P as ProviderCapability, c as ProviderFactory, d as ProviderFactoryConfig, i as isMediaProvider, e as isTextProvider } from './provider.factory-DfDfk0dK.js';
7
- export { AnthropicHttpTransport, AnthropicProvider, AnthropicRequestBuilder, BaseProvider, BaseProviderConfig, FalProvider, GEMINI_TIERS, GROQ_MODELS, GROQ_TIERS, GeminiProvider, GroqChatRequestBuilder, GroqHttpClient, GroqHttpTransport, GroqProvider, ProviderError, PrunaProgressStage, PrunaProvider, PrunaRequest, consumeAnthropicStream, consumeGroqStream, createFalProvider, createGeminiProvider, createPrunaProvider, defaultEffortForModel, extractContentFromSsePayload, generateWithPruna, mapAnthropicStopReason, toGroqMessages } from './providers/index.js';
8
- export { A as AIProviderConfig, a as ANTHROPIC_API_VERSION, b as ANTHROPIC_DEFAULT_MAX_TOKENS, c as ANTHROPIC_MODELS, d as ANTHROPIC_TIERS, e as AnthropicEffort, f as AnthropicMessagesRequest, g as AnthropicMessagesResponse, h as AnthropicProviderConfig, i as AnthropicStopReason, j as AnthropicStreamEvent, G as GroqChatChunk, k as GroqChatRequest, l as GroqChatResponse, m as GroqMessage, n as GroqProviderConfig, o as createAI } from './create-ai-DXEoke8-.js';
7
+ export { API_ENDPOINTS, AnthropicHttpTransport, AnthropicProvider, AnthropicRequestBuilder, AppContainer, AuthenticationError, BaseProvider, BaseProviderConfig, DEFAULT_BASE_URL, DEFAULT_GENERATION_CONFIG, DEFAULT_MODELS, FalProvider, GEMINI_TIERS, GROQ_MODELS, GROQ_TIERS, GeminiProvider, GenerationFailedError, GroqChatRequestBuilder, GroqConfigStore, GroqHttpClient, GroqHttpClientDeps, GroqHttpTransport, GroqProvider, ProviderError, PrunaProgressStage, PrunaProvider, PrunaRequest, StructuredJsonRequest, TIMEOUTS, TimeoutError, ValidationError, configureProvider, consumeAnthropicStream, consumeGroqStream, createAssistantMessage, createFalProvider, createGeminiProvider, createMessage, createPrunaProvider, createSystemMessage, createUserMessage, defaultEffortForModel, extractContentFromSsePayload, extractTextFromMessages, formatMessagesForDisplay, generateImageThenVideo, generatePruna, generateWithPruna, getProvider, mapAnthropicStopReason, pollForResult, promptToMessages, requestStructuredJson, resetProvider, submitPrediction, toGroqMessages, uploadImage } from './providers/index.js';
8
+ export { A as AIProviderConfig, a as ANTHROPIC_API_VERSION, b as ANTHROPIC_DEFAULT_MAX_TOKENS, c as ANTHROPIC_MODELS, d as ANTHROPIC_TIERS, e as AnthropicEffort, f as AnthropicMessagesRequest, g as AnthropicMessagesResponse, h as AnthropicProviderConfig, i as AnthropicStopReason, j as AnthropicStreamEvent, G as GroqChatChunk, k as GroqChatRequest, l as GroqChatResponse, m as GroqChoice, n as GroqChunkChoice, o as GroqConfig, p as GroqErrorResponse, q as GroqGenerationConfig, r as GroqMessage, s as GroqMessageRole, t as GroqProviderConfig, u as GroqReasoningEffort, v as GroqUsage, S as StreamRequestOptions, w as createAI } from './create-ai-9PW752z8.js';
9
+ export { C as CancellationError, G as GenerateOptions, a as GenerationStage, I as IGroqChatService, b as IGroqHttpClient, c as ImageToImageInput, d as ImageToVideoInput, P as PrunaAspectRatio, e as PrunaInput, f as PrunaModelId, g as PrunaOutput, h as PrunaPredictionResponse, i as PrunaResolution, j as PrunaResult, S as StreamingCallbacks, k as StructuredGenerationOptions, T as TextGenerationOptions, l as TextGenerationService, m as TextToImageInput, n as TextToVideoInput } from './cancellation-error-CKcZRhFg.js';
9
10
  export { C as ChatConfig, a as ChatConversation, b as ChatMessageSender, c as ChatMessageType, d as ChatService, e as ChatTokenUsage, f as ConversationMessage, D as DEFAULT_PROMPT_STRATEGY, I as IChatService, g as IChatStorage, h as IMessageFormatter, S as SendMessageInput, i as SendMessageResult, j as SystemPromptStrategy, U as UseChatOptions, k as UseChatReturn, l as extractTokenUsage } from './chat.service-q05GnhEm.js';
10
11
  export { ChatIdGenerator, chatIdGenerator, messageFormatter } from './chat/index.js';
11
12
  import './ProviderConfig-DIFa9nmG.js';