This is an automated email from the ASF dual-hosted git repository.

yunfengzhou-hub pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-agents.git


The following commit(s) were added to refs/heads/main by this push:
     new b17dc1422 [hotfix][docs][api] Correct Calling LLMs, Vector Search and 
ReAct Agent to match the code (#1278)
b17dc1422 is described below

commit b17dc1422e579d81265ccd1f95a6f8d7b15ae317
Author: yunfengzhou-hub <[email protected]>
AuthorDate: Tue Oct 20 09:14:44 2026 +0800

    [hotfix][docs][api] Correct Calling LLMs, Vector Search and ReAct Agent to 
match the code (#1278)
---
 .../main/java/org/apache/flink/agents/api/agents/ReActAgent.java  | 2 +-
 .../docs/development/calling-llms/chat-models/providers.md        | 7 ++++---
 docs/content/docs/development/calling-llms/chat.md                | 6 ++++--
 docs/content/docs/development/create-agent/actions.md             | 3 ++-
 .../docs/development/vector-search/embedding_models/_index.md     | 2 +-
 .../docs/development/vector-search/embedding_models/providers.md  | 8 ++++----
 .../docs/development/vector-search/vector_stores/_index.md        | 2 +-
 .../docs/development/vector-search/vector_stores/providers.md     | 5 ++++-
 docs/content/docs/get-started/quickstart/react_agent.md           | 8 ++++----
 9 files changed, 25 insertions(+), 18 deletions(-)

diff --git 
a/api/src/main/java/org/apache/flink/agents/api/agents/ReActAgent.java 
b/api/src/main/java/org/apache/flink/agents/api/agents/ReActAgent.java
index 6a48bff79..24310dd80 100644
--- a/api/src/main/java/org/apache/flink/agents/api/agents/ReActAgent.java
+++ b/api/src/main/java/org/apache/flink/agents/api/agents/ReActAgent.java
@@ -191,7 +191,7 @@ public class ReActAgent extends Agent {
             this.addAction(new String[] {InputEvent.EVENT_TYPE}, method, 
actionConfig);
         } catch (NoSuchMethodException e) {
             throw new IllegalStateException(
-                    "Can't find the method stopAction, this must be a bug.");
+                    "Can't find the method startAction, this must be a bug.");
         }
     }
 
diff --git 
a/docs/content/docs/development/calling-llms/chat-models/providers.md 
b/docs/content/docs/development/calling-llms/chat-models/providers.md
index 1a64d20a4..39952a1d1 100644
--- a/docs/content/docs/development/calling-llms/chat-models/providers.md
+++ b/docs/content/docs/development/calling-llms/chat-models/providers.md
@@ -195,6 +195,7 @@ Anthropic provides cloud-based chat models featuring the 
Claude family, known fo
 | `api_key` | String | Required | Anthropic API key for authentication |
 | `timeout` | int | None | Timeout in seconds for API requests |
 | `max_retries` | int | `2` | Maximum number of API retry attempts |
+| `model` | String | None | Default model to use if not specified in setup |
 
 {{< /tab >}}
 
@@ -894,7 +895,7 @@ that the upstream Responses API lacks multimodal support.
 | Parameter | Type | Default | Description |
 |-----------|------|---------|-------------|
 | `api_key` | String | Required | OpenAI API key for authentication |
-| `api_base_url` | String | None | Base URL for OpenAI API (useful for 
proxies) |
+| `api_base_url` | String | `"https://api.openai.com/v1"` | Base URL for 
OpenAI API (useful for proxies) |
 | `max_retries` | int | `3` | Maximum number of API retry attempts; must be 
non-negative |
 | `timeout` | float | `60` | Timeout in seconds for API requests; `0` disables 
timeouts; must be 0–2,147,483.647 |
 | `default_headers` | Map<String, String> | None | Default headers for API 
requests |
@@ -1078,8 +1079,8 @@ Model availability and specifications may change. Always 
check the official Alib
 |-----------|------|---------|-------------|
 | `api_base_url` | String | `"http://localhost:8000/v1"` | vLLM server URL |
 | `api_key` | String | `"EMPTY"` | Only needed when the server is started with 
`--api-key`; the placeholder default works for unauthenticated servers |
-| `timeout` | int | SDK default | Seconds before an API call times out |
-| `max_retries` | int | SDK default | Retry attempts on failure |
+| `timeout` | float | `60` | Seconds before an API call times out |
+| `max_retries` | int | `3` | Retry attempts on failure |
 
 {{< /tab >}}
 
diff --git a/docs/content/docs/development/calling-llms/chat.md 
b/docs/content/docs/development/calling-llms/chat.md
index 21fcd1993..e86388fff 100644
--- a/docs/content/docs/development/calling-llms/chat.md
+++ b/docs/content/docs/development/calling-llms/chat.md
@@ -222,11 +222,13 @@ tool timeouts apply; `ctx.chat` adds no whole-call 
timeout.
 <span id="java-runtime-requirements"></span>
 
 {{< hint warning >}}
-Java `ctx.chat` calls require JDK 21 and
-`--add-exports=java.base/jdk.internal.vm=ALL-UNNAMED` in `env.java.opts.all`.
+Java `ctx.chat` calls require JDK 21.
 Earlier JDK versions are not supported: awaiting the call throws before sending
 the request. Use [Chat Events](#chat-events) on those versions.
 Python `ctx.chat` calls do not require JDK 21.
+A job that runs on JDK 21 also needs
+`--add-exports=java.base/jdk.internal.vm=ALL-UNNAMED` in `env.java.opts.all`,
+whether its Actions are Java or Python.
 {{< /hint >}}
 
 <span id="custom-response-producers"></span>
diff --git a/docs/content/docs/development/create-agent/actions.md 
b/docs/content/docs/development/create-agent/actions.md
index 1ebc362ac..097ae9e92 100644
--- a/docs/content/docs/development/create-agent/actions.md
+++ b/docs/content/docs/development/create-agent/actions.md
@@ -789,8 +789,9 @@ There are two forms of concurrency: running several calls 
within one Action usin
 are supported in Java and Python on all supported JDK versions, within the 
configured
 worker and batch limits. Concurrency between Actions has additional 
requirements:
 
-- **Java on JDK 21+:** add 
`--add-exports=java.base/jdk.internal.vm=ALL-UNNAMED` to the JVM
+- **JDK 21+:** add `--add-exports=java.base/jdk.internal.vm=ALL-UNNAMED` to 
the JVM
   options, including `env.java.opts.all` on a cluster, to enable 
continuation-based execution.
+  Plans with Python Actions need it too, not only plans whose Actions are all 
Java.
 - **Java on JDK 11–20:** the experimental parallel execution engine is enabled 
by default
   for plans whose Actions are all Java. Setting `parallel-execution.enabled` 
to `false`,
   or including Python Actions, disables it. A Java single-call await then runs 
synchronously;
diff --git 
a/docs/content/docs/development/vector-search/embedding_models/_index.md 
b/docs/content/docs/development/vector-search/embedding_models/_index.md
index b9af07a6b..fd2e09b89 100644
--- a/docs/content/docs/development/vector-search/embedding_models/_index.md
+++ b/docs/content/docs/development/vector-search/embedding_models/_index.md
@@ -180,7 +180,7 @@ public class MyAgent extends Agent {
         // Get the embedding model from the runtime context
         BaseEmbeddingModelSetup embeddingModel =
                 (BaseEmbeddingModelSetup)
-                        ctx.getResource("embeddingModel", 
ResourceType.EMBEDDING_MODEL);
+                        ctx.getResource("ollamaEmbedding", 
ResourceType.EMBEDDING_MODEL);
 
         // Use the embedding model to generate embeddings
         String input = (String) inputEvent.getInput();
diff --git 
a/docs/content/docs/development/vector-search/embedding_models/providers.md 
b/docs/content/docs/development/vector-search/embedding_models/providers.md
index b022b0330..2927e8b52 100644
--- a/docs/content/docs/development/vector-search/embedding_models/providers.md
+++ b/docs/content/docs/development/vector-search/embedding_models/providers.md
@@ -177,10 +177,10 @@ Ollama provides local embedding models that run on your 
machine, offering privac
 
 {{< tab "Java" >}}
 
-| Parameter           | Type   | Default  | Description                        
             |
-|---------------------|--------|----------|-------------------------------------------------|
-| `connection`        | String | Required | Registered connection Resource 
name             |
-| `model`             | String | Required | Name of the embedding model to use 
             |
+| Parameter           | Type   | Default  | Description                        
                         |
+|---------------------|--------|----------|-------------------------------------------------------------|
+| `connection`        | String | Required | Registered connection Resource 
name                         |
+| `model`             | String | None     | Overrides the default embedding 
model from the connection   |
 
 {{< /tab >}}
 
diff --git 
a/docs/content/docs/development/vector-search/vector_stores/_index.md 
b/docs/content/docs/development/vector-search/vector_stores/_index.md
index b926ded2a..6e773e0a7 100644
--- a/docs/content/docs/development/vector-search/vector_stores/_index.md
+++ b/docs/content/docs/development/vector-search/vector_stores/_index.md
@@ -427,7 +427,7 @@ public class MyAgent extends Agent {
     public static void searchDocuments(Event event, RunnerContext ctx) {
         InputEvent inputEvent = InputEvent.fromEvent(event);
         // Option 1: Manual search via the vector store
-        VectorStore vectorStore = (VectorStore) ctx.getResource("vectorStore", 
ResourceType.VECTOR_STORE);
+        BaseVectorStore vectorStore = (BaseVectorStore) 
ctx.getResource("vectorStore", ResourceType.VECTOR_STORE);
         String queryText = (String) inputEvent.getInput();
         VectorStoreQuery query = new VectorStoreQuery(queryText, 3);
         VectorStoreQueryResult result = vectorStore.query(query);
diff --git 
a/docs/content/docs/development/vector-search/vector_stores/providers.md 
b/docs/content/docs/development/vector-search/vector_stores/providers.md
index 2e584776c..1431b4c10 100644
--- a/docs/content/docs/development/vector-search/vector_stores/providers.md
+++ b/docs/content/docs/development/vector-search/vector_stores/providers.md
@@ -163,7 +163,7 @@ The Amazon S3 Vectors integration currently has a Java 
implementation only. To u
 {{< /hint >}}
 
 {{< hint warning >}}
-Amazon S3 Vectors does **not** implement `CollectionManageableVectorStore`, so 
it does not support [Long-Term Memory]({{< ref 
"docs/development/memory/long_term_memory" >}}) features. It also does not 
support `size()` or get-all operations: explicit document IDs are required for 
`get()` and `delete()`.
+Amazon S3 Vectors does **not** implement `CollectionManageableVectorStore`, so 
it does not support [Long-Term Memory]({{< ref 
"docs/development/memory/long_term_memory" >}}) features. Get-all and 
delete-all operations are not supported either: explicit document IDs are 
required for `get()` and `delete()`.
 {{< /hint >}}
 
 #### Prerequisites
@@ -386,6 +386,9 @@ The Elasticsearch integration currently has a Java 
implementation only. To use E
 | `index`           | str  | None                      | Default target 
Elasticsearch index name                            |
 | `vector_field`    | str  | `"_vector"`               | Name of the dense 
vector field used for KNN                        |
 | `dims`            | int  | `768`                     | Vector dimensionality 
                                             |
+| `content_field`   | str  | `"_content"`              | Name of the field 
storing document content                         |
+| `metadata_field`  | str  | `"_metadata"`             | Name of the field 
storing document metadata                        |
+| `store_in_content_field` | bool | `true`                | Whether document 
content is stored in the content field            |
 | `k`               | int  | None                      | Number of nearest 
neighbors to return; can be overridden per query |
 | `num_candidates`  | int  | None                      | Candidate set size 
for ANN search; can be overridden per query     |
 | `filter_query`    | str  | None                      | Raw JSON 
Elasticsearch filter query (DSL) restricting which documents a KNN query can 
match |
diff --git a/docs/content/docs/get-started/quickstart/react_agent.md 
b/docs/content/docs/get-started/quickstart/react_agent.md
index 3ae1ede98..325baae91 100644
--- a/docs/content/docs/get-started/quickstart/react_agent.md
+++ b/docs/content/docs/get-started/quickstart/react_agent.md
@@ -72,7 +72,7 @@ 
agents_env.get_config().set(AgentExecutionOptions.NUM_ASYNC_THREADS, 2)
 {{< /tab >}}
 
 {{< tab "Java" >}}
-```Java
+```java
 // Set up the Flink streaming environment and the Agents execution environment.
 StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironment();
 AgentsExecutionEnvironment agentsEnv =
@@ -114,7 +114,7 @@ agents_env.add_resource(
 {{< /tab >}}
 
 {{< tab "Java" >}}
-```Java
+```java
 // Add Ollama chat model connection and notify shipping manager tool to be used
 // by the Agent.
 agentsEnv
@@ -162,7 +162,7 @@ review_analysis_react_agent = ReActAgent(
 {{< /tab >}}
 
 {{< tab "Java" >}}
-```Java
+```java
 // Create react agent
 ReActAgent reviewAnalysisReactAgent = new ReActAgent(
         
ResourceDescriptor.Builder.newBuilder(ResourceName.ChatModel.OLLAMA_SETUP)
@@ -225,7 +225,7 @@ agents_env.execute("ReAct Agent Example Job")
 {{< /tab >}}
 
 {{< tab "Java" >}}
-```Java
+```java
 // Read product reviews from input_data.txt file as a streaming source.
 // Each element represents a ProductReview.
 File inputDataFile = copyResource("input_data.txt");

Reply via email to