@gaia-framework/backend-core 7.0.0 → 7.1.0-rc.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/CHANGELOG.md +13 -0
- package/build/openapi/openapi.json +502 -2
- package/build/openapi/openapi.yaml +362 -9
- package/build/openapi/voice-media-worker.json +1 -1
- package/build/openapi/voice-media-worker.yaml +1 -1
- package/build/openapi/worker-health.json +1 -1
- package/build/openapi/worker-health.yaml +1 -1
- package/build/src/config/schema.d.ts +87 -0
- package/build/src/config/schema.d.ts.map +1 -1
- package/build/src/config/schema.js +57 -1
- package/build/src/config/schema.js.map +1 -1
- package/build/src/core/application/dtos/llms/responses/LLMInfoDto.d.ts +2 -1
- package/build/src/core/application/dtos/llms/responses/LLMInfoDto.d.ts.map +1 -1
- package/build/src/core/application/mappers/llms/LLMInfoMapper.d.ts.map +1 -1
- package/build/src/core/application/mappers/llms/LLMInfoMapper.js +2 -0
- package/build/src/core/application/mappers/llms/LLMInfoMapper.js.map +1 -1
- package/build/src/core/application/services/media/VideoGenerationRequestService.js +2 -2
- package/build/src/core/application/services/media/VideoGenerationRequestService.js.map +1 -1
- package/build/src/core/application/services/runs/RunAppServiceImpl.d.ts.map +1 -1
- package/build/src/core/application/services/runs/RunAppServiceImpl.js +16 -4
- package/build/src/core/application/services/runs/RunAppServiceImpl.js.map +1 -1
- package/build/src/core/application/services/tasks/ScheduledRunDispatchService.d.ts.map +1 -1
- package/build/src/core/application/services/tasks/ScheduledRunDispatchService.js +9 -2
- package/build/src/core/application/services/tasks/ScheduledRunDispatchService.js.map +1 -1
- package/build/src/core/application/services/voice/session/VoiceContextService.js +1 -1
- package/build/src/core/application/services/voice/session/VoiceContextService.js.map +1 -1
- package/build/src/core/domain/models/llms/LLMInfo.d.ts +2 -1
- package/build/src/core/domain/models/llms/LLMInfo.d.ts.map +1 -1
- package/build/src/core/domain/models/runs/RunApproval.d.ts +1 -1
- package/build/src/core/domain/models/runs/RunApproval.d.ts.map +1 -1
- package/build/src/core/domain/models/runs/RunApproval.js.map +1 -1
- package/build/src/core/domain/models/speech/Transcription.d.ts +1 -0
- package/build/src/core/domain/models/speech/Transcription.d.ts.map +1 -1
- package/build/src/core/domain/models/videos/VideoGenerationRequest.d.ts +2 -0
- package/build/src/core/domain/models/videos/VideoGenerationRequest.d.ts.map +1 -1
- package/build/src/core/domain/models/videos/VideoGenerationRequest.js +5 -1
- package/build/src/core/domain/models/videos/VideoGenerationRequest.js.map +1 -1
- package/build/src/core/domain/services/chat/ConversationContextService.d.ts +1 -1
- package/build/src/core/domain/services/chat/ConversationContextService.d.ts.map +1 -1
- package/build/src/core/domain/services/chat/ConversationContextServiceImpl.d.ts +1 -1
- package/build/src/core/domain/services/chat/ConversationContextServiceImpl.d.ts.map +1 -1
- package/build/src/core/domain/services/chat/ConversationContextServiceImpl.js +12 -3
- package/build/src/core/domain/services/chat/ConversationContextServiceImpl.js.map +1 -1
- package/build/src/core/domain/services/chat/LLMExecutionServiceImpl.d.ts.map +1 -1
- package/build/src/core/domain/services/chat/LLMExecutionServiceImpl.js +4 -1
- package/build/src/core/domain/services/chat/LLMExecutionServiceImpl.js.map +1 -1
- package/build/src/core/domain/services/chat/VideoInputPolicy.d.ts +5 -0
- package/build/src/core/domain/services/chat/VideoInputPolicy.d.ts.map +1 -0
- package/build/src/core/domain/services/chat/VideoInputPolicy.js +14 -0
- package/build/src/core/domain/services/chat/VideoInputPolicy.js.map +1 -0
- package/build/src/core/domain/services/media/TranscriptionPolicy.js +1 -1
- package/build/src/core/domain/services/media/TranscriptionPolicy.js.map +1 -1
- package/build/src/core/domain/services/models/ModelServiceImpl.d.ts.map +1 -1
- package/build/src/core/domain/services/models/ModelServiceImpl.js +4 -2
- package/build/src/core/domain/services/models/ModelServiceImpl.js.map +1 -1
- package/build/src/core/domain/services/runs/RunToolApprovalProviderCapability.d.ts.map +1 -1
- package/build/src/core/domain/services/runs/RunToolApprovalProviderCapability.js +4 -2
- package/build/src/core/domain/services/runs/RunToolApprovalProviderCapability.js.map +1 -1
- package/build/src/core/infrastructure/ai/alibaba/AlibabaWorkspace.d.ts +8 -0
- package/build/src/core/infrastructure/ai/alibaba/AlibabaWorkspace.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/alibaba/AlibabaWorkspace.js +16 -0
- package/build/src/core/infrastructure/ai/alibaba/AlibabaWorkspace.js.map +1 -0
- package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.d.ts +2 -3
- package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.js +42 -17
- package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.js.map +1 -1
- package/build/src/core/infrastructure/ai/google/GoogleGenAiConnection.d.ts +15 -0
- package/build/src/core/infrastructure/ai/google/GoogleGenAiConnection.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/google/GoogleGenAiConnection.js +21 -0
- package/build/src/core/infrastructure/ai/google/GoogleGenAiConnection.js.map +1 -0
- package/build/src/core/infrastructure/ai/images/alibaba/QwenImageProviders.d.ts +36 -0
- package/build/src/core/infrastructure/ai/images/alibaba/QwenImageProviders.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/images/alibaba/QwenImageProviders.js +108 -0
- package/build/src/core/infrastructure/ai/images/alibaba/QwenImageProviders.js.map +1 -0
- package/build/src/core/infrastructure/ai/images/google/GoogleAIImageGenerationProvider.d.ts +3 -3
- package/build/src/core/infrastructure/ai/images/google/GoogleAIImageGenerationProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/images/google/GoogleAIImageGenerationProvider.js +36 -25
- package/build/src/core/infrastructure/ai/images/google/GoogleAIImageGenerationProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/images/togetherai/TogetherImageGenerationProvider.d.ts +12 -0
- package/build/src/core/infrastructure/ai/images/togetherai/TogetherImageGenerationProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/images/togetherai/TogetherImageGenerationProvider.js +97 -0
- package/build/src/core/infrastructure/ai/images/togetherai/TogetherImageGenerationProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/context/codecs/RunMediaContextCodecs.js +3 -1
- package/build/src/core/infrastructure/ai/llm/context/codecs/RunMediaContextCodecs.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaCatalog.d.ts +12 -0
- package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaCatalog.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaCatalog.js +46 -0
- package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaCatalog.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaLLMProvider.d.ts +24 -0
- package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaLLMProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaLLMProvider.js +100 -0
- package/build/src/core/infrastructure/ai/llm/providers/alibaba/AlibabaLLMProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockCatalog.d.ts +53 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockCatalog.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockCatalog.js +178 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockCatalog.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockLLMProvider.d.ts +19 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockLLMProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockLLMProvider.js +59 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockLLMProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockMessages.d.ts +8 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockMessages.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockMessages.js +72 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockMessages.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockOutput.d.ts +28 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockOutput.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockOutput.js +117 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockOutput.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockService.d.ts +44 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockService.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockService.js +148 -0
- package/build/src/core/infrastructure/ai/llm/providers/bedrock/BedrockService.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleAIService.d.ts +6 -2
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleAIService.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleAIService.js +47 -37
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleAIService.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleApprovalCoordinator.d.ts +3 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleApprovalCoordinator.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleApprovalCoordinator.js +16 -8
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleApprovalCoordinator.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleChatRoute.d.ts +12 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleChatRoute.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleChatRoute.js +12 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleChatRoute.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleConfig.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleConfig.js +6 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleConfig.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleLLMProvider.d.ts +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleLLMProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleLLMProvider.js +12 -6
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleLLMProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleStructuredOutputPolicy.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleStructuredOutputPolicy.js +3 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleStructuredOutputPolicy.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleTokenCountRequest.d.ts +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleTokenCountRequest.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleTokenCountRequest.js +14 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleTokenCountRequest.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleToolLoop.d.ts +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleToolLoop.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleToolLoop.js +2 -2
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleToolLoop.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleVideoFiles.d.ts +19 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleVideoFiles.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleVideoFiles.js +170 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/GoogleVideoFiles.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatProfiles.d.ts +4 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatProfiles.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatProfiles.js +42 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatProfiles.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatVideo.d.ts +25 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatVideo.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatVideo.js +106 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/VertexChatVideo.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleLiveSocket.d.ts +5 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleLiveSocket.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleLiveSocket.js +37 -5
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleLiveSocket.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeConfig.d.ts +2 -2
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeConfig.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeConfig.js +4 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeConfig.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeEventHandlerREgistry.d.ts +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeEventHandlerREgistry.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeEventHandlerREgistry.js +2 -2
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeEventHandlerREgistry.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeProvider.d.ts +6 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeProvider.js +29 -12
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolApprovals.d.ts +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolApprovals.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolApprovals.js +2 -2
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolApprovals.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeTranslationProvider.d.ts +13 -2
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeTranslationProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeTranslationProvider.js +22 -9
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeTranslationProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceCatalog.d.ts +10 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceCatalog.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceCatalog.js +74 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceCatalog.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceLLMProvider.d.ts +25 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceLLMProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceLLMProvider.js +104 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceLLMProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceResponses.d.ts +40 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceResponses.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceResponses.js +39 -0
- package/build/src/core/infrastructure/ai/llm/providers/huggingface/HuggingFaceResponses.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/meta/MetaLLMProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/meta/MetaLLMProvider.js +2 -30
- package/build/src/core/infrastructure/ai/llm/providers/meta/MetaLLMProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaCatalog.d.ts +9 -0
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaCatalog.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaCatalog.js +87 -0
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaCatalog.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaService.d.ts +2 -2
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaService.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaService.js +7 -10
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaService.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/responses/createPortableResponsesContext.d.ts +5 -0
- package/build/src/core/infrastructure/ai/llm/providers/openai/responses/createPortableResponsesContext.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/openai/responses/createPortableResponsesContext.js +33 -0
- package/build/src/core/infrastructure/ai/llm/providers/openai/responses/createPortableResponsesContext.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherCatalog.d.ts +13 -0
- package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherCatalog.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherCatalog.js +95 -0
- package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherCatalog.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherLLMProvider.d.ts +29 -0
- package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherLLMProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherLLMProvider.js +167 -0
- package/build/src/core/infrastructure/ai/llm/providers/togetherai/TogetherLLMProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/speech/GoogleSpeechConnection.d.ts +5 -0
- package/build/src/core/infrastructure/ai/speech/GoogleSpeechConnection.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/speech/GoogleSpeechConnection.js +26 -0
- package/build/src/core/infrastructure/ai/speech/GoogleSpeechConnection.js.map +1 -0
- package/build/src/core/infrastructure/ai/speech/stt/AzureSpeechToTextProvider.d.ts +7 -7
- package/build/src/core/infrastructure/ai/speech/stt/AzureSpeechToTextProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/speech/stt/AzureSpeechToTextProvider.js +159 -63
- package/build/src/core/infrastructure/ai/speech/stt/AzureSpeechToTextProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/speech/stt/GoogleLiveTranscriptionProvider.d.ts +6 -2
- package/build/src/core/infrastructure/ai/speech/stt/GoogleLiveTranscriptionProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/speech/stt/GoogleLiveTranscriptionProvider.js +22 -13
- package/build/src/core/infrastructure/ai/speech/stt/GoogleLiveTranscriptionProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/speech/stt/GoogleSpeechToTextProvider.d.ts +12 -6
- package/build/src/core/infrastructure/ai/speech/stt/GoogleSpeechToTextProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/speech/stt/GoogleSpeechToTextProvider.js +64 -15
- package/build/src/core/infrastructure/ai/speech/stt/GoogleSpeechToTextProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/speech/stt/TogetherSpeechToTextProvider.d.ts +15 -0
- package/build/src/core/infrastructure/ai/speech/stt/TogetherSpeechToTextProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/speech/stt/TogetherSpeechToTextProvider.js +81 -0
- package/build/src/core/infrastructure/ai/speech/stt/TogetherSpeechToTextProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/speech/tts/TogetherTextToSpeechProvider.d.ts +26 -0
- package/build/src/core/infrastructure/ai/speech/tts/TogetherTextToSpeechProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/speech/tts/TogetherTextToSpeechProvider.js +80 -0
- package/build/src/core/infrastructure/ai/speech/tts/TogetherTextToSpeechProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTextToSpeechProvider.d.ts +20 -17
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTextToSpeechProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTextToSpeechProvider.js +20 -9
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTextToSpeechProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsProtocol.d.ts +2 -1
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsProtocol.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsProtocol.js +6 -4
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsProtocol.js.map +1 -1
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsWorker.js +24 -8
- package/build/src/core/infrastructure/ai/speech/tts/google/GoogleTtsWorker.js.map +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/images/ImageEditingTool.js +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/images/ImageEditingTool.js.map +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/images/schemas.d.ts +2 -2
- package/build/src/core/infrastructure/ai/tools/implementations/images/schemas.js +2 -2
- package/build/src/core/infrastructure/ai/tools/implementations/images/schemas.js.map +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/videos/VideoGenerationToolService.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/videos/VideoGenerationToolService.js +5 -4
- package/build/src/core/infrastructure/ai/tools/implementations/videos/VideoGenerationToolService.js.map +1 -1
- package/build/src/core/infrastructure/ai/videos/VideoGenerationProviderRegistryImpl.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/videos/VideoGenerationProviderRegistryImpl.js +4 -1
- package/build/src/core/infrastructure/ai/videos/VideoGenerationProviderRegistryImpl.js.map +1 -1
- package/build/src/core/infrastructure/ai/videos/alibaba/HappyHorseVideoProvider.d.ts +18 -0
- package/build/src/core/infrastructure/ai/videos/alibaba/HappyHorseVideoProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/videos/alibaba/HappyHorseVideoProvider.js +88 -0
- package/build/src/core/infrastructure/ai/videos/alibaba/HappyHorseVideoProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/videos/google/GoogleVideoGenerationProvider.d.ts +4 -2
- package/build/src/core/infrastructure/ai/videos/google/GoogleVideoGenerationProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/videos/google/GoogleVideoGenerationProvider.js +109 -45
- package/build/src/core/infrastructure/ai/videos/google/GoogleVideoGenerationProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/videos/google/VertexVeoOutput.d.ts +10 -0
- package/build/src/core/infrastructure/ai/videos/google/VertexVeoOutput.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/videos/google/VertexVeoOutput.js +43 -0
- package/build/src/core/infrastructure/ai/videos/google/VertexVeoOutput.js.map +1 -0
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoAdapter.d.ts +3 -2
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoAdapter.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoAdapter.js +7 -7
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoAdapter.js.map +1 -1
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoOutput.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoOutput.js +4 -4
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoOutput.js.map +1 -1
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoProtocol.d.ts +3 -2
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoProtocol.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoProtocol.js +13 -4
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoProtocol.js.map +1 -1
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoWorker.js +27 -23
- package/build/src/core/infrastructure/ai/videos/google/omni/OmniVideoWorker.js.map +1 -1
- package/build/src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.d.ts +14 -0
- package/build/src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.js +113 -0
- package/build/src/core/infrastructure/ai/videos/togetherai/TogetherVideoGenerationProvider.js.map +1 -0
- package/build/src/core/infrastructure/api/v1/controllers/models/ModelsController.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/controllers/models/ModelsController.js +12 -2
- package/build/src/core/infrastructure/api/v1/controllers/models/ModelsController.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/audio/openapi/SpeechRouter.openapi.d.ts +1 -0
- package/build/src/core/infrastructure/api/v1/routers/media/audio/openapi/SpeechRouter.openapi.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/audio/openapi/SpeechRouter.openapi.js +1 -0
- package/build/src/core/infrastructure/api/v1/routers/media/audio/openapi/SpeechRouter.openapi.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/models/ModelsRouter.openapi.d.ts +36 -34
- package/build/src/core/infrastructure/api/v1/routers/models/ModelsRouter.openapi.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/models/ModelsRouter.openapi.js +51 -17
- package/build/src/core/infrastructure/api/v1/routers/models/ModelsRouter.openapi.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/models/catalogRepresentation.d.ts +4 -0
- package/build/src/core/infrastructure/api/v1/routers/models/catalogRepresentation.d.ts.map +1 -0
- package/build/src/core/infrastructure/api/v1/routers/models/catalogRepresentation.js +4 -0
- package/build/src/core/infrastructure/api/v1/routers/models/catalogRepresentation.js.map +1 -0
- package/build/src/core/infrastructure/api/v1/routers/runs/openapi/RunsRouter.openapi.js +1 -1
- package/build/src/core/infrastructure/api/v1/routers/runs/openapi/RunsRouter.openapi.js.map +1 -1
- package/build/src/core/infrastructure/di/builtInLLMProviders.d.ts.map +1 -1
- package/build/src/core/infrastructure/di/builtInLLMProviders.js +17 -2
- package/build/src/core/infrastructure/di/builtInLLMProviders.js.map +1 -1
- package/build/src/core/infrastructure/di/index.d.ts.map +1 -1
- package/build/src/core/infrastructure/di/index.js +56 -8
- package/build/src/core/infrastructure/di/index.js.map +1 -1
- package/build/src/core/infrastructure/di/types.d.ts +1 -0
- package/build/src/core/infrastructure/di/types.d.ts.map +1 -1
- package/build/src/core/infrastructure/di/types.js +1 -0
- package/build/src/core/infrastructure/di/types.js.map +1 -1
- package/build/src/core/infrastructure/mappers/chat/default/BasicChatMessageMapper.d.ts.map +1 -1
- package/build/src/core/infrastructure/mappers/chat/default/BasicChatMessageMapper.js +4 -6
- package/build/src/core/infrastructure/mappers/chat/default/BasicChatMessageMapper.js.map +1 -1
- package/build/src/core/infrastructure/mappers/chat/google/GeminiChatMessageMapper.d.ts.map +1 -1
- package/build/src/core/infrastructure/mappers/chat/google/GeminiChatMessageMapper.js +9 -0
- package/build/src/core/infrastructure/mappers/chat/google/GeminiChatMessageMapper.js.map +1 -1
- package/build/src/core/infrastructure/persistence/dao/knex/KnexMessageDao.d.ts.map +1 -1
- package/build/src/core/infrastructure/persistence/dao/knex/KnexMessageDao.js +6 -0
- package/build/src/core/infrastructure/persistence/dao/knex/KnexMessageDao.js.map +1 -1
- package/build/src/core/infrastructure/services/audio/TranscriptionWav.js +1 -1
- package/build/src/core/infrastructure/services/audio/TranscriptionWav.js.map +1 -1
- package/build/src/core/infrastructure/services/chat/ProviderRequestUsage.js +1 -1
- package/build/src/core/infrastructure/services/chat/ProviderRequestUsage.js.map +1 -1
- package/build/src/core/infrastructure/services/runs/approval/RunToolInvocationLifecycleImpl.js +1 -0
- package/build/src/core/infrastructure/services/runs/approval/RunToolInvocationLifecycleImpl.js.map +1 -1
- package/build/src/infrastructure/websockets/adapters/ws/WSAdapter.d.ts.map +1 -1
- package/build/src/infrastructure/websockets/adapters/ws/WSAdapter.js +2 -1
- package/build/src/infrastructure/websockets/adapters/ws/WSAdapter.js.map +1 -1
- package/build/src/modules/workspaces/infrastructure/recovery/operator/authority/observer/ExecutionSources.js +1 -1
- package/package.json +2 -1
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaConfig.d.ts +0 -3
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaConfig.d.ts.map +0 -1
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaConfig.js +0 -27
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaConfig.js.map +0 -1
|
@@ -55,7 +55,7 @@ function validateTranscriptionMode(context, model) {
|
|
|
55
55
|
}
|
|
56
56
|
if (!context.diarization && !context.timestamps)
|
|
57
57
|
return;
|
|
58
|
-
if (context.mode === 'smart')
|
|
58
|
+
if (context.mode === 'smart' && !model.annotationsWithSmart)
|
|
59
59
|
throw transcriptionRejection('Smart transcription cannot include speaker labels or word timestamps.');
|
|
60
60
|
if (context.keywords?.length && model.annotationExcludesKeywords)
|
|
61
61
|
throw transcriptionRejection('Custom vocabulary cannot be combined with speaker labels or word timestamps.');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TranscriptionPolicy.js","sourceRoot":"","sources":["../../../../../../src/core/domain/services/media/TranscriptionPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAGhF,MAAM,UAAU,6BAA6B,CAAC,SAAqD;IACjG,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC;SAClG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IACjD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,4BAA4B,CAAC,EAAE,EAAE,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AAC9F,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,OAAe;IACpD,OAAO,IAAI,sBAAsB,CAAC,EAAE,IAAI,EAAE,wBAAwB,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;AAC3I,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,MAAoB,EAAE,KAAyB,EAAE,YAAoB;IAErE,MAAM,QAAQ,GAAG,KAAK,IAAI,YAAY,CAAC;IACvC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,QAAQ,IAAI,KA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ts","sourceRoot":"","sources":["../../../../../../src/core/domain/services/models/ModelServiceImpl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAEtE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"ModelServiceImpl.d.ts","sourceRoot":"","sources":["../../../../../../src/core/domain/services/models/ModelServiceImpl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAEtE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAiBpE,MAAM,CAAC,OAAO,OAAO,gBAAiB,YAAW,YAAY;IASrB,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IACzC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAVjE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,iBAAiB,CAAC,CAAyB;IACnD,OAAO,CAAC,mBAAmB,CAAC,CAAqB;IACjD,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAkD;IAC3F,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAA8C;IACxF,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAqB;gBAGT,qBAAqB,EAAE,WAAW,EAAE,EACvC,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa;IAK1E,SAAS,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YAkBvB,mBAAmB;IAuB3B,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAM7C,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;IAezD,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAItE,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC;YAmB5C,eAAe;IAQvB,oBAAoB,CACxB,KAAK,EAAE,MAAM,EACb,wBAAwB,CAAC,EAAE,MAAM,GAChC,OAAO,CAAC,MAAM,CAAC;IA2BlB,OAAO,CAAC,qBAAqB;YAuBf,oBAAoB;IAWlC,eAAe,IAAI,MAAM;IAIzB,OAAO,CAAC,4BAA4B;IAgBpC,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,oBAAoB;CAS7B"}
|
|
@@ -19,6 +19,8 @@ const MODEL_CATALOG_TTL_MS = 300_000;
|
|
|
19
19
|
const UNKNOWN_MODEL_CONTEXT_LENGTH = 32_768;
|
|
20
20
|
const MAX_DEFAULT_OUTPUT_RESERVATION = 4_096;
|
|
21
21
|
const DEFAULT_OUTPUT_CONTEXT_DIVISOR = 4;
|
|
22
|
+
const explicitHostedRoutes = ['alibaba/', 'amazon/', 'huggingface/', 'ollama-cloud/', 'opencode/', 'togetherai/'];
|
|
23
|
+
const isExplicitHostedRoute = (model) => explicitHostedRoutes.some(prefix => model.startsWith(prefix));
|
|
22
24
|
let ModelServiceImpl = class ModelServiceImpl {
|
|
23
25
|
languageModelServices;
|
|
24
26
|
loggerService;
|
|
@@ -94,9 +96,9 @@ let ModelServiceImpl = class ModelServiceImpl {
|
|
|
94
96
|
this.loggerService.info(`Using provided model for request: ${model}`);
|
|
95
97
|
return model;
|
|
96
98
|
}
|
|
97
|
-
const wouldSendLocalModelToCloud = (defaultModel
|
|
99
|
+
const wouldSendLocalModelToCloud = isExplicitHostedRoute(defaultModel)
|
|
98
100
|
&& (model.startsWith("lmstudio/") || model.startsWith("foundry-local/"));
|
|
99
|
-
if (model.startsWith("ollama/") ||
|
|
101
|
+
if (model.startsWith("ollama/") || isExplicitHostedRoute(model) || wouldSendLocalModelToCloud) {
|
|
100
102
|
throw new AppError(422, `Selected model is unavailable: ${model}`, { code: "run_model_unavailable" });
|
|
101
103
|
}
|
|
102
104
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelServiceImpl.js","sourceRoot":"","sources":["../../../../../../src/core/domain/services/models/ModelServiceImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG5D,OAAO,SAAS,MAAM,qCAAqC,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAGvE,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAElE,MAAM,oBAAoB,GAAG,OAAO,CAAC;AACrC,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAC5C,MAAM,8BAA8B,GAAG,KAAK,CAAC;AAC7C,MAAM,8BAA8B,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"ModelServiceImpl.js","sourceRoot":"","sources":["../../../../../../src/core/domain/services/models/ModelServiceImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG5D,OAAO,SAAS,MAAM,qCAAqC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,QAAQ,EAAE,SAAS,CAAC,QAAQ;gBAC5B,qBAAqB,EAAE,4BAA4B;aACpD,CACF,CAAC;QACJ,CAAC;QAED,OAAO,4BAA4B,CAAC;IACtC,CAAC;IAEO,oBAAoB,CAAC,KAAa;QACxC,MAAM,iBAAiB,GAAG,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QAE3D,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,iBAAiB,CAAC,CAAC;IAC1F,CAAC;IAEO,oBAAoB,CAAC,KAAa;QACxC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAE1C,IAAI,cAAc,IAAI,CAAC,EAAE,CAAC;YACxB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;IACxC,CAAC;CACF,CAAA;AApNoB,gBAAgB;IADpC,UAAU,EAAE;IAUR,WAAA,WAAW,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;IAClC,WAAA,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;IAC/B,WAAA,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;oDAAiC,aAAa;GAX7D,gBAAgB,CAoNpC;eApNoB,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RunToolApprovalProviderCapability.d.ts","sourceRoot":"","sources":["../../../../../../src/core/domain/services/runs/RunToolApprovalProviderCapability.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"RunToolApprovalProviderCapability.d.ts","sourceRoot":"","sources":["../../../../../../src/core/domain/services/runs/RunToolApprovalProviderCapability.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAgB5D,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,WAAW,EAAE,YAAY,SAAI,GAAG,WAAW,CAErG;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAEjE;AAED,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAGpH;AAED,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAK1F"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { externalProviderUsesToolCoordinator, registerExternalRunProvider } from './ProviderRunTurn.js';
|
|
2
2
|
const builtInApprovalAwareProviderIds = new Set([
|
|
3
|
+
"togetherai",
|
|
4
|
+
"amazon",
|
|
3
5
|
"openai",
|
|
4
6
|
"azure",
|
|
5
7
|
"anthropic",
|
|
6
|
-
"google",
|
|
8
|
+
"google", "vertex",
|
|
7
9
|
"groq",
|
|
8
10
|
"deepseek", "cohere", "cloudflare",
|
|
9
|
-
"meta",
|
|
11
|
+
"meta", "alibaba", "huggingface",
|
|
10
12
|
"cerebras", "foundry-local", "mistral",
|
|
11
13
|
"nvidia", "opencode", "openrouter", "xai", "lmstudio", "ollama", "ollama-cloud",
|
|
12
14
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RunToolApprovalProviderCapability.js","sourceRoot":"","sources":["../../../../../../src/core/domain/services/runs/RunToolApprovalProviderCapability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAIxG,MAAM,+BAA+B,GAAG,IAAI,GAAG,CAAC;IAC9C,QAAQ;IACR,OAAO;IACP,WAAW;IACX,QAAQ;
|
|
1
|
+
{"version":3,"file":"RunToolApprovalProviderCapability.js","sourceRoot":"","sources":["../../../../../../src/core/domain/services/runs/RunToolApprovalProviderCapability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAIxG,MAAM,+BAA+B,GAAG,IAAI,GAAG,CAAC;IAC9C,YAAY;IACZ,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,WAAW;IACX,QAAQ,EAAE,QAAQ;IAClB,MAAM;IACN,UAAU,EAAE,QAAQ,EAAE,YAAY;IAClC,MAAM,EAAE,SAAS,EAAE,aAAa;IAChC,UAAU,EAAE,eAAe,EAAE,SAAS;IACtC,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc;CAChF,CAAC,CAAC;AAEH,MAAM,UAAU,gCAAgC,CAAC,QAAqB,EAAE,YAAY,GAAG,CAAC;IACtF,OAAO,2BAA2B,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,QAAqB;IACtD,OAAO,mCAAmC,CAAC,QAAQ,CAAC,IAAI,+BAA+B,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC3G,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,QAAqB,EAAE,KAAa,EAAE,IAAyB;IACzG,OAAO,IAAI,EAAE,aAAa,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,kCAAkC;WAC1E,CAAC,QAAQ,CAAC,kCAAkC,EAAE,CAAC,KAAK,CAAC,IAAI,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AAC7F,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,QAAqB,EAAE,KAAa;IAC/E,IAAI,QAAQ,CAAC,4BAA4B,EAAE,CAAC,KAAK,CAAC,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IAC3E,OAAO,+BAA+B,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;QACrD,CAAC,CAAC,kBAAkB,CAAC,QAAQ,CAAC;QAC9B,CAAC,CAAC,QAAQ,CAAC,4BAA4B,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ConfigService } from '@gaia-framework/config';
|
|
2
|
+
export type AlibabaCapability = 'llm' | 'images' | 'videos';
|
|
3
|
+
export declare function alibabaWorkspace(config: ConfigService, capability: AlibabaCapability): {
|
|
4
|
+
apiKey: string;
|
|
5
|
+
baseURL: string;
|
|
6
|
+
dashScopeURL: string;
|
|
7
|
+
} | undefined;
|
|
8
|
+
//# sourceMappingURL=AlibabaWorkspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlibabaWorkspace.d.ts","sourceRoot":"","sources":["../../../../../../src/core/infrastructure/ai/alibaba/AlibabaWorkspace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE5D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,iBAAiB;;;;cAYpF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function alibabaWorkspace(config, capability) {
|
|
2
|
+
const path = `ai.${capability}.providers.alibaba`;
|
|
3
|
+
if (!config.getOptionalBoolean(path + '.enabled'))
|
|
4
|
+
return undefined;
|
|
5
|
+
const apiKey = config.getOptionalString(path + '.apiKey')?.trim();
|
|
6
|
+
const value = config.getOptionalString(path + '.baseUrl')?.trim();
|
|
7
|
+
if (!apiKey || !value)
|
|
8
|
+
return undefined;
|
|
9
|
+
const url = new URL(value);
|
|
10
|
+
if (url.protocol !== 'https:' || url.username || url.password || url.search || url.hash ||
|
|
11
|
+
url.pathname.replace(/\/$/, '') !== '/compatible-mode/v1') {
|
|
12
|
+
throw new Error('Alibaba Cloud requires the HTTPS OpenAI Compatible Endpoint ending in /compatible-mode/v1.');
|
|
13
|
+
}
|
|
14
|
+
return { apiKey, baseURL: url.origin + '/compatible-mode/v1', dashScopeURL: url.origin + '/api/v1' };
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=AlibabaWorkspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlibabaWorkspace.js","sourceRoot":"","sources":["../../../../../../src/core/infrastructure/ai/alibaba/AlibabaWorkspace.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,gBAAgB,CAAC,MAAqB,EAAE,UAA6B;IACnF,MAAM,IAAI,GAAG,MAAM,UAAU,oBAAoB,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,GAAG,UAAU,CAAC;QAAE,OAAO,SAAS,CAAC;IACpE,MAAM,MAAM,GAAG,MAAM,CAAC,iBAAiB,CAAC,IAAI,GAAG,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC;IAClE,MAAM,KAAK,GAAG,MAAM,CAAC,iBAAiB,CAAC,IAAI,GAAG,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC;IAClE,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IACxC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;IAC3B,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,IAAI;QACnF,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,qBAAqB,EAAE,CAAC;QAC9D,MAAM,IAAI,KAAK,CAAC,4FAA4F,CAAC,CAAC;IAChH,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,GAAG,qBAAqB,EAAE,YAAY,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,EAAE,CAAC;AACvG,CAAC"}
|
package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.d.ts
CHANGED
|
@@ -4,12 +4,11 @@ import { TextEmbeddingChunk } from "../../../../../domain/models/embeddings/Text
|
|
|
4
4
|
import { EmbeddingModelProvider } from "../../../../../domain/ports/services/index.js";
|
|
5
5
|
import { EmbeddingRequest, EmbeddingResult } from "../../../../../domain/models/embeddings/EmbeddingProfile.js";
|
|
6
6
|
export declare class GoogleAIEmbeddingService implements EmbeddingModelProvider {
|
|
7
|
-
|
|
8
|
-
readonly id: string;
|
|
7
|
+
readonly id: "google" | "vertex";
|
|
9
8
|
readonly enabled: boolean;
|
|
10
9
|
private readonly client?;
|
|
11
10
|
private readonly embeddingModels;
|
|
12
|
-
constructor(configService: ConfigService);
|
|
11
|
+
constructor(configService: ConfigService, id?: "google" | "vertex");
|
|
13
12
|
embed(request: EmbeddingRequest): Promise<readonly EmbeddingResult[]>;
|
|
14
13
|
createEmbedding(text: string, model?: string): Promise<TextEmbeddingChunk[]>;
|
|
15
14
|
getEmbeddingModels(): EmbeddingModelInfo[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleAIEmbeddingService.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAwB,MAAM,+DAA+D,CAAC;AACzH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAC;AAC9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAGvF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAmD,MAAM,6DAA6D,CAAC;
|
|
1
|
+
{"version":3,"file":"GoogleAIEmbeddingService.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAwB,MAAM,+DAA+D,CAAC;AACzH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAC;AAC9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAGvF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAmD,MAAM,6DAA6D,CAAC;AAejK,qBACa,wBAAyB,YAAW,sBAAsB;IAqBnE,QAAQ,CAAC,EAAE,EAAE,QAAQ,GAAG,QAAQ;IApBlC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAc;IACtC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAa9B;gBAGiC,aAAa,EAAE,aAAa,EACpD,EAAE,GAAE,QAAQ,GAAG,QAAmB;IAkBvC,KAAK,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC;IA0BrE,eAAe,CACnB,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAqBhC,kBAAkB,IAAI,kBAAkB,EAAE;IAiB1C,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAGrC"}
|
package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.js
CHANGED
|
@@ -12,14 +12,22 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
12
12
|
};
|
|
13
13
|
import { injectable, inject } from "inversify";
|
|
14
14
|
import { ConfigService } from "@gaia-framework/config";
|
|
15
|
-
import { GoogleGenAI } from "@google/genai";
|
|
16
15
|
import CoreTypes from "../../../../di/types.js";
|
|
17
16
|
import { createEmbeddingSpace, DEFAULT_EMBEDDING_PROFILE } from "../../../../../domain/models/embeddings/EmbeddingProfile.js";
|
|
18
17
|
import { EmbeddingFailure } from "../../../../../domain/models/embeddings/EmbeddingFailure.js";
|
|
19
18
|
import { mapEmbeddingProviderFailure } from "../../EmbeddingProviderFailureMapper.js";
|
|
19
|
+
import { createGoogleGenAiClient, googleGenAiConnection } from "../../../google/GoogleGenAiConnection.js";
|
|
20
|
+
// Google Cloud's embedding availability table lists regional endpoints for 001.
|
|
21
|
+
// The global endpoint also serves this model. Embedding 2 uses global and the US/EU multi-regions.
|
|
22
|
+
const VERTEX_EMBEDDING_001_LOCATIONS = new Set([
|
|
23
|
+
"global", "us-west1", "us-west4", "us-central1", "us-east1", "us-east4", "us-east5", "us-south1",
|
|
24
|
+
"northamerica-northeast1", "southamerica-east1", "europe-west2", "europe-west1", "europe-west4",
|
|
25
|
+
"europe-west6", "europe-west3", "europe-north1", "europe-central2", "europe-west8", "europe-southwest1",
|
|
26
|
+
"europe-west9", "asia-south1", "asia-southeast1", "asia-east2", "asia-east1", "asia-northeast1",
|
|
27
|
+
"australia-southeast1", "asia-northeast3", "me-west1", "me-central1", "me-central2",
|
|
28
|
+
]);
|
|
20
29
|
let GoogleAIEmbeddingService = class GoogleAIEmbeddingService {
|
|
21
|
-
|
|
22
|
-
id = 'google';
|
|
30
|
+
id;
|
|
23
31
|
enabled;
|
|
24
32
|
client;
|
|
25
33
|
embeddingModels = [
|
|
@@ -36,18 +44,33 @@ let GoogleAIEmbeddingService = class GoogleAIEmbeddingService {
|
|
|
36
44
|
modalities: ["text", "image", "multimodal"],
|
|
37
45
|
}
|
|
38
46
|
];
|
|
39
|
-
constructor(configService) {
|
|
40
|
-
this.
|
|
41
|
-
this.enabled =
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
constructor(configService, id = "google") {
|
|
48
|
+
this.id = id;
|
|
49
|
+
this.enabled = configService.getOptionalBoolean('ai.embeddings.providers.' + id + '.enabled') ?? false;
|
|
50
|
+
if (!this.enabled)
|
|
51
|
+
return;
|
|
52
|
+
if (id === "vertex") {
|
|
53
|
+
const connection = googleGenAiConnection(configService, id);
|
|
54
|
+
if (connection.kind !== "vertex")
|
|
55
|
+
throw new Error("Vertex embeddings require a Cloud project.");
|
|
56
|
+
const location = configService.getOptionalString("ai.embeddings.providers.vertex.location")?.trim() || connection.location;
|
|
57
|
+
this.client = createGoogleGenAiClient({ ...connection, location });
|
|
58
|
+
this.embeddingModels = this.embeddingModels.filter(model => model.name === "gemini-embedding-001"
|
|
59
|
+
? VERTEX_EMBEDDING_001_LOCATIONS.has(location)
|
|
60
|
+
: ["global", "us", "eu"].includes(location));
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
const apiKey = configService.getOptionalString("ai.embeddings.providers.google.apiKey")?.trim();
|
|
64
|
+
if (apiKey)
|
|
65
|
+
this.client = createGoogleGenAiClient({ kind: "developer", apiKey });
|
|
66
|
+
}
|
|
44
67
|
}
|
|
45
68
|
async embed(request) {
|
|
46
69
|
if (!this.enabled)
|
|
47
70
|
throw new EmbeddingFailure("embedding_configuration_error", "Google embeddings are not enabled.", false);
|
|
48
71
|
if (!this.client)
|
|
49
72
|
throw new EmbeddingFailure("embedding_configuration_error", "Google embeddings are not configured.", false);
|
|
50
|
-
if (!this.isValidModel(request.space.providerModel))
|
|
73
|
+
if (request.space.provider !== this.id || !this.isValidModel(request.space.providerModel))
|
|
51
74
|
throw new EmbeddingFailure("embedding_configuration_error", "The configured Google embedding model is not supported.", false);
|
|
52
75
|
const isEmbedding2 = request.space.providerModel === "gemini-embedding-2";
|
|
53
76
|
const text = isEmbedding2
|
|
@@ -73,17 +96,19 @@ let GoogleAIEmbeddingService = class GoogleAIEmbeddingService {
|
|
|
73
96
|
}
|
|
74
97
|
}
|
|
75
98
|
async createEmbedding(text, model) {
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
99
|
+
const selected = this.embeddingModels.find(candidate => candidate.name === model);
|
|
100
|
+
const modelInfo = selected ?? (this.id === "google" || !model ? this.embeddingModels[0] : undefined);
|
|
101
|
+
if (!modelInfo)
|
|
102
|
+
throw new EmbeddingFailure("embedding_configuration_error", "The requested embedding model is unavailable at this location.", false);
|
|
103
|
+
const modelToUse = modelInfo.name;
|
|
104
|
+
const space = createEmbeddingSpace({ ...DEFAULT_EMBEDDING_PROFILE, model: `${this.id}/${modelToUse}`, dimension: modelInfo.defaultDimension });
|
|
80
105
|
const [result] = await this.embed({ text, space, purpose: "document" });
|
|
81
106
|
const embeddingChunks = [
|
|
82
107
|
{
|
|
83
108
|
chunkIndex: 0,
|
|
84
109
|
text: text,
|
|
85
110
|
embedding: [...result.embedding],
|
|
86
|
-
model:
|
|
111
|
+
model: `${this.id}/${modelToUse}`,
|
|
87
112
|
dimension: space.dimension,
|
|
88
113
|
embeddingSpaceKey: space.key,
|
|
89
114
|
}
|
|
@@ -93,7 +118,7 @@ let GoogleAIEmbeddingService = class GoogleAIEmbeddingService {
|
|
|
93
118
|
getEmbeddingModels() {
|
|
94
119
|
return this.embeddingModels.map((model) => {
|
|
95
120
|
return {
|
|
96
|
-
id:
|
|
121
|
+
id: `${this.id}/${model.name}`,
|
|
97
122
|
providerModel: model.name,
|
|
98
123
|
displayName: model.name,
|
|
99
124
|
defaultDimension: model.defaultDimension,
|
|
@@ -101,7 +126,7 @@ let GoogleAIEmbeddingService = class GoogleAIEmbeddingService {
|
|
|
101
126
|
modalities: model.modalities,
|
|
102
127
|
supportedPurposes: ["document", "query"],
|
|
103
128
|
dimension: model.defaultDimension,
|
|
104
|
-
provider:
|
|
129
|
+
provider: this.id,
|
|
105
130
|
type: 'embedding',
|
|
106
131
|
};
|
|
107
132
|
});
|
|
@@ -113,7 +138,7 @@ let GoogleAIEmbeddingService = class GoogleAIEmbeddingService {
|
|
|
113
138
|
GoogleAIEmbeddingService = __decorate([
|
|
114
139
|
injectable(),
|
|
115
140
|
__param(0, inject(CoreTypes.ConfigService)),
|
|
116
|
-
__metadata("design:paramtypes", [ConfigService])
|
|
141
|
+
__metadata("design:paramtypes", [ConfigService, String])
|
|
117
142
|
], GoogleAIEmbeddingService);
|
|
118
143
|
export { GoogleAIEmbeddingService };
|
|
119
144
|
//# sourceMappingURL=GoogleAIEmbeddingService.js.map
|
package/build/src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleAIEmbeddingService.js","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"GoogleAIEmbeddingService.js","sourceRoot":"","sources":["../../../../../../../../src/core/infrastructure/ai/embedding/providers/google/GoogleAIEmbeddingService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIvD,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAqC,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,6DAA6D,CAAC;AACjK,OAAO,EAAE,gBAAgB,EAAE,MAAM,6DAA6D,CAAC;AAC/F,OAAO,EAAE,2BAA2B,EAAE,MAAM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AS,CAAC;gBAChC,KAAK,EAAE,GAAG,IAAI,CAAC,EAAE,IAAI,UAAU,EAAE;gBACjC,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,iBAAiB,EAAE,KAAK,CAAC,GAAG;aAC7B;SACF,CAAC;QACF,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,kBAAkB;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACxC,OAAO;gBACL,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,IAAI,KAAK,CAAC,IAAI,EAAE;gBAC9B,aAAa,EAAE,KAAK,CAAC,IAAI;gBACzB,WAAW,EAAE,KAAK,CAAC,IAAI;gBACvB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;gBACxC,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;gBAC9C,UAAU,EAAE,KAAK,CAAC,UAAU;gBAC5B,iBAAiB,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;gBACxC,SAAS,EAAE,KAAK,CAAC,gBAAgB;gBACjC,QAAQ,EAAE,IAAI,CAAC,EAAE;gBACjB,IAAI,EAAE,WAAW;aAClB,CAAA;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,YAAY,CAAC,KAAa;QACxB,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC;IAC1D,CAAC;CACF,CAAA;AA7GY,wBAAwB;IADpC,UAAU,EAAE;IAqBR,WAAA,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;qCAAgB,aAAa;GApBpD,wBAAwB,CA6GpC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GoogleGenAI, type GoogleGenAIOptions } from '@google/genai';
|
|
2
|
+
import type { ConfigService } from '@gaia-framework/config';
|
|
3
|
+
export type GoogleGenAiProvider = 'google' | 'vertex';
|
|
4
|
+
export type GoogleGenAiConnection = {
|
|
5
|
+
readonly kind: 'developer';
|
|
6
|
+
readonly apiKey: string;
|
|
7
|
+
} | {
|
|
8
|
+
readonly kind: 'vertex';
|
|
9
|
+
readonly project: string;
|
|
10
|
+
readonly location: string;
|
|
11
|
+
readonly stagingBucket?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function googleGenAiConnection(config: Pick<ConfigService, 'getOptionalString'>, provider: GoogleGenAiProvider): GoogleGenAiConnection;
|
|
14
|
+
export declare function createGoogleGenAiClient(connection: GoogleGenAiConnection, options?: Pick<GoogleGenAIOptions, 'httpOptions'>): GoogleGenAI;
|
|
15
|
+
//# sourceMappingURL=GoogleGenAiConnection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoogleGenAiConnection.d.ts","sourceRoot":"","sources":["../../../../../../src/core/infrastructure/ai/google/GoogleGenAiConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACtD,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACvD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,mBAAmB,CAAC,EAChD,QAAQ,EAAE,mBAAmB,GAC5B,qBAAqB,CAUvB;AAED,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,qBAAqB,EACjC,OAAO,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,GAChD,WAAW,CAKb"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { GoogleGenAI } from '@google/genai';
|
|
2
|
+
export function googleGenAiConnection(config, provider) {
|
|
3
|
+
if (provider === 'google') {
|
|
4
|
+
const apiKey = config.getOptionalString('ai.llm.providers.google.apiKey')?.trim();
|
|
5
|
+
if (!apiKey)
|
|
6
|
+
throw new Error('Google Gemini requires a Developer API key.');
|
|
7
|
+
return { kind: 'developer', apiKey };
|
|
8
|
+
}
|
|
9
|
+
const project = config.getOptionalString('ai.vertex.project')?.trim();
|
|
10
|
+
const location = config.getOptionalString('ai.vertex.location')?.trim();
|
|
11
|
+
if (!project || !location)
|
|
12
|
+
throw new Error('Vertex AI requires a Google Cloud project and location.');
|
|
13
|
+
return { kind: 'vertex', project, location, stagingBucket: config.getOptionalString('ai.vertex.stagingBucket')?.trim() || undefined };
|
|
14
|
+
}
|
|
15
|
+
export function createGoogleGenAiClient(connection, options) {
|
|
16
|
+
// Explicit selection lets both routes coexist even when the SDK's environment flags are set.
|
|
17
|
+
return new GoogleGenAI(connection.kind === 'developer'
|
|
18
|
+
? { ...options, enterprise: false, apiKey: connection.apiKey }
|
|
19
|
+
: { ...options, enterprise: true, project: connection.project, location: connection.location });
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=GoogleGenAiConnection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoogleGenAiConnection.js","sourceRoot":"","sources":["../../../../../../src/core/infrastructure/ai/google/GoogleGenAiConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA2B,MAAM,eAAe,CAAC;AAQrE,MAAM,UAAU,qBAAqB,CACnC,MAAgD,EAChD,QAA6B;IAE7B,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAG,MAAM,CAAC,iBAAiB,CAAC,gCAAgC,CAAC,EAAE,IAAI,EAAE,CAAC;QAClF,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QAC5E,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;IACvC,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,EAAE,IAAI,EAAE,CAAC;IACtE,MAAM,QAAQ,GAAG,MAAM,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,EAAE,IAAI,EAAE,CAAC;IACxE,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IACtG,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS,EAAE,CAAC;AACxI,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,UAAiC,EACjC,OAAiD;IAEjD,6FAA6F;IAC7F,OAAO,IAAI,WAAW,CAAC,UAAU,CAAC,IAAI,KAAK,WAAW;QACpD,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE;QAC9D,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;AACpG,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ConfigService } from '@gaia-framework/config';
|
|
2
|
+
import { type ImageEditModelInfo } from '../../../../domain/models/images/ImageEditing.js';
|
|
3
|
+
import type { GenerateImageParams, ImageGenerationProvider } from '../../../../domain/ports/ai/images/ImageGenerationProvider.js';
|
|
4
|
+
import type { ImageEditingProvider } from '../../../../domain/ports/ai/images/ImageEditingProvider.js';
|
|
5
|
+
export declare class QwenImageGenerationProvider implements ImageGenerationProvider {
|
|
6
|
+
private readonly config;
|
|
7
|
+
readonly id = "alibaba";
|
|
8
|
+
constructor(config: ConfigService);
|
|
9
|
+
getModels(): {
|
|
10
|
+
id: string;
|
|
11
|
+
providerModel: string;
|
|
12
|
+
provider: string;
|
|
13
|
+
displayName: string;
|
|
14
|
+
type: "image";
|
|
15
|
+
capabilities: {
|
|
16
|
+
outputFormats: string[];
|
|
17
|
+
sizes: readonly ["auto", "1024x1024", "1536x1024", "1024x1536"];
|
|
18
|
+
maxOutputImages: number;
|
|
19
|
+
customSize: {
|
|
20
|
+
multiple: number;
|
|
21
|
+
maxEdge: number;
|
|
22
|
+
minPixels: number;
|
|
23
|
+
maxPixels: number;
|
|
24
|
+
maxAspectRatio: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}[];
|
|
28
|
+
generateImages(input: GenerateImageParams): Promise<string[]>;
|
|
29
|
+
}
|
|
30
|
+
export declare class QwenImageEditingProvider implements ImageEditingProvider {
|
|
31
|
+
private readonly config;
|
|
32
|
+
constructor(config: ConfigService);
|
|
33
|
+
getModels(): ImageEditModelInfo[];
|
|
34
|
+
editImages(input: Parameters<ImageEditingProvider['editImages']>[0]): Promise<import("../../../../domain/ports/ai/images/ImageEditingProvider.js").ImageEditBytes[]>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=QwenImageProviders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QwenImageProviders.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/images/alibaba/QwenImageProviders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAMvD,OAAO,EAAqC,KAAK,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AAI9H,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,+DAA+D,CAAC;AAClI,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAkCvG,qBACa,2BAA4B,YAAW,uBAAuB;IAE5B,OAAO,CAAC,QAAQ,CAAC,MAAM;IADpE,QAAQ,CAAC,EAAE,aAAa;gBACsC,MAAM,EAAE,aAAa;IACnF,SAAS;;;;;;;;;;;;;;;;;;;IAIH,cAAc,CAAC,KAAK,EAAE,mBAAmB;CAUhD;AAED,qBACa,wBAAyB,YAAW,oBAAoB;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IACnF,SAAS;IACH,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;CAa1E"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { ConfigService } from '@gaia-framework/config';
|
|
14
|
+
import { inject, injectable } from 'inversify';
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
import CoreTypes from '../../../di/types.js';
|
|
17
|
+
import { alibabaWorkspace } from '../../alibaba/AlibabaWorkspace.js';
|
|
18
|
+
import { boundedImageFetch, decodeImageOutput } from '../ImageOutputBytes.js';
|
|
19
|
+
import { ImageEditingError, imageEditSizes } from '../../../../domain/models/images/ImageEditing.js';
|
|
20
|
+
import { validateImageSize } from '../../../../domain/models/images/ImageOutputOptions.js';
|
|
21
|
+
import { validateGenerationOutputOptions } from '../../../../domain/services/media/ImageGenerationOptionsPolicy.js';
|
|
22
|
+
import { validateImageEditOptions } from '../../../../domain/services/media/ImageEditPolicy.js';
|
|
23
|
+
const modelId = 'alibaba/qwen-image-3.0';
|
|
24
|
+
const capabilities = { outputFormats: ['png'], sizes: imageEditSizes, maxOutputImages: 1,
|
|
25
|
+
customSize: { multiple: 1, maxEdge: 5792, minPixels: 512 ** 2, maxPixels: 2048 ** 2, maxAspectRatio: 8 } };
|
|
26
|
+
const editor = {
|
|
27
|
+
id: modelId, provider: 'alibaba', displayName: 'Qwen Image 3.0', sizes: imageEditSizes,
|
|
28
|
+
sizeBehavior: 'dimensions', supportsMask: false, maxInputImages: 3, maxOutputImages: 1,
|
|
29
|
+
inputFormats: ['image/png', 'image/jpeg', 'image/webp'], capabilities,
|
|
30
|
+
};
|
|
31
|
+
const imageResponse = z.object({ data: z.tuple([z.object({ b64_json: z.string() })]) });
|
|
32
|
+
const invalid = () => new ImageEditingError('image_edit_invalid_output', 'Alibaba returned invalid image data.', 502);
|
|
33
|
+
async function requestImage(config, prompt, size, signal, images) {
|
|
34
|
+
const workspace = alibabaWorkspace(config, 'images');
|
|
35
|
+
if (!workspace)
|
|
36
|
+
throw new ImageEditingError('image_edit_unavailable', 'Alibaba image generation is disabled.', 503);
|
|
37
|
+
const timeout = AbortSignal.timeout(180_000);
|
|
38
|
+
const abortSignal = signal ? AbortSignal.any([signal, timeout]) : timeout;
|
|
39
|
+
const response = await boundedImageFetch(invalid)(workspace.baseURL + '/images/generations', {
|
|
40
|
+
method: 'POST', signal: abortSignal, redirect: 'error',
|
|
41
|
+
headers: { Authorization: 'Bearer ' + workspace.apiKey, 'Content-Type': 'application/json' },
|
|
42
|
+
body: JSON.stringify({ model: 'qwen-image-3.0', prompt, size, n: 1, response_format: 'b64_json', image: images }),
|
|
43
|
+
});
|
|
44
|
+
if (!response.ok) {
|
|
45
|
+
await response.body?.cancel();
|
|
46
|
+
throw new ImageEditingError('image_edit_provider_rejected', 'Alibaba rejected the image request (HTTP ' + response.status + ').', response.status);
|
|
47
|
+
}
|
|
48
|
+
const result = imageResponse.safeParse(await response.json());
|
|
49
|
+
if (!result.success)
|
|
50
|
+
throw invalid();
|
|
51
|
+
const bytes = await decodeImageOutput(result.data.data[0].b64_json, 'png', invalid);
|
|
52
|
+
abortSignal.throwIfAborted();
|
|
53
|
+
return bytes;
|
|
54
|
+
}
|
|
55
|
+
let QwenImageGenerationProvider = class QwenImageGenerationProvider {
|
|
56
|
+
config;
|
|
57
|
+
id = 'alibaba';
|
|
58
|
+
constructor(config) {
|
|
59
|
+
this.config = config;
|
|
60
|
+
}
|
|
61
|
+
getModels() {
|
|
62
|
+
return alibabaWorkspace(this.config, 'images') ? [{ id: modelId, providerModel: 'qwen-image-3.0', provider: 'Alibaba Cloud',
|
|
63
|
+
displayName: editor.displayName, type: 'image', capabilities }] : [];
|
|
64
|
+
}
|
|
65
|
+
async generateImages(input) {
|
|
66
|
+
if ((input.model ?? modelId) !== modelId || (input.numberOfImages ?? 1) !== 1 || !input.prompt.trim()) {
|
|
67
|
+
throw new Error('Select Qwen Image 3.0 and provide a prompt for one image.');
|
|
68
|
+
}
|
|
69
|
+
validateGenerationOutputOptions(input, capabilities);
|
|
70
|
+
const size = input.size ?? 'auto';
|
|
71
|
+
validateImageSize(size, imageEditSizes, capabilities.customSize);
|
|
72
|
+
const image = await requestImage(this.config, input.prompt, size, input.abortSignal);
|
|
73
|
+
return ['data:image/png;base64,' + image.data.toString('base64')];
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
QwenImageGenerationProvider = __decorate([
|
|
77
|
+
injectable(),
|
|
78
|
+
__param(0, inject(CoreTypes.ConfigService)),
|
|
79
|
+
__metadata("design:paramtypes", [ConfigService])
|
|
80
|
+
], QwenImageGenerationProvider);
|
|
81
|
+
export { QwenImageGenerationProvider };
|
|
82
|
+
let QwenImageEditingProvider = class QwenImageEditingProvider {
|
|
83
|
+
config;
|
|
84
|
+
constructor(config) {
|
|
85
|
+
this.config = config;
|
|
86
|
+
}
|
|
87
|
+
getModels() { return alibabaWorkspace(this.config, 'images') ? [editor] : []; }
|
|
88
|
+
async editImages(input) {
|
|
89
|
+
validateImageEditOptions(input, editor);
|
|
90
|
+
if (input.model !== modelId || input.mask || input.numberOfImages !== 1 || !input.images.length || input.images.length > 3) {
|
|
91
|
+
throw new ImageEditingError('image_edit_invalid_request', 'Qwen Image 3.0 accepts one to three references and returns one unmasked edit.');
|
|
92
|
+
}
|
|
93
|
+
const images = input.images.map(image => {
|
|
94
|
+
if (!editor.inputFormats.includes(image.mimeType) || !image.data.length || image.data.length > 10_000_000) {
|
|
95
|
+
throw new ImageEditingError('image_edit_invalid_request', 'Qwen accepts JPEG, PNG or WebP references up to 10 MB each.');
|
|
96
|
+
}
|
|
97
|
+
return 'data:' + image.mimeType + ';base64,' + image.data.toString('base64');
|
|
98
|
+
});
|
|
99
|
+
return [await requestImage(this.config, input.prompt, input.size, input.abortSignal, images)];
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
QwenImageEditingProvider = __decorate([
|
|
103
|
+
injectable(),
|
|
104
|
+
__param(0, inject(CoreTypes.ConfigService)),
|
|
105
|
+
__metadata("design:paramtypes", [ConfigService])
|
|
106
|
+
], QwenImageEditingProvider);
|
|
107
|
+
export { QwenImageEditingProvider };
|
|
108
|
+
//# sourceMappingURL=QwenImageProviders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QwenImageProviders.js","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/images/alibaba/QwenImageProviders.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAA2B,MAAM,kDAAkD,CAAC;AAC9H,OAAO,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAC3F,OAAO,EAAE,+BAA+B,EAAE,MAAM,mEAAmE,CAAC;AACpH,OAAO,EAAE,wBAAwB,EAAE,MAAM,sDAAsD,CAAC;AAIhG,MAAM,OAAO,GAAG,wBAAwB,CAAC;AACzC,MAAM,YAAY,GAAG,EAAE,aAAa,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;IACtF,UAAU,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,IAAI,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,EAAE,CAAC;AAC7G,MAAM,MAAM,GAAuB;IACjC,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc;IACtF,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC;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Ac,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3H,MAAM,IAAI,iBAAiB,CAAC,4BAA4B,EAAE,+EAA+E,CAAC,CAAC;QAC7I,CAAC;QACD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;YACtC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;gBAC1G,MAAM,IAAI,iBAAiB,CAAC,4BAA4B,EAAE,6DAA6D,CAAC,CAAC;YAC3H,CAAC;YACD,OAAO,OAAO,GAAG,KAAK,CAAC,QAAQ,GAAG,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC/E,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,MAAM,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IAChG,CAAC;CACF,CAAA;AAhBY,wBAAwB;IADpC,UAAU,EAAE;IAEE,WAAA,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;qCAA0B,aAAa;GADxE,wBAAwB,CAgBpC"}
|
|
@@ -2,10 +2,10 @@ import { ConfigService } from "@gaia-framework/config";
|
|
|
2
2
|
import { ImageGenerationModelInfo } from "../../../../domain/models/images/ImageGenerationModelInfo.js";
|
|
3
3
|
import { GenerateImageParams, ImageGenerationProvider } from "../../../../domain/ports/ai/images/ImageGenerationProvider.js";
|
|
4
4
|
export declare class GoogleAIImageGenerationProvider implements ImageGenerationProvider {
|
|
5
|
-
|
|
6
|
-
readonly id = "google";
|
|
5
|
+
readonly id: "google" | "vertex";
|
|
7
6
|
private readonly ai;
|
|
8
|
-
|
|
7
|
+
private readonly availableModels;
|
|
8
|
+
constructor(configService: ConfigService, id?: "google" | "vertex");
|
|
9
9
|
generateImages(params: GenerateImageParams): Promise<string[]>;
|
|
10
10
|
getModels(): ImageGenerationModelInfo[];
|
|
11
11
|
}
|
package/build/src/core/infrastructure/ai/images/google/GoogleAIImageGenerationProvider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleAIImageGenerationProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/images/google/GoogleAIImageGenerationProvider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8DAA8D,CAAC;AACxG,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,+DAA+D,CAAC;
|
|
1
|
+
{"version":3,"file":"GoogleAIImageGenerationProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/images/google/GoogleAIImageGenerationProvider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8DAA8D,CAAC;AACxG,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,+DAA+D,CAAC;AA8CvE,qBACa,+BAAgC,YAAW,uBAAuB;IAM3E,QAAQ,CAAC,EAAE,EAAE,QAAQ,GAAG,QAAQ;IALlC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAc;IACjC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA8B;gBAG3B,aAAa,EAAE,aAAa,EACpD,EAAE,GAAE,QAAQ,GAAG,QAAmB;IAevC,cAAc,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAwBpE,SAAS,IAAI,wBAAwB,EAAE;CASxC"}
|