wenjin272 commented on PR #1382: URL: https://github.com/apache/flink-agents/pull/1382#issuecomment-7089718333
Thanks for the update. The task-specific interfaces and separate `AsyncJobModel` address the earlier concerns. I still have a concern about where model configuration lives. Currently, users register a `BaseMediaModelProvider` resource, then call `provider.image(model, model_parameters=...)` to obtain a configured model. This puts model selection and default parameters into the calling code, rather than the resource declaration. Multiple Actions using the same configuration need to share that binding themselves, and the configured model cannot be declared and referenced as a named Resource through YAML. This differs from our existing `ChatModelSetup` pattern, where the connection, model name, and default parameters are configured in the resource declaration. Actions retrieve the configured resource by name and invoke it directly. Could we follow the same approach here? - Make `ImageGenerationModel`, `VideoGenerationModel`, `SpeechSynthesisModel`, and `TranscriptionModel` extend `Resource` directly, all using `ResourceType.MEDIA_MODEL`. A common `BaseMediaModel` is not required. - Configure the model name and default parameters in their `ResourceDescriptor` or YAML declaration. Actions retrieve the named model and call its task-specific method. - Keep `AsyncJobModel` as an independent capability implemented by models that support resumable provider-side jobs. - If connection sharing is needed, let multiple model resources reference a shared connection, as our chat models do. This would preserve the task-specific APIs while keeping model configuration and resource usage consistent with the existing framework. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
