-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP Observability]: add image model observation #368
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: PolarishT <[email protected]>
Signed-off-by: PolarishT <[email protected]>
Signed-off-by: PolarishT <[email protected]>
Signed-off-by: PolarishT <[email protected]>
Signed-off-by: PolarishT <[email protected]>
Currently, several image models do not support synchronous calls, so we have to provide an asynchronous implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have left several comments need to be considered.
spring-ai-alibaba-core/src/main/java/com/alibaba/cloud/ai/dashscope/api/DashScopeImageApi.java
Outdated
Show resolved
Hide resolved
...-ai-alibaba-core/src/main/java/com/alibaba/cloud/ai/dashscope/image/DashScopeImageModel.java
Outdated
Show resolved
Hide resolved
while (attempt < maxAttempts) { | ||
if (!isTaskCompleted(getResultResponse)) { | ||
getResultResponse = getImageGenTask(taskId); | ||
Thread.sleep(10000L); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like here is a change of default behavior, which should be full discussed and documented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a spring-retry-template to control the entire lifecycle, may be a good solution.
...m/alibaba/cloud/ai/dashscope/image/observation/DashScopeImageModelObservationConvention.java
Outdated
Show resolved
Hide resolved
...i-alibaba-core/src/test/java/com/alibaba/cloud/ai/dashscope/image/DashScopeImageModelIT.java
Outdated
Show resolved
Hide resolved
Signed-off-by: PolarishT <[email protected]>
👌 |
Signed-off-by: PolarishT <[email protected]>
cc @Cirilla-zmh |
Signed-off-by: PolarishT <[email protected]>
Signed-off-by: PolarishT <[email protected]>
Describe what this PR does / why we need it
Does this pull request fix one issue?
#223
Describe how to verify it