@gaia-framework/backend-core 6.0.1 → 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 +79 -0
- package/README.md +1 -1
- package/build/openapi/openapi.json +1596 -132
- package/build/openapi/openapi.yaml +1092 -102
- 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/VoiceMediaConfig.d.ts +1 -0
- package/build/src/config/VoiceMediaConfig.d.ts.map +1 -1
- package/build/src/config/VoiceMediaConfig.js +5 -0
- package/build/src/config/VoiceMediaConfig.js.map +1 -1
- package/build/src/config/schema.d.ts +106 -7
- package/build/src/config/schema.d.ts.map +1 -1
- package/build/src/config/schema.js +79 -7
- 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/dtos/messages/responses/MessageDto.d.ts +2 -1
- package/build/src/core/application/dtos/messages/responses/MessageDto.d.ts.map +1 -1
- package/build/src/core/application/dtos/runs/CreateRunRequestDto.d.ts +2 -0
- package/build/src/core/application/dtos/runs/CreateRunRequestDto.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/mappers/messages/MessageMapper.d.ts.map +1 -1
- package/build/src/core/application/mappers/messages/MessageMapper.js +2 -0
- package/build/src/core/application/mappers/messages/MessageMapper.js.map +1 -1
- package/build/src/core/application/services/media/DefaultContentMediaService.d.ts +1 -1
- package/build/src/core/application/services/media/DefaultContentMediaService.d.ts.map +1 -1
- package/build/src/core/application/services/media/DefaultContentMediaService.js +48 -15
- package/build/src/core/application/services/media/DefaultContentMediaService.js.map +1 -1
- package/build/src/core/application/services/media/ImageAppServiceImpl.js +1 -1
- package/build/src/core/application/services/media/ImageAppServiceImpl.js.map +1 -1
- package/build/src/core/application/services/media/ImageEditingAppService.d.ts +7 -1
- package/build/src/core/application/services/media/ImageEditingAppService.d.ts.map +1 -1
- package/build/src/core/application/services/media/ImageEditingAppServiceImpl.d.ts +6 -1
- package/build/src/core/application/services/media/ImageEditingAppServiceImpl.d.ts.map +1 -1
- package/build/src/core/application/services/media/ImageEditingAppServiceImpl.js +59 -5
- package/build/src/core/application/services/media/ImageEditingAppServiceImpl.js.map +1 -1
- package/build/src/core/application/services/media/SpeechAppService.d.ts +2 -1
- package/build/src/core/application/services/media/SpeechAppService.d.ts.map +1 -1
- package/build/src/core/application/services/media/SpeechAppServiceImpl.d.ts +1 -0
- package/build/src/core/application/services/media/SpeechAppServiceImpl.d.ts.map +1 -1
- package/build/src/core/application/services/media/SpeechAppServiceImpl.js +3 -0
- package/build/src/core/application/services/media/SpeechAppServiceImpl.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/realtime/RealtimeTranscriptSession.d.ts +3 -0
- package/build/src/core/application/services/realtime/RealtimeTranscriptSession.d.ts.map +1 -1
- package/build/src/core/application/services/realtime/RealtimeTranscriptSession.js +62 -0
- package/build/src/core/application/services/realtime/RealtimeTranscriptSession.js.map +1 -1
- package/build/src/core/application/services/runs/RunAppServiceImpl.d.ts +7 -3
- package/build/src/core/application/services/runs/RunAppServiceImpl.d.ts.map +1 -1
- package/build/src/core/application/services/runs/RunAppServiceImpl.js +79 -17
- package/build/src/core/application/services/runs/RunAppServiceImpl.js.map +1 -1
- package/build/src/core/application/services/runs/RunExecutionSessionFactoryImpl.js +1 -1
- package/build/src/core/application/services/runs/RunExecutionSessionFactoryImpl.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/intake/VoiceTranscriptService.d.ts +1 -1
- package/build/src/core/application/services/voice/intake/VoiceTranscriptService.d.ts.map +1 -1
- package/build/src/core/application/services/voice/intake/VoiceTranscriptService.js +17 -14
- package/build/src/core/application/services/voice/intake/VoiceTranscriptService.js.map +1 -1
- package/build/src/core/application/services/voice/review/VoiceReviewInput.d.ts +1 -0
- package/build/src/core/application/services/voice/review/VoiceReviewInput.d.ts.map +1 -1
- package/build/src/core/application/services/voice/session/ActiveVoiceSession.d.ts +2 -0
- package/build/src/core/application/services/voice/session/ActiveVoiceSession.d.ts.map +1 -1
- package/build/src/core/application/services/voice/session/ActiveVoiceSession.js +37 -12
- package/build/src/core/application/services/voice/session/ActiveVoiceSession.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/application/services/voice/session/VoiceSessionAppService.js +1 -1
- package/build/src/core/application/services/voice/session/VoiceSessionAppService.js.map +1 -1
- package/build/src/core/domain/factories/speech/SpeechProviderFactory.d.ts +1 -0
- package/build/src/core/domain/factories/speech/SpeechProviderFactory.d.ts.map +1 -1
- package/build/src/core/domain/factories/speech/SpeechProviderFactory.js +3 -0
- package/build/src/core/domain/factories/speech/SpeechProviderFactory.js.map +1 -1
- package/build/src/core/domain/models/images/ImageEditing.d.ts +9 -0
- package/build/src/core/domain/models/images/ImageEditing.d.ts.map +1 -1
- package/build/src/core/domain/models/images/ImageEditing.js +2 -1
- package/build/src/core/domain/models/images/ImageEditing.js.map +1 -1
- package/build/src/core/domain/models/images/ImageOutputOptions.js +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/messages/Message.d.ts +8 -0
- package/build/src/core/domain/models/messages/Message.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/RealtimeTranslationLanguage.d.ts +10 -0
- package/build/src/core/domain/models/speech/RealtimeTranslationLanguage.d.ts.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/tools/ToolExecutionContext.d.ts +2 -0
- package/build/src/core/domain/models/tools/ToolExecutionContext.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/models/voice/VoiceSession.d.ts +2 -0
- package/build/src/core/domain/models/voice/VoiceSession.d.ts.map +1 -1
- package/build/src/core/domain/params/chat/LLMExecutionRequest.d.ts +2 -0
- package/build/src/core/domain/params/chat/LLMExecutionRequest.d.ts.map +1 -1
- package/build/src/core/domain/ports/ai/images/ImageEditingProvider.d.ts +2 -0
- package/build/src/core/domain/ports/ai/images/ImageEditingProvider.d.ts.map +1 -1
- package/build/src/core/domain/ports/ai/llm/LLMProvider.d.ts +2 -0
- package/build/src/core/domain/ports/ai/llm/LLMProvider.d.ts.map +1 -1
- package/build/src/core/domain/ports/repositories/voice/VoiceSessionRepository.d.ts +3 -1
- package/build/src/core/domain/ports/repositories/voice/VoiceSessionRepository.d.ts.map +1 -1
- package/build/src/core/domain/ports/services/assurance/AssuranceEvaluationService.d.ts +1 -1
- package/build/src/core/domain/ports/services/assurance/AssuranceEvaluationService.d.ts.map +1 -1
- package/build/src/core/domain/ports/services/media/RemoteMediaFetcher.d.ts +1 -0
- package/build/src/core/domain/ports/services/media/RemoteMediaFetcher.d.ts.map +1 -1
- package/build/src/core/domain/ports/speech/RealtimeTranslationProvider.d.ts +2 -1
- package/build/src/core/domain/ports/speech/RealtimeTranslationProvider.d.ts.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 +20 -5
- 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/ImageEditPolicy.d.ts +14 -1
- package/build/src/core/domain/services/media/ImageEditPolicy.d.ts.map +1 -1
- package/build/src/core/domain/services/media/ImageEditPolicy.js +54 -4
- package/build/src/core/domain/services/media/ImageEditPolicy.js.map +1 -1
- package/build/src/core/domain/services/media/SpeechService.d.ts +2 -1
- package/build/src/core/domain/services/media/SpeechService.d.ts.map +1 -1
- package/build/src/core/domain/services/media/SpeechServiceImpl.d.ts +1 -0
- package/build/src/core/domain/services/media/SpeechServiceImpl.d.ts.map +1 -1
- package/build/src/core/domain/services/media/SpeechServiceImpl.js +3 -0
- package/build/src/core/domain/services/media/SpeechServiceImpl.js.map +1 -1
- 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 +1 -0
- package/build/src/core/domain/services/models/ModelServiceImpl.d.ts.map +1 -1
- package/build/src/core/domain/services/models/ModelServiceImpl.js +33 -32
- package/build/src/core/domain/services/models/ModelServiceImpl.js.map +1 -1
- package/build/src/core/domain/services/runs/NativeRunEngine.d.ts.map +1 -1
- package/build/src/core/domain/services/runs/NativeRunEngine.js +6 -1
- package/build/src/core/domain/services/runs/NativeRunEngine.js.map +1 -1
- package/build/src/core/domain/services/runs/RunEngine.d.ts +2 -0
- package/build/src/core/domain/services/runs/RunEngine.d.ts.map +1 -1
- package/build/src/core/domain/services/runs/RunToolApprovalProviderCapability.d.ts +2 -0
- package/build/src/core/domain/services/runs/RunToolApprovalProviderCapability.d.ts.map +1 -1
- package/build/src/core/domain/services/runs/RunToolApprovalProviderCapability.js +10 -4
- package/build/src/core/domain/services/runs/RunToolApprovalProviderCapability.js.map +1 -1
- package/build/src/core/domain/services/tools/ToolExecutionContextPolicy.d.ts +1 -0
- package/build/src/core/domain/services/tools/ToolExecutionContextPolicy.d.ts.map +1 -1
- package/build/src/core/domain/services/tools/ToolExecutionContextPolicy.js +1 -0
- package/build/src/core/domain/services/tools/ToolExecutionContextPolicy.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/AnimatedPngFixture.test-support.d.ts +2 -0
- package/build/src/core/infrastructure/ai/images/AnimatedPngFixture.test-support.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/images/AnimatedPngFixture.test-support.js +5 -0
- package/build/src/core/infrastructure/ai/images/AnimatedPngFixture.test-support.js.map +1 -0
- package/build/src/core/infrastructure/ai/images/ImageOutputBytes.d.ts +1 -0
- package/build/src/core/infrastructure/ai/images/ImageOutputBytes.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/images/ImageOutputBytes.js +9 -3
- package/build/src/core/infrastructure/ai/images/ImageOutputBytes.js.map +1 -1
- 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/blackforestlabs/BlackForestLabsImageClient.d.ts +20 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageClient.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageClient.js +52 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageClient.js.map +1 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageEditingProvider.d.ts +13 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageEditingProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageEditingProvider.js +137 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageEditingProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageGenerationProvider.d.ts +3 -37
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageGenerationProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageGenerationProvider.js +52 -208
- package/build/src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageGenerationProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/images/editing/OpenAICompatibleImageEditingProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/images/editing/OpenAICompatibleImageEditingProvider.js +11 -3
- package/build/src/core/infrastructure/ai/images/editing/OpenAICompatibleImageEditingProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/images/editing/OpenAIImageEditMask.d.ts +12 -0
- package/build/src/core/infrastructure/ai/images/editing/OpenAIImageEditMask.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/images/editing/OpenAIImageEditMask.js +39 -0
- package/build/src/core/infrastructure/ai/images/editing/OpenAIImageEditMask.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/openai/OpenAIImageModels.d.ts +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/base/realtime/NativeRealtimeApprovalStore.d.ts +32 -0
- package/build/src/core/infrastructure/ai/llm/base/realtime/NativeRealtimeApprovalStore.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/base/realtime/NativeRealtimeApprovalStore.js +80 -0
- package/build/src/core/infrastructure/ai/llm/base/realtime/NativeRealtimeApprovalStore.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/base/realtime/RealtimeToolInvocationBuilder.d.ts +23 -0
- package/build/src/core/infrastructure/ai/llm/base/realtime/RealtimeToolInvocationBuilder.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/base/realtime/RealtimeToolInvocationBuilder.js +66 -0
- package/build/src/core/infrastructure/ai/llm/base/realtime/RealtimeToolInvocationBuilder.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/azure/services/AzureFoundryService.d.ts +1 -1
- 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/cerebras/CerebrasConfig.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasConfig.js +11 -15
- package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasConfig.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasService.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasService.js +3 -5
- package/build/src/core/infrastructure/ai/llm/providers/cerebras/CerebrasService.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/foundry-local/FoundryLocalService.d.ts +2 -1
- package/build/src/core/infrastructure/ai/llm/providers/foundry-local/FoundryLocalService.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/foundry-local/FoundryLocalService.js +33 -38
- package/build/src/core/infrastructure/ai/llm/providers/foundry-local/FoundryLocalService.js.map +1 -1
- 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 -2
- 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 +4 -1
- 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 +10 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleLiveSocket.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleLiveSocket.js +48 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleLiveSocket.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeConfig.d.ts +9 -1
- 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 +21 -4
- 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 +11 -2
- 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 +72 -42
- 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 +8 -2
- 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 +72 -34
- 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/GoogleRealtimeSession.d.ts +14 -6
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeSession.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeSession.js +74 -28
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeSession.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolApprovals.d.ts +27 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolApprovals.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolApprovals.js +138 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolApprovals.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolContracts.d.ts +10 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolContracts.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolContracts.js +43 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeToolContracts.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeTranslationProvider.d.ts +49 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeTranslationProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeTranslationProvider.js +151 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/GoogleRealtimeTranslationProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/types.d.ts +9 -2
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/types.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/types.js +4 -1
- package/build/src/core/infrastructure/ai/llm/providers/google/realtime/types.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/local/LocalLLMChatProviderService.d.ts +2 -3
- package/build/src/core/infrastructure/ai/llm/providers/local/LocalLLMChatProviderService.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/local/LocalLLMChatProviderService.js +11 -7
- package/build/src/core/infrastructure/ai/llm/providers/local/LocalLLMChatProviderService.js.map +1 -1
- 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/mistral/MistralConfig.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralConfig.js +18 -13
- package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralConfig.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralService.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralService.js +16 -1
- package/build/src/core/infrastructure/ai/llm/providers/mistral/MistralService.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/ollama/OllamaCloudService.d.ts +40 -0
- package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaCloudService.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaCloudService.js +296 -0
- package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaCloudService.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaLLMProvider.d.ts +14 -4
- package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaLLMProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaLLMProvider.js +35 -5
- package/build/src/core/infrastructure/ai/llm/providers/ollama/OllamaLLMProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/chat-completions/OpenAIChatCompletionsService.d.ts +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveConfig.d.ts +5 -2
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveConfig.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveConfig.js +25 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveConfig.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveMediaProvider.js +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveMediaProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveProvider.js +6 -4
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptPlayback.d.ts +3 -4
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptPlayback.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptPlayback.js +13 -51
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptPlayback.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptSpeech.d.ts +4 -0
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptSpeech.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptSpeech.js +163 -0
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveReceiptSpeech.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcConnection.d.ts +9 -2
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcConnection.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcConnection.js +24 -9
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcConnection.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcEventMapper.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcEventMapper.js +4 -0
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAILiveRtcEventMapper.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAIRealtimeReceiptSpeech.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAIRealtimeReceiptSpeech.js +12 -4
- package/build/src/core/infrastructure/ai/llm/providers/openai/live/OpenAIRealtimeReceiptSpeech.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeDisplayContentBuilder.d.ts +3 -21
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeDisplayContentBuilder.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeDisplayContentBuilder.js +2 -64
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeDisplayContentBuilder.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeEventHandlerRegistry.d.ts +1 -5
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeEventHandlerRegistry.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeEventHandlerRegistry.js +12 -87
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeEventHandlerRegistry.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeTranslationProvider.d.ts +11 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeTranslationProvider.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeTranslationProvider.js +73 -73
- package/build/src/core/infrastructure/ai/llm/providers/openai/realtime/OpenAIRealtimeTranslationProvider.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openai/responses/OpenAIResponsesApiService.d.ts +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/opencode/OpenCodeCatalog.d.ts +25 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeCatalog.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeCatalog.js +152 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeCatalog.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeLLMProvider.d.ts +22 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeLLMProvider.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeLLMProvider.js +54 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeLLMProvider.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeService.d.ts +31 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeService.d.ts.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeService.js +357 -0
- package/build/src/core/infrastructure/ai/llm/providers/opencode/OpenCodeService.js.map +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/openrouter/OpenRouterConfig.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openrouter/OpenRouterConfig.js +9 -16
- package/build/src/core/infrastructure/ai/llm/providers/openrouter/OpenRouterConfig.js.map +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openrouter/OpenRouterService.js +1 -1
- package/build/src/core/infrastructure/ai/llm/providers/openrouter/OpenRouterService.js.map +1 -1
- 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/executors/FunctionToolExecutor.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/tools/executors/FunctionToolExecutor.js +1 -0
- package/build/src/core/infrastructure/ai/tools/executors/FunctionToolExecutor.js.map +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/images/ImageEditingTool.d.ts.map +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/images/ImageEditingTool.js +11 -3
- package/build/src/core/infrastructure/ai/tools/implementations/images/ImageEditingTool.js.map +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/images/ImageGenerationToolService.js +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/images/ImageGenerationToolService.js.map +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/images/ImageOutputToolProperties.d.ts +1 -1
- package/build/src/core/infrastructure/ai/tools/implementations/images/schemas.d.ts +4 -4
- package/build/src/core/infrastructure/ai/tools/implementations/images/schemas.js +3 -3
- 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/media/ImageEditingController.d.ts +2 -0
- package/build/src/core/infrastructure/api/v1/controllers/media/ImageEditingController.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/controllers/media/ImageEditingController.js +18 -6
- package/build/src/core/infrastructure/api/v1/controllers/media/ImageEditingController.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/controllers/media/SpeechController.d.ts +1 -0
- package/build/src/core/infrastructure/api/v1/controllers/media/SpeechController.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/controllers/media/SpeechController.js +3 -0
- package/build/src/core/infrastructure/api/v1/controllers/media/SpeechController.js.map +1 -1
- 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/openapi/coreSchemas.d.ts +32 -12
- package/build/src/core/infrastructure/api/v1/openapi/coreSchemas.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/openapi/coreSchemas.js +8 -8
- package/build/src/core/infrastructure/api/v1/openapi/coreSchemas.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/requests/images/ImageEditRequestSchema.d.ts +6 -1
- package/build/src/core/infrastructure/api/v1/requests/images/ImageEditRequestSchema.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/requests/images/ImageEditRequestSchema.js +8 -1
- package/build/src/core/infrastructure/api/v1/requests/images/ImageEditRequestSchema.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/requests/images/ImageGenerationRequestSchema.d.ts +1 -1
- package/build/src/core/infrastructure/api/v1/requests/images/ImageOutputOptionsSchema.d.ts +1 -1
- package/build/src/core/infrastructure/api/v1/requests/runs/CreateRunRequestSchema.d.ts +5 -0
- package/build/src/core/infrastructure/api/v1/requests/runs/CreateRunRequestSchema.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/requests/runs/CreateRunRequestSchema.js +5 -0
- package/build/src/core/infrastructure/api/v1/requests/runs/CreateRunRequestSchema.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/conversations/openapi/ConversationsRouter.openapi.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/conversations/openapi/ConversationsRouter.openapi.js +4 -1
- package/build/src/core/infrastructure/api/v1/routers/conversations/openapi/ConversationsRouter.openapi.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/audio/SpeechRouter.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/audio/SpeechRouter.js +1 -0
- package/build/src/core/infrastructure/api/v1/routers/media/audio/SpeechRouter.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 +16 -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/media/images/ImagesRouter.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.js +1 -0
- package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.openapi.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.openapi.js +11 -2
- package/build/src/core/infrastructure/api/v1/routers/media/images/ImagesRouter.openapi.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/live/openapi/VoiceSessionHttpSchemas.d.ts +1 -0
- package/build/src/core/infrastructure/api/v1/routers/media/live/openapi/VoiceSessionHttpSchemas.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/live/openapi/VoiceSessionHttpSchemas.js +1 -0
- package/build/src/core/infrastructure/api/v1/routers/media/live/openapi/VoiceSessionHttpSchemas.js.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/shared/openapi/MediaHttpExamples.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/media/shared/openapi/MediaHttpExamples.js +37 -25
- package/build/src/core/infrastructure/api/v1/routers/media/shared/openapi/MediaHttpExamples.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/DurableRunSchemas.openapi.d.ts +5 -0
- package/build/src/core/infrastructure/api/v1/routers/runs/openapi/DurableRunSchemas.openapi.d.ts.map +1 -1
- package/build/src/core/infrastructure/api/v1/routers/runs/openapi/RunsRouter.openapi.d.ts +24 -9
- package/build/src/core/infrastructure/api/v1/routers/runs/openapi/RunsRouter.openapi.d.ts.map +1 -1
- 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 +21 -5
- 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 +67 -9
- package/build/src/core/infrastructure/di/index.js.map +1 -1
- package/build/src/core/infrastructure/di/types.d.ts +4 -1
- package/build/src/core/infrastructure/di/types.d.ts.map +1 -1
- package/build/src/core/infrastructure/di/types.js +4 -1
- 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/models/chat/completions/ChatCompletion.d.ts +1 -0
- package/build/src/core/infrastructure/models/chat/completions/ChatCompletion.d.ts.map +1 -1
- package/build/src/core/infrastructure/models/chat/completions/ChatCompletionMessageCodec.d.ts +1 -0
- package/build/src/core/infrastructure/models/chat/completions/ChatCompletionMessageCodec.d.ts.map +1 -1
- package/build/src/core/infrastructure/models/chat/completions/ChatCompletionResponseValidator.d.ts +4 -1
- package/build/src/core/infrastructure/models/chat/completions/ChatCompletionResponseValidator.d.ts.map +1 -1
- package/build/src/core/infrastructure/models/chat/completions/ChatCompletionResponseValidator.js +16 -14
- package/build/src/core/infrastructure/models/chat/completions/ChatCompletionResponseValidator.js.map +1 -1
- package/build/src/core/infrastructure/models/chat/completions/FetchChatCompletionResponse.d.ts +2 -1
- package/build/src/core/infrastructure/models/chat/completions/FetchChatCompletionResponse.d.ts.map +1 -1
- package/build/src/core/infrastructure/models/chat/completions/FetchChatCompletionResponse.js +2 -2
- package/build/src/core/infrastructure/models/chat/completions/FetchChatCompletionResponse.js.map +1 -1
- package/build/src/core/infrastructure/models/chat/completions/OpenAICompatibleChatCompletionProtocol.d.ts +3 -1
- package/build/src/core/infrastructure/models/chat/completions/OpenAICompatibleChatCompletionProtocol.d.ts.map +1 -1
- package/build/src/core/infrastructure/models/chat/completions/OpenAICompatibleChatCompletionProtocol.js +4 -1
- package/build/src/core/infrastructure/models/chat/completions/OpenAICompatibleChatCompletionProtocol.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/persistence/repositories/media/KnexMediaReferenceRecorder.d.ts.map +1 -1
- package/build/src/core/infrastructure/persistence/repositories/media/KnexMediaReferenceRecorder.js +13 -0
- package/build/src/core/infrastructure/persistence/repositories/media/KnexMediaReferenceRecorder.js.map +1 -1
- package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceMediaLease.d.ts.map +1 -1
- package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceMediaLease.js +2 -1
- package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceMediaLease.js.map +1 -1
- package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceSessionRepository.d.ts +4 -2
- package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceSessionRepository.d.ts.map +1 -1
- package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceSessionRepository.js +28 -11
- package/build/src/core/infrastructure/persistence/repositories/voice/KnexVoiceSessionRepository.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/ChatCompletionStreamService.d.ts.map +1 -1
- package/build/src/core/infrastructure/services/chat/ChatCompletionStreamService.js +2 -0
- package/build/src/core/infrastructure/services/chat/ChatCompletionStreamService.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/media/ImageEditInputServiceImpl.d.ts +1 -0
- package/build/src/core/infrastructure/services/media/ImageEditInputServiceImpl.d.ts.map +1 -1
- package/build/src/core/infrastructure/services/media/ImageEditInputServiceImpl.js +44 -0
- package/build/src/core/infrastructure/services/media/ImageEditInputServiceImpl.js.map +1 -1
- package/build/src/core/infrastructure/services/media/PngAnimation.d.ts +3 -0
- package/build/src/core/infrastructure/services/media/PngAnimation.d.ts.map +1 -0
- package/build/src/core/infrastructure/services/media/PngAnimation.js +12 -0
- package/build/src/core/infrastructure/services/media/PngAnimation.js.map +1 -0
- package/build/src/core/infrastructure/services/media/SafeHttpRemoteMediaFetcher.d.ts +2 -0
- package/build/src/core/infrastructure/services/media/SafeHttpRemoteMediaFetcher.d.ts.map +1 -1
- package/build/src/core/infrastructure/services/media/SafeHttpRemoteMediaFetcher.js +19 -3
- package/build/src/core/infrastructure/services/media/SafeHttpRemoteMediaFetcher.js.map +1 -1
- package/build/src/core/infrastructure/services/runs/approval/DefaultRunApprovalService.d.ts +0 -2
- package/build/src/core/infrastructure/services/runs/approval/DefaultRunApprovalService.d.ts.map +1 -1
- package/build/src/core/infrastructure/services/runs/approval/DefaultRunApprovalService.js +19 -26
- package/build/src/core/infrastructure/services/runs/approval/DefaultRunApprovalService.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/core/infrastructure/services/runs/approval/resolveToolApprovalPolicy.d.ts +8 -0
- package/build/src/core/infrastructure/services/runs/approval/resolveToolApprovalPolicy.d.ts.map +1 -0
- package/build/src/core/infrastructure/services/runs/approval/resolveToolApprovalPolicy.js +18 -0
- package/build/src/core/infrastructure/services/runs/approval/resolveToolApprovalPolicy.js.map +1 -0
- package/build/src/core/infrastructure/services/security/AssuranceEvaluationServiceImpl.d.ts +2 -1
- package/build/src/core/infrastructure/services/security/AssuranceEvaluationServiceImpl.d.ts.map +1 -1
- package/build/src/core/infrastructure/services/security/AssuranceEvaluationServiceImpl.js +23 -18
- package/build/src/core/infrastructure/services/security/AssuranceEvaluationServiceImpl.js.map +1 -1
- package/build/src/core/infrastructure/services/voice/media/VoiceMediaWorkerSession.d.ts +1 -1
- package/build/src/core/infrastructure/services/voice/media/VoiceMediaWorkerSession.d.ts.map +1 -1
- package/build/src/core/infrastructure/services/voice/media/VoiceMediaWorkerSession.js +2 -1
- package/build/src/core/infrastructure/services/voice/media/VoiceMediaWorkerSession.js.map +1 -1
- package/build/src/infrastructure/api/openapi/root.openapi.js +1 -1
- package/build/src/infrastructure/api/openapi/root.openapi.js.map +1 -1
- package/build/src/infrastructure/server/cors.d.ts.map +1 -1
- package/build/src/infrastructure/server/cors.js +0 -1
- package/build/src/infrastructure/server/cors.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/infrastructure/websockets/commands/realtime/WebsocketRealtimeTranslationCommand.d.ts.map +1 -1
- package/build/src/infrastructure/websockets/commands/realtime/WebsocketRealtimeTranslationCommand.js +18 -7
- package/build/src/infrastructure/websockets/commands/realtime/WebsocketRealtimeTranslationCommand.js.map +1 -1
- package/build/src/infrastructure/websockets/mediators/WebsocketMediator.d.ts +1 -0
- package/build/src/infrastructure/websockets/mediators/WebsocketMediator.d.ts.map +1 -1
- package/build/src/infrastructure/websockets/mediators/WebsocketMediator.js +20 -1
- package/build/src/infrastructure/websockets/mediators/WebsocketMediator.js.map +1 -1
- package/build/src/infrastructure/workers/voice/startVoiceMediaHostFromContainer.d.ts.map +1 -1
- package/build/src/infrastructure/workers/voice/startVoiceMediaHostFromContainer.js +4 -1
- package/build/src/infrastructure/workers/voice/startVoiceMediaHostFromContainer.js.map +1 -1
- package/build/src/modules/admin/infrastructure/api/v1/AdminController.d.ts +2 -0
- package/build/src/modules/admin/infrastructure/api/v1/AdminController.d.ts.map +1 -1
- package/build/src/modules/admin/infrastructure/api/v1/AdminController.js +18 -3
- package/build/src/modules/admin/infrastructure/api/v1/AdminController.js.map +1 -1
- package/build/src/modules/admin/infrastructure/api/v1/AdminRouter.d.ts.map +1 -1
- package/build/src/modules/admin/infrastructure/api/v1/AdminRouter.js +1 -0
- package/build/src/modules/admin/infrastructure/api/v1/AdminRouter.js.map +1 -1
- package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminExamples.openapi.d.ts.map +1 -1
- package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminExamples.openapi.js +3 -0
- package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminExamples.openapi.js.map +1 -1
- package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminRouter.openapi.d.ts.map +1 -1
- package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminRouter.openapi.js +18 -0
- package/build/src/modules/admin/infrastructure/api/v1/openapi/AdminRouter.openapi.js.map +1 -1
- package/build/src/modules/code-review/infrastructure/auth/GitHubActionsWorkflowApprovalConfig.d.ts.map +1 -1
- package/build/src/modules/code-review/infrastructure/auth/GitHubActionsWorkflowApprovalConfig.js +17 -45
- package/build/src/modules/code-review/infrastructure/auth/GitHubActionsWorkflowApprovalConfig.js.map +1 -1
- package/build/src/modules/code-review/infrastructure/persistence/repositories/KnexCodeReviewRepository.d.ts.map +1 -1
- package/build/src/modules/code-review/infrastructure/persistence/repositories/KnexCodeReviewRepository.js +8 -2
- package/build/src/modules/code-review/infrastructure/persistence/repositories/KnexCodeReviewRepository.js.map +1 -1
- package/build/src/modules/workspaces/infrastructure/recovery/operator/authority/observer/ExecutionSources.js +1 -1
- package/package.json +4 -3
- package/resources/prompts/live-conversation.md +1 -0
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsConfig.d.ts +0 -3
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsConfig.d.ts.map +0 -1
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsConfig.js +0 -64
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsConfig.js.map +0 -1
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsLLMProvider.d.ts +0 -26
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsLLMProvider.d.ts.map +0 -1
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsLLMProvider.js +0 -121
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsLLMProvider.js.map +0 -1
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsService.d.ts +0 -18
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsService.d.ts.map +0 -1
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsService.js +0 -73
- package/build/src/core/infrastructure/ai/llm/providers/lambdalabs/LambdaLabsService.js.map +0 -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 -147
- package/build/src/core/infrastructure/ai/llm/providers/nvidia/NvidiaConfig.js.map +0 -1
|
@@ -0,0 +1,137 @@
|
|
|
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 sharp from 'sharp';
|
|
15
|
+
import { inject, injectable } from 'inversify';
|
|
16
|
+
import { ImageEditingError } from '../../../../domain/models/images/ImageEditing.js';
|
|
17
|
+
import { validateImageEditOptions } from '../../../../domain/services/media/ImageEditPolicy.js';
|
|
18
|
+
import CoreTypes from '../../../di/types.js';
|
|
19
|
+
import { validateImageOutputBytes } from '../ImageOutputBytes.js';
|
|
20
|
+
import { BlackForestLabsRequestError, flux31, flux31Capabilities, requestBflImage } from './BlackForestLabsImageClient.js';
|
|
21
|
+
const configPath = 'ai.images.providers.blackforestlabs';
|
|
22
|
+
const model = {
|
|
23
|
+
id: `bfl/${flux31}`, displayName: 'FLUX 3.1 Image', provider: 'bfl',
|
|
24
|
+
sizes: flux31Capabilities.sizes, sizeBehavior: 'dimensions', supportsMask: true,
|
|
25
|
+
inputFormats: ['image/jpeg', 'image/png', 'image/webp'], maxInputImages: 4, maxOutputImages: 1,
|
|
26
|
+
capabilities: { outputFormats: flux31Capabilities.outputFormats, customSize: flux31Capabilities.customSize },
|
|
27
|
+
};
|
|
28
|
+
let BlackForestLabsImageEditingProvider = class BlackForestLabsImageEditingProvider {
|
|
29
|
+
config;
|
|
30
|
+
mediaFetcher;
|
|
31
|
+
constructor(config, mediaFetcher) {
|
|
32
|
+
this.config = config;
|
|
33
|
+
this.mediaFetcher = mediaFetcher;
|
|
34
|
+
}
|
|
35
|
+
get apiKey() {
|
|
36
|
+
if (!this.config.getOptionalBoolean(`${configPath}.enabled`))
|
|
37
|
+
return undefined;
|
|
38
|
+
return this.config.getOptionalString(`${configPath}.apiKey`)?.trim();
|
|
39
|
+
}
|
|
40
|
+
getModels() {
|
|
41
|
+
return this.apiKey ? [model] : [];
|
|
42
|
+
}
|
|
43
|
+
async editImages(input) {
|
|
44
|
+
const apiKey = this.apiKey;
|
|
45
|
+
if (!apiKey || input.model !== model.id) {
|
|
46
|
+
throw new ImageEditingError('image_edit_unavailable', 'The selected image editor is unavailable.', 503);
|
|
47
|
+
}
|
|
48
|
+
validateImageEditOptions(input, model);
|
|
49
|
+
if (input.numberOfImages !== model.maxOutputImages || !input.images.length || input.images.length > model.maxInputImages) {
|
|
50
|
+
throw new ImageEditingError('image_edit_invalid_request', 'FLUX 3.1 edits one to four reference images and returns one image.');
|
|
51
|
+
}
|
|
52
|
+
if (input.images.some(image => !model.inputFormats.includes(image.mimeType) || !image.data.length || image.data.length > 20_000_000)) {
|
|
53
|
+
throw new ImageEditingError('image_edit_invalid_request', 'FLUX 3.1 accepts JPEG, PNG and WebP references up to 20 MB each.');
|
|
54
|
+
}
|
|
55
|
+
if (input.mask && (input.mask.mimeType !== 'image/png' || !input.mask.data.length || input.mask.data.length > 20_000_000)) {
|
|
56
|
+
throw new ImageEditingError('image_edit_invalid_request', 'FLUX 3.1 requires a PNG mask up to 20 MB.');
|
|
57
|
+
}
|
|
58
|
+
const { abortSignal } = input;
|
|
59
|
+
abortSignal.throwIfAborted();
|
|
60
|
+
const references = input.mask ? [await orientMaskTarget(input.images[0], abortSignal), ...input.images.slice(1)] : input.images;
|
|
61
|
+
const outputFormat = input.outputFormat ?? 'png';
|
|
62
|
+
const [width, height] = input.size.split('x').map(Number);
|
|
63
|
+
const body = {
|
|
64
|
+
prompt: input.prompt,
|
|
65
|
+
images: references.map(image => `data:${image.mimeType};base64,${image.data.toString('base64')}`),
|
|
66
|
+
...(input.mask ? { mask: `data:image/png;base64,${input.mask.data.toString('base64')}` } : {}),
|
|
67
|
+
...(input.size === 'auto' ? { aspect_ratio: 'match_first_image', resolution: 'match_first_image' } : { width, height }),
|
|
68
|
+
output_format: outputFormat,
|
|
69
|
+
};
|
|
70
|
+
let sample;
|
|
71
|
+
try {
|
|
72
|
+
sample = await requestBflImage(flux31, apiKey, body, abortSignal);
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
abortSignal.throwIfAborted();
|
|
76
|
+
throw editRequestFailure(error);
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
abortSignal.throwIfAborted();
|
|
80
|
+
if (new URL(sample).protocol !== 'https:')
|
|
81
|
+
throw invalidOutput();
|
|
82
|
+
const { buffer } = await this.mediaFetcher.fetch(sample, {
|
|
83
|
+
defaultMimeType: `image/${outputFormat}`, maximumBytes: 20_000_000, timeoutMs: 30_000, abortSignal,
|
|
84
|
+
});
|
|
85
|
+
abortSignal.throwIfAborted();
|
|
86
|
+
const image = await validateImageOutputBytes(buffer, outputFormat, invalidOutput, flux31Capabilities.customSize.maxPixels);
|
|
87
|
+
abortSignal.throwIfAborted();
|
|
88
|
+
return [image];
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
abortSignal.throwIfAborted();
|
|
92
|
+
throw invalidOutput();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
BlackForestLabsImageEditingProvider = __decorate([
|
|
97
|
+
injectable(),
|
|
98
|
+
__param(0, inject(CoreTypes.ConfigService)),
|
|
99
|
+
__param(1, inject(CoreTypes.RemoteMediaFetcher)),
|
|
100
|
+
__metadata("design:paramtypes", [ConfigService, Object])
|
|
101
|
+
], BlackForestLabsImageEditingProvider);
|
|
102
|
+
export { BlackForestLabsImageEditingProvider };
|
|
103
|
+
/** Keep the first source in the same display orientation as its painted pixels. */
|
|
104
|
+
async function orientMaskTarget(target, signal) {
|
|
105
|
+
try {
|
|
106
|
+
const decoder = sharp(target.data, { failOn: 'warning' });
|
|
107
|
+
const { orientation } = await decoder.metadata();
|
|
108
|
+
signal.throwIfAborted();
|
|
109
|
+
if (!orientation || orientation === 1)
|
|
110
|
+
return target;
|
|
111
|
+
const data = await decoder.autoOrient().png().toBuffer();
|
|
112
|
+
signal.throwIfAborted();
|
|
113
|
+
if (data.length <= 20_000_000)
|
|
114
|
+
return { data, mimeType: 'image/png' };
|
|
115
|
+
}
|
|
116
|
+
catch {
|
|
117
|
+
signal.throwIfAborted();
|
|
118
|
+
}
|
|
119
|
+
throw new ImageEditingError('image_edit_invalid_request', 'The oriented image must fit the FLUX 3.1 20 MB source limit.');
|
|
120
|
+
}
|
|
121
|
+
function editRequestFailure(error) {
|
|
122
|
+
if (error instanceof BlackForestLabsRequestError) {
|
|
123
|
+
if (error.reason === 'moderated')
|
|
124
|
+
return new ImageEditingError('image_edit_content_filtered', 'Black Forest Labs declined this edit under its content policy.');
|
|
125
|
+
if (error.reason === 401 || error.reason === 403)
|
|
126
|
+
return new ImageEditingError('image_edit_access_denied', 'Black Forest Labs denied access to the editor.', 502);
|
|
127
|
+
if (error.reason === 402 || error.reason === 429)
|
|
128
|
+
return new ImageEditingError('image_edit_rate_limited', 'Black Forest Labs is rate limited or has insufficient credits.', 429);
|
|
129
|
+
if (error.reason >= 400 && error.reason < 500)
|
|
130
|
+
return new ImageEditingError('image_edit_provider_rejected', 'Black Forest Labs rejected this edit request.');
|
|
131
|
+
}
|
|
132
|
+
return new ImageEditingError('image_edit_outcome_unknown', 'Black Forest Labs did not confirm the image edit. It was not automatically retried.', 502);
|
|
133
|
+
}
|
|
134
|
+
function invalidOutput() {
|
|
135
|
+
return new ImageEditingError('image_edit_invalid_output', 'Black Forest Labs did not return a usable image in the requested format.', 502);
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=BlackForestLabsImageEditingProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlackForestLabsImageEditingProvider.js","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageEditingProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAA2B,MAAM,kDAAkD,CAAC;AAG9G,OAAO,EAAE,wBAAwB,EAAE,MAAM,sDAAsD,CAAC;AAChG,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAE3H,MAAM,UAAU,GAAG,qCAAqC,CAAC;AACzD,MAAM,KAAK,GAAuB;IAChC,EAAE,EAAE,OAAO,MAAM,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE,QAAQ,EAAE,KAAK;IACnE,KAAK,EAAE,kBAAkB,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,IAAI;IAC/E,YAAY,EAAE,CA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,iBAAiB,CAAC,4BAA4B,EAAE,8DAA8D,CAAC,CAAC;AAC5H,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAc;IACxC,IAAI,KAAK,YAAY,2BAA2B,EAAE,CAAC;QACjD,IAAI,KAAK,CAAC,MAAM,KAAK,WAAW;YAAE,OAAO,IAAI,iBAAiB,CAAC,6BAA6B,EAAE,gEAAgE,CAAC,CAAC;QAChK,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG;YAAE,OAAO,IAAI,iBAAiB,CAAC,0BAA0B,EAAE,gDAAgD,EAAE,GAAG,CAAC,CAAC;QAClK,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG;YAAE,OAAO,IAAI,iBAAiB,CAAC,yBAAyB,EAAE,gEAAgE,EAAE,GAAG,CAAC,CAAC;QACjL,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,IAAI,KAAK,CAAC,MAAM,GAAG,GAAG;YAAE,OAAO,IAAI,iBAAiB,CAAC,8BAA8B,EAAE,+CAA+C,CAAC,CAAC;IAC/J,CAAC;IACD,OAAO,IAAI,iBAAiB,CAAC,4BAA4B,EAAE,qFAAqF,EAAE,GAAG,CAAC,CAAC;AACzJ,CAAC;AAED,SAAS,aAAa;IACpB,OAAO,IAAI,iBAAiB,CAAC,2BAA2B,EAAE,0EAA0E,EAAE,GAAG,CAAC,CAAC;AAC7I,CAAC"}
|
|
@@ -2,46 +2,12 @@ import { ImageGenerationModelInfo } from "../../../../domain/models/images/Image
|
|
|
2
2
|
import { GenerateImageParams, ImageGenerationProvider } from "../../../../domain/ports/ai/images/ImageGenerationProvider.js";
|
|
3
3
|
import { ConfigService } from "@gaia-framework/config";
|
|
4
4
|
export declare class BlackForestLabsImageGenerationProvider implements ImageGenerationProvider {
|
|
5
|
-
|
|
6
|
-
readonly id: string;
|
|
7
|
-
private readonly baseUrl;
|
|
5
|
+
readonly id = "bfl";
|
|
8
6
|
private readonly apiKey;
|
|
9
|
-
constructor(
|
|
10
|
-
/**
|
|
11
|
-
* Generates images given a prompt and a model.
|
|
12
|
-
* - This method:
|
|
13
|
-
* 1. Submits a generation task to the chosen endpoint.
|
|
14
|
-
* 2. Polls until the result is ready.
|
|
15
|
-
* 3. Returns the resulting images.
|
|
16
|
-
*
|
|
17
|
-
* @param prompt The prompt to use for image generation.
|
|
18
|
-
* @param model The model name
|
|
19
|
-
* @returns A promise that resolves to an array of image strings (e.g. base64).
|
|
20
|
-
*/
|
|
7
|
+
constructor(config: ConfigService);
|
|
21
8
|
generateImages(params: GenerateImageParams): Promise<string[]>;
|
|
22
|
-
|
|
23
|
-
* Determine the endpoint URL fragment based on the model.
|
|
24
|
-
*/
|
|
25
|
-
private getEndpointForModel;
|
|
26
|
-
/**
|
|
27
|
-
* Create a basic request body for each model type.
|
|
28
|
-
* You can enhance or customize these parameters as needed.
|
|
29
|
-
*/
|
|
9
|
+
private flux31Body;
|
|
30
10
|
private getRequestBodyForModel;
|
|
31
|
-
/**
|
|
32
|
-
* Submit a generation task and return the task ID.
|
|
33
|
-
*/
|
|
34
|
-
private submitTask;
|
|
35
|
-
/**
|
|
36
|
-
* Poll the get_result endpoint until we have a final status.
|
|
37
|
-
* Returns the final ResultResponse.
|
|
38
|
-
*/
|
|
39
|
-
private pollForResult;
|
|
40
|
-
/**
|
|
41
|
-
* Get the result of a task by ID.
|
|
42
|
-
*/
|
|
43
|
-
private getResult;
|
|
44
|
-
private delay;
|
|
45
11
|
getModels(): ImageGenerationModelInfo[];
|
|
46
12
|
}
|
|
47
13
|
//# sourceMappingURL=BlackForestLabsImageGenerationProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlackForestLabsImageGenerationProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageGenerationProvider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BlackForestLabsImageGenerationProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageGenerationProvider.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8DAA8D,CAAC;AACxG,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,+DAA+D,CAAC;AAC7H,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAYvD,qBACa,sCAAuC,YAAW,uBAAuB;IACpF,QAAQ,CAAC,EAAE,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;gBAEa,MAAM,EAAE,aAAa;IAI5D,cAAc,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAoBpE,OAAO,CAAC,UAAU;IAmBlB,OAAO,CAAC,sBAAsB;IAwD9B,SAAS,IAAI,wBAAwB,EAAE;CAMxC"}
|
|
@@ -10,91 +10,70 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
|
+
import { flux31, flux31Capabilities, requestBflImage } from "./BlackForestLabsImageClient.js";
|
|
14
|
+
import { AIExecutionFailure } from "../../../../domain/errors/AIExecutionFailure.js";
|
|
15
|
+
import { ImageOutputValidationError, validateImageSize } from "../../../../domain/models/images/ImageOutputOptions.js";
|
|
16
|
+
import { validateGenerationOutputOptions } from "../../../../domain/services/media/ImageGenerationOptionsPolicy.js";
|
|
13
17
|
import { inject, injectable } from "inversify";
|
|
14
18
|
import { ConfigService } from "@gaia-framework/config";
|
|
15
19
|
import CoreTypes from "../../../di/types.js";
|
|
20
|
+
const models = new Map([
|
|
21
|
+
[flux31, "FLUX 3.1 Image"],
|
|
22
|
+
["flux-pro-1.1", "Flux Pro 1.1"],
|
|
23
|
+
["flux-dev", "Flux Dev"],
|
|
24
|
+
["flux-pro-1.1-ultra", "Flux Pro 1.1 Ultra"],
|
|
25
|
+
["flux-2-pro", "Flux Pro 2.0 Pro"],
|
|
26
|
+
["flux-2-flex", "Flux Pro 2.0 Flex"],
|
|
27
|
+
]);
|
|
16
28
|
let BlackForestLabsImageGenerationProvider = class BlackForestLabsImageGenerationProvider {
|
|
17
|
-
configService;
|
|
18
29
|
id = "bfl";
|
|
19
|
-
baseUrl;
|
|
20
30
|
apiKey;
|
|
21
|
-
constructor(
|
|
22
|
-
this.
|
|
23
|
-
this.baseUrl = "https://api.bfl.ml";
|
|
24
|
-
this.apiKey = this.configService.getString('ai.images.providers.blackforestlabs.apiKey');
|
|
31
|
+
constructor(config) {
|
|
32
|
+
this.apiKey = config.getString("ai.images.providers.blackforestlabs.apiKey");
|
|
25
33
|
}
|
|
26
|
-
/**
|
|
27
|
-
* Generates images given a prompt and a model.
|
|
28
|
-
* - This method:
|
|
29
|
-
* 1. Submits a generation task to the chosen endpoint.
|
|
30
|
-
* 2. Polls until the result is ready.
|
|
31
|
-
* 3. Returns the resulting images.
|
|
32
|
-
*
|
|
33
|
-
* @param prompt The prompt to use for image generation.
|
|
34
|
-
* @param model The model name
|
|
35
|
-
* @returns A promise that resolves to an array of image strings (e.g. base64).
|
|
36
|
-
*/
|
|
37
34
|
async generateImages(params) {
|
|
38
|
-
const
|
|
39
|
-
if (!model.startsWith("bfl/")) {
|
|
40
|
-
throw new Error(`Unsupported model
|
|
35
|
+
const model = (params.model ?? "bfl/flux-2-pro").slice(4);
|
|
36
|
+
if ((params.model && !params.model.startsWith("bfl/")) || (!models.has(model) && model !== "flux-pro-1.0-fill")) {
|
|
37
|
+
throw new Error(`Unsupported Black Forest Labs model: ${params.model}`);
|
|
41
38
|
}
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
const body = model === flux31 ? this.flux31Body(params) : this.getRequestBodyForModel(model, params.prompt);
|
|
40
|
+
const timeout = AbortSignal.timeout(5 * 60 * 1000);
|
|
41
|
+
const signal = params.abortSignal ? AbortSignal.any([params.abortSignal, timeout]) : timeout;
|
|
42
|
+
try {
|
|
43
|
+
return [await requestBflImage(model, this.apiKey, body, signal)];
|
|
46
44
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
catch (error) {
|
|
46
|
+
if (params.abortSignal?.aborted)
|
|
47
|
+
throw new AIExecutionFailure({ code: "operation_cancelled", category: "cancelled",
|
|
48
|
+
statusCode: 499, retryable: false, message: "Image generation was cancelled." });
|
|
49
|
+
if (timeout.aborted)
|
|
50
|
+
throw new AIExecutionFailure({ code: "provider_timeout", category: "timeout",
|
|
51
|
+
statusCode: 504, retryable: false, message: "Black Forest Labs image generation timed out." });
|
|
52
|
+
throw error;
|
|
52
53
|
}
|
|
53
|
-
return [];
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
case "flux-pro-1.0-canny":
|
|
71
|
-
return "/v1/flux-pro-1.0-canny";
|
|
72
|
-
case "flux-pro-1.0-depth":
|
|
73
|
-
return "/v1/flux-pro-1.0-depth";
|
|
74
|
-
case "flux-2-pro":
|
|
75
|
-
return "/v1/flux-2-pro";
|
|
76
|
-
case "flux-2-flex":
|
|
77
|
-
return "/v1/flux-2-flex";
|
|
78
|
-
default:
|
|
79
|
-
return null;
|
|
55
|
+
flux31Body(params) {
|
|
56
|
+
validateGenerationOutputOptions(params, flux31Capabilities);
|
|
57
|
+
if (params.numberOfImages !== undefined && params.numberOfImages !== 1) {
|
|
58
|
+
throw new AIExecutionFailure({ code: "provider_request_rejected", category: "invalid_input",
|
|
59
|
+
statusCode: 422, retryable: false, message: "FLUX 3.1 generates one image per request." });
|
|
60
|
+
}
|
|
61
|
+
const size = params.size ?? "auto";
|
|
62
|
+
try {
|
|
63
|
+
validateImageSize(size, flux31Capabilities.sizes, flux31Capabilities.customSize);
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
if (!(error instanceof ImageOutputValidationError))
|
|
67
|
+
throw error;
|
|
68
|
+
throw new AIExecutionFailure({ code: "provider_request_rejected", category: "invalid_input",
|
|
69
|
+
statusCode: 422, retryable: false, message: error.message });
|
|
80
70
|
}
|
|
71
|
+
const [width, height] = size.split("x").map(Number);
|
|
72
|
+
return { prompt: params.prompt, ...(size === "auto" ? {} : { width, height }),
|
|
73
|
+
...(params.outputFormat ? { output_format: params.outputFormat } : {}) };
|
|
81
74
|
}
|
|
82
|
-
/**
|
|
83
|
-
* Create a basic request body for each model type.
|
|
84
|
-
* You can enhance or customize these parameters as needed.
|
|
85
|
-
*/
|
|
86
75
|
getRequestBodyForModel(model, prompt) {
|
|
87
76
|
switch (model) {
|
|
88
|
-
case "flux-pro":
|
|
89
|
-
// No explicitly required fields. At minimum, provide prompt.
|
|
90
|
-
return {
|
|
91
|
-
prompt: prompt || "default prompt",
|
|
92
|
-
width: 512,
|
|
93
|
-
height: 512,
|
|
94
|
-
steps: 40,
|
|
95
|
-
guidance: 2.5,
|
|
96
|
-
prompt_upsampling: false
|
|
97
|
-
};
|
|
98
77
|
case "flux-pro-1.1":
|
|
99
78
|
// No explicitly required fields. Providing prompt is sensible.
|
|
100
79
|
return {
|
|
@@ -132,33 +111,7 @@ let BlackForestLabsImageGenerationProvider = class BlackForestLabsImageGeneratio
|
|
|
132
111
|
safety_tolerance: 2,
|
|
133
112
|
prompt_upsampling: false
|
|
134
113
|
};
|
|
135
|
-
case "flux-pro-1.0-canny":
|
|
136
|
-
// "prompt" and "control_image" are required.
|
|
137
|
-
return {
|
|
138
|
-
prompt: prompt || "default prompt", // REQUIRED
|
|
139
|
-
control_image: "BASE64_ENCODED_IMAGE", // REQUIRED
|
|
140
|
-
steps: 50,
|
|
141
|
-
guidance: 30,
|
|
142
|
-
safety_tolerance: 2,
|
|
143
|
-
prompt_upsampling: false
|
|
144
|
-
};
|
|
145
|
-
case "flux-pro-1.0-depth":
|
|
146
|
-
// "prompt" and "control_image" are required.
|
|
147
|
-
return {
|
|
148
|
-
prompt: prompt || "default prompt", // REQUIRED
|
|
149
|
-
control_image: "BASE64_ENCODED_IMAGE", // REQUIRED
|
|
150
|
-
steps: 50,
|
|
151
|
-
guidance: 15,
|
|
152
|
-
safety_tolerance: 2,
|
|
153
|
-
prompt_upsampling: false
|
|
154
|
-
};
|
|
155
114
|
case "flux-2-pro":
|
|
156
|
-
return {
|
|
157
|
-
prompt: prompt,
|
|
158
|
-
width: 1920,
|
|
159
|
-
height: 1080,
|
|
160
|
-
safety_tolerance: 2,
|
|
161
|
-
};
|
|
162
115
|
case "flux-2-flex":
|
|
163
116
|
return {
|
|
164
117
|
prompt: prompt,
|
|
@@ -170,120 +123,11 @@ let BlackForestLabsImageGenerationProvider = class BlackForestLabsImageGeneratio
|
|
|
170
123
|
return {};
|
|
171
124
|
}
|
|
172
125
|
}
|
|
173
|
-
/**
|
|
174
|
-
* Submit a generation task and return the task ID.
|
|
175
|
-
*/
|
|
176
|
-
async submitTask(endpoint, body) {
|
|
177
|
-
const url = `${this.baseUrl}${endpoint}`;
|
|
178
|
-
const response = await fetch(url, {
|
|
179
|
-
method: "POST",
|
|
180
|
-
headers: {
|
|
181
|
-
"x-key": this.apiKey,
|
|
182
|
-
"Content-Type": "application/json"
|
|
183
|
-
},
|
|
184
|
-
body: JSON.stringify(body)
|
|
185
|
-
});
|
|
186
|
-
if (!response.ok) {
|
|
187
|
-
const errorText = await response.text();
|
|
188
|
-
throw new Error(`Error submitting task: ${errorText}`);
|
|
189
|
-
}
|
|
190
|
-
const data = await response.json();
|
|
191
|
-
const dataResponse = data;
|
|
192
|
-
return dataResponse.id;
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Poll the get_result endpoint until we have a final status.
|
|
196
|
-
* Returns the final ResultResponse.
|
|
197
|
-
*/
|
|
198
|
-
async pollForResult(taskId) {
|
|
199
|
-
const pollInterval = 2000; // 2 seconds
|
|
200
|
-
const timeout = 5 * 60 * 1000; // 5 minutes
|
|
201
|
-
const startTime = Date.now();
|
|
202
|
-
while (true) {
|
|
203
|
-
const result = await this.getResult(taskId);
|
|
204
|
-
if (result.status === "Ready") {
|
|
205
|
-
return result;
|
|
206
|
-
}
|
|
207
|
-
else if (result.status === "Error" || result.status === "Task not found") {
|
|
208
|
-
throw new Error(`Task ${taskId} failed or not found. Status: ${result.status}`);
|
|
209
|
-
}
|
|
210
|
-
else if (result.status === "Request Moderated" || result.status === "Content Moderated") {
|
|
211
|
-
throw new Error(`Task ${taskId} was moderated and cannot be completed.`);
|
|
212
|
-
}
|
|
213
|
-
// Check timeout
|
|
214
|
-
if (Date.now() - startTime > timeout) {
|
|
215
|
-
throw new Error(`Timed out waiting for task ${taskId} to complete.`);
|
|
216
|
-
}
|
|
217
|
-
await this.delay(pollInterval);
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Get the result of a task by ID.
|
|
222
|
-
*/
|
|
223
|
-
async getResult(id) {
|
|
224
|
-
const url = new URL(`${this.baseUrl}/v1/get_result`);
|
|
225
|
-
url.searchParams.set("id", id);
|
|
226
|
-
const response = await fetch(url.toString(), {
|
|
227
|
-
method: "GET",
|
|
228
|
-
headers: {
|
|
229
|
-
"x-key": this.apiKey
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
if (!response.ok) {
|
|
233
|
-
const errorText = await response.text();
|
|
234
|
-
throw new Error(`Error getting result: ${errorText}`);
|
|
235
|
-
}
|
|
236
|
-
const data = await response.json();
|
|
237
|
-
return data;
|
|
238
|
-
}
|
|
239
|
-
delay(ms) {
|
|
240
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
241
|
-
}
|
|
242
126
|
getModels() {
|
|
243
|
-
return [
|
|
244
|
-
{
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
displayName: `Flux Pro`,
|
|
248
|
-
provider: "Black Forest Labs",
|
|
249
|
-
type: 'image'
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
id: `bfl/flux-pro-1.1`,
|
|
253
|
-
providerModel: `flux-pro-1.1`,
|
|
254
|
-
displayName: `Flux Pro 1.1`,
|
|
255
|
-
provider: "Black Forest Labs",
|
|
256
|
-
type: 'image'
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
id: `bfl/flux-dev`,
|
|
260
|
-
providerModel: `flux-dev`,
|
|
261
|
-
displayName: `Flux Dev`,
|
|
262
|
-
provider: "Black Forest Labs",
|
|
263
|
-
type: 'image'
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
id: `bfl/flux-pro-1.1-ultra`,
|
|
267
|
-
providerModel: `flux-pro-1.1-ultra`,
|
|
268
|
-
displayName: `Flux Pro 1.1 Ultra`,
|
|
269
|
-
provider: "Black Forest Labs",
|
|
270
|
-
type: 'image'
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
id: 'bfl/flux-2-pro',
|
|
274
|
-
providerModel: 'flux-pro-2-pro',
|
|
275
|
-
displayName: 'Flux Pro 2.0 Pro',
|
|
276
|
-
provider: 'Black Forest Labs',
|
|
277
|
-
type: 'image'
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
id: 'bfl/flux-2-flex',
|
|
281
|
-
providerModel: 'flux-2-flex',
|
|
282
|
-
displayName: 'Flux Pro 2.0 Flex',
|
|
283
|
-
provider: 'Black Forest Labs',
|
|
284
|
-
type: 'image'
|
|
285
|
-
}
|
|
286
|
-
];
|
|
127
|
+
return Array.from(models, ([model, displayName]) => ({
|
|
128
|
+
id: `bfl/${model}`, providerModel: model, displayName, provider: "Black Forest Labs", type: "image",
|
|
129
|
+
...(model === flux31 ? { capabilities: flux31Capabilities } : {}),
|
|
130
|
+
}));
|
|
287
131
|
}
|
|
288
132
|
};
|
|
289
133
|
BlackForestLabsImageGenerationProvider = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlackForestLabsImageGenerationProvider.js","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageGenerationProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"BlackForestLabsImageGenerationProvider.js","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/images/blackforestlabs/BlackForestLabsImageGenerationProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AACrF,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AACvH,OAAO,EAAE,+BAA+B,EAAE,MAAM,mEAAmE,CAAC;AACpH,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAE7C,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC;IACrB,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAC1B,CAAC,cAAc,EAAE,cAAc,CAAC;IAChC,CAAC,UAAU,EAAE,UAAU,CAAC;IACxB,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAC5C,CAAC,YAAY,EAAE,kBAAkB,CAAC;IAClC,CAAC,aAAa,EAAE,mBAAmB,CAAC;CACrC,CAAC,CAAC;AAGI,IAAM,sCAAsC,GAA5C,MAAM,sCAAsC;IACxC,EAAE,GAAG,KAAK,CAAC;IACH,MAAM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EAAE;oBACT,QAAQ,EAAE,EAAE;oBACZ,aAAa,EAAE,MAAM;oBACrB,gBAAgB,EAAE,CAAC;oBACnB,iBAAiB,EAAE,KAAK;iBACzB,CAAC;YAEJ,KAAK,YAAY,CAAC;YAClB,KAAK,aAAa;gBAChB,OAAO;oBACL,MAAM,EAAE,MAAM;oBACd,KAAK,EAAE,IAAI;oBACX,MAAM,EAAE,IAAI;oBACZ,gBAAgB,EAAE,CAAC;iBACpB,CAAC;YACJ;gBACE,OAAO,EAAE,CAAC;QACd,CAAC;IACH,CAAC;IAED,SAAS;QACP,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC;YACnD,EAAE,EAAE,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,mBAAmB,EAAE,IAAI,EAAE,OAAO;YACnG,GAAG,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAClE,CAAC,CAAC,CAAC;IACN,CAAC;CACF,CAAA;AA7GY,sCAAsC;IADlD,UAAU,EAAE;IAKE,WAAA,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;qCAAS,aAAa;GAJvD,sCAAsC,CA6GlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAICompatibleImageEditingProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/images/editing/OpenAICompatibleImageEditingProvider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAqC,KAAK,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AAC9H,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,4DAA4D,CAAC;
|
|
1
|
+
{"version":3,"file":"OpenAICompatibleImageEditingProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/ai/images/editing/OpenAICompatibleImageEditingProvider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAqC,KAAK,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AAC9H,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,4DAA4D,CAAC;AAMvH,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;CAKP,CAAC;AAUX,mGAAmG;AACnG,qBAAa,oCAAqC,YAAW,oBAAoB;IACnE,OAAO,CAAC,QAAQ,CAAC,MAAM;IAAiB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAhD,MAAM,EAAE,aAAa,EAAmB,QAAQ,EAAE,MAAM,OAAO,WAAW;IAEvG,SAAS,IAAI,kBAAkB,EAAE;IAa3B,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;CAmDtG;AAED,qBACa,0BAA2B,SAAQ,oCAAoC;gBACrC,MAAM,EAAE,aAAa;CACnE;AAED,qBACa,wBAAyB,SAAQ,oCAAoC;gBACnC,MAAM,EAAE,aAAa;CACnE"}
|
package/build/src/core/infrastructure/ai/images/editing/OpenAICompatibleImageEditingProvider.js
CHANGED
|
@@ -17,7 +17,8 @@ import CoreTypes from '../../../di/types.js';
|
|
|
17
17
|
import { ImageEditingError, imageEditSizes } from '../../../../domain/models/images/ImageEditing.js';
|
|
18
18
|
import { boundedImageFetch, decodeImageOutput } from '../ImageOutputBytes.js';
|
|
19
19
|
import { openAIEditModels, openAIImageCapabilities, openAIImageOutputParams } from '../openai/OpenAIImageModels.js';
|
|
20
|
-
import { validateImageEditOptions } from '../../../../domain/services/media/ImageEditPolicy.js';
|
|
20
|
+
import { resolvePaintedEditSize, validateImageEditOptions } from '../../../../domain/services/media/ImageEditPolicy.js';
|
|
21
|
+
import { prepareOpenAIMaskedEdit } from './OpenAIImageEditMask.js';
|
|
21
22
|
const definitions = {
|
|
22
23
|
openai: { id: 'openai/gpt-image-2', model: 'gpt-image-2', displayName: 'GPT Image 2',
|
|
23
24
|
baseURL: 'https://api.openai.com/v1', config: 'ai.llm.providers.openai' },
|
|
@@ -48,6 +49,7 @@ export class OpenAICompatibleImageEditingProvider {
|
|
|
48
49
|
return models.map(model => ({ id: `${this.provider}/${model}`, provider: this.provider,
|
|
49
50
|
displayName: this.provider === 'meta' ? definition.displayName : (editorDisplayNames[model] ?? model),
|
|
50
51
|
sizes: imageEditSizes, sizeBehavior: this.provider === 'meta' ? 'aspect_ratio' : 'dimensions',
|
|
52
|
+
...(this.provider === 'openai' ? { supportsMask: true } : {}),
|
|
51
53
|
capabilities: this.provider === 'openai' ? openAIImageCapabilities(model) : { outputFormats: ['png'] },
|
|
52
54
|
inputFormats: ['image/png', 'image/jpeg', 'image/webp'], maxInputImages: 4, maxOutputImages: 4 }));
|
|
53
55
|
}
|
|
@@ -62,14 +64,20 @@ export class OpenAICompatibleImageEditingProvider {
|
|
|
62
64
|
|| !Number.isInteger(input.numberOfImages) || input.numberOfImages < 1 || input.numberOfImages > 4) {
|
|
63
65
|
throw new ImageEditingError('image_edit_invalid_request', 'Unsupported image editing size or image count.');
|
|
64
66
|
}
|
|
67
|
+
if (input.mask && (!model.supportsMask || input.outputFormat === 'gif')) {
|
|
68
|
+
throw new ImageEditingError('image_edit_invalid_request', 'The selected editor and output format must support painted masks.');
|
|
69
|
+
}
|
|
65
70
|
input.abortSignal.throwIfAborted();
|
|
66
71
|
const client = new OpenAI({ apiKey: this.config.getOptionalString(`${definition.config}.apiKey`).trim(),
|
|
67
72
|
baseURL: definition.baseURL, maxRetries: 0, timeout: 180_000, logLevel: 'off',
|
|
68
73
|
fetch: this.provider === 'meta' ? metaImageEditFetch : boundedImageEditFetch });
|
|
69
74
|
try {
|
|
70
|
-
const
|
|
75
|
+
const masked = input.mask ? await prepareOpenAIMaskedEdit(input.images[0], input.mask, input.abortSignal) : undefined;
|
|
76
|
+
const references = masked ? [masked.target, ...input.images.slice(1)] : input.images;
|
|
77
|
+
const images = await Promise.all(references.map((image, index) => toFile(image.data, `reference-${index}.${image.mimeType === 'image/jpeg' ? 'jpg' : image.mimeType.split('/')[1]}`, { type: image.mimeType })));
|
|
71
78
|
const request = { model: model.id.split('/')[1], image: images.length === 1 ? images[0] : images, prompt: input.prompt,
|
|
72
|
-
|
|
79
|
+
...(masked ? { mask: await toFile(masked.mask, 'mask.png', { type: 'image/png' }) } : {}),
|
|
80
|
+
n: input.numberOfImages, size: masked ? resolvePaintedEditSize(input.size, model, masked) : input.size,
|
|
73
81
|
...(this.provider === 'meta' ? { response_format: 'b64_json', output_format: 'png' } : openAIImageOutputParams(input)) };
|
|
74
82
|
// The installed SDK predates some documented GPT Image quality and animation fields.
|
|
75
83
|
const response = await client.images.edit(request, { signal: input.abortSignal });
|