feat: improve model catalog aggregation
This commit is contained in:
@@ -177,7 +177,7 @@ func (c VolcesClient) getJSON(ctx context.Context, baseURL string, path string,
|
||||
|
||||
func volcesImageBody(request Request) map[string]any {
|
||||
body := cleanProviderBody(request.Body)
|
||||
body["model"] = request.Candidate.ModelName
|
||||
body["model"] = upstreamModelName(request.Candidate)
|
||||
if _, ok := body["watermark"]; !ok {
|
||||
body["watermark"] = false
|
||||
}
|
||||
@@ -200,7 +200,7 @@ func volcesImageBody(request Request) map[string]any {
|
||||
|
||||
func volcesVideoBody(request Request) map[string]any {
|
||||
body := cleanProviderBody(request.Body)
|
||||
body["model"] = request.Candidate.ModelName
|
||||
body["model"] = upstreamModelName(request.Candidate)
|
||||
content := contentItems(body["content"])
|
||||
if len(content) == 0 {
|
||||
content = buildVolcesContentFromBody(body)
|
||||
@@ -515,7 +515,7 @@ func volcesVideoSuccessResult(request Request, upstreamTaskID string, raw map[st
|
||||
"id": upstreamTaskID,
|
||||
"object": "video.generation",
|
||||
"created": created,
|
||||
"model": request.Candidate.ModelName,
|
||||
"model": upstreamModelName(request.Candidate),
|
||||
"status": "succeeded",
|
||||
"upstream_task_id": upstreamTaskID,
|
||||
"data": data,
|
||||
|
||||
Reference in New Issue
Block a user