joeyutong commented on code in PR #1382:
URL: https://github.com/apache/flink-agents/pull/1382#discussion_r4695371239


##########
docs/content/docs/development/rerank_models/_index.md:
##########
@@ -0,0 +1,200 @@
+---
+title: "Rerank Models"
+weight: 10
+type: docs
+---
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Rerank Models
+
+## Overview
+
+Use a rerank model to score and order candidate documents by relevance to a
+query—for example, refining results retrieved from a
+[vector store]({{< ref "docs/development/vector-search/vector_stores" >}}) or
+ranking mixed text, image, and video candidates directly.
+
+Register a `RERANK_MODEL` resource for the model you want to call, then pass a
+query and candidate list to `rerank()` inside an Action. See
+[Built-in Rerank Model Providers]({{< ref 
"docs/development/rerank_models/providers" >}})
+for available implementations and provider options.
+
+## Quick start
+
+### 1. Register a rerank model

Review Comment:
   Done. Updated the Rerank guide to use annotation-based registration 
(`@rerank_model` / `@RerankModel`) alongside YAML with `add_resource()` / 
`addResource()` noted separately, unnumbered headings (`Register a rerank 
model` / `Use the rerank model`), inline input/result and override notes, and 
removed `Lifecycle and cross-language use`.



##########
docs/content/docs/development/media_models/_index.md:
##########
@@ -0,0 +1,400 @@
+---
+title: "Media Models"
+weight: 9
+type: docs
+---
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Media Models
+
+## Overview

Review Comment:
   Done. Narrowed the Overview to the four supported media tasks and their use 
cases.



##########
docs/content/docs/development/media_models/_index.md:
##########
@@ -0,0 +1,400 @@
+---
+title: "Media Models"
+weight: 9
+type: docs
+---
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Media Models
+
+## Overview
+
+Use media models when an Agent needs dedicated media operations—such as
+generating images or videos, transcribing recordings, or synthesizing speech.
+By default, register a shared `MEDIA_MODEL_CONNECTION` for your service
+connection and declare named `MEDIA_MODEL` setups (subclasses of
+`BaseImageGenerationModelSetup`, `BaseVideoGenerationModelSetup`,
+`BaseTranscriptionModelSetup`, or `BaseSpeechSynthesisModelSetup`, such as
+DashScope's `DashScopeImageGenerationModelSetup`) retrieved via
+`ctx.get_resource(name, ResourceType.MEDIA_MODEL)`. Declaring named setups 
keeps
+model selection and default parameters out of Action code, enables YAML
+configuration, and makes models easy to reuse across Actions and share between
+Java and Python.
+
+If your workflow uses conversation-style multimodal messages instead, see
+[Chat with Models]({{< ref "docs/development/calling-llms/chat" >}}). For
+available implementations and provider options, see
+[Built-in Media Model Connections]({{< ref 
"docs/development/media_models/providers" >}}).
+
+## Quick start
+
+### 1. Register a connection

Review Comment:
   Done. Removed numbered headings, switched the main Python/Java examples to 
annotation-based registration alongside YAML, and noted `add_resource()` / 
`addResource()` separately for environment-level registration.



-- 
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]

Reply via email to