This is an automated email from the ASF dual-hosted git repository.
xtsong 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 3892703b [hotfix] Fix errors for docs in development (#489)
3892703b is described below
commit 3892703b15b5584cfe881967ab723c586781a720
Author: Xuannan <[email protected]>
AuthorDate: Tue Jan 27 11:44:18 2026 +0800
[hotfix] Fix errors for docs in development (#489)
---
docs/content/docs/development/integrate_with_flink.md | 4 ++--
docs/content/docs/development/prompts.md | 8 ++++----
docs/content/docs/development/react_agent.md | 8 ++++----
docs/content/docs/development/workflow_agent.md | 2 +-
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/docs/content/docs/development/integrate_with_flink.md
b/docs/content/docs/development/integrate_with_flink.md
index 19f2f750..150e5c0d 100644
--- a/docs/content/docs/development/integrate_with_flink.md
+++ b/docs/content/docs/development/integrate_with_flink.md
@@ -75,7 +75,7 @@ output_stream.print()
{{< tab "Java" >}}
```java
// create input datastream
-DataStream<String> inputStream = env.fromSource(...);
+DataStream<YourPojo> inputStream = env.fromSource(...);
// integrate agent with input datastream, and return output datastream
DataStream<Object> outputStream =
@@ -172,7 +172,7 @@ Table outputTable =
{{< /tabs >}}
-User should provide `KeySelector` in `from_table()` to tell how to convert the
input `Table` to `KeyedStream` internally. And provide `Schema` and
`TypeInfomation` in `to_table()` to tell the output `Table` schema.
+User should provide `KeySelector` in `from_table()` to tell how to convert the
input `Table` to `KeyedStream` internally. And provide `Schema` and
`TypeInformation` in `to_table()` to tell the output `Table` schema.
{{< hint info >}}
Currently, user should provide both `Schema` and `TypeInformation` when call
`to_table()`, we will support only provide one of them in the future.
{{< /hint >}}
\ No newline at end of file
diff --git a/docs/content/docs/development/prompts.md
b/docs/content/docs/development/prompts.md
index 0d8fae3f..4994b945 100644
--- a/docs/content/docs/development/prompts.md
+++ b/docs/content/docs/development/prompts.md
@@ -156,7 +156,7 @@ review_analysis_prompt = Prompt.from_messages(
{{< tab "Java" >}}
```java
Prompt reviewAnalysisPrompt =
- new Prompt.fromMessages(
+ Prompt.fromMessages(
Arrays.asList(
new ChatMessage(
MessageRole.SYSTEM,
@@ -236,7 +236,7 @@ class ReviewAnalysisAgent(Agent):
def review_analysis_model() -> ResourceDescriptor:
"""ChatModel which focus on review analysis."""
return ResourceDescriptor(
- clazz=OllamaChatModelSetup,
+ clazz=ResourceName.ChatModel.OLLAMA_SETUP,
connection="ollama_server",
model="qwen3:8b",
prompt="review_analysis_prompt",
@@ -267,7 +267,7 @@ public class ReviewAnalysisAgent extends Agent {
@Prompt
public static org.apache.flink.agents.api.prompt.Prompt
reviewAnalysisPrompt() {
- return new org.apache.flink.agents.api.prompt.Prompt(
+ return Prompt.fromMessages(
Arrays.asList(
new ChatMessage(
MessageRole.SYSTEM,
@@ -291,7 +291,7 @@ public class ReviewAnalysisAgent extends Agent {
@ChatModelSetup
public static ResourceDescriptor reviewAnalysisModel() {
- return
ResourceDescriptor.Builder.newBuilder(OllamaChatModelSetup.class.getName())
+ return
ResourceDescriptor.Builder.newBuilder(ResourceName.ChatModel.OLLAMA_SETUP)
.addInitialArgument("connection", "ollamaChatModelConnection")
.addInitialArgument("model", "qwen3:8b")
.addInitialArgument("prompt", "reviewAnalysisPrompt")
diff --git a/docs/content/docs/development/react_agent.md
b/docs/content/docs/development/react_agent.md
index e559effc..2ac13110 100644
--- a/docs/content/docs/development/react_agent.md
+++ b/docs/content/docs/development/react_agent.md
@@ -72,7 +72,7 @@ chat_model_descriptor = ResourceDescriptor(
clazz=ResourceName.ChatModel.OLLAMA_SETUP,
connection="my_ollama_connection",
model="qwen3:8b",
- tools=["my_tool1, my_tool2"],
+ tools=["my_tool1", "my_tool2"],
)
```
{{< /tab >}}
@@ -209,7 +209,7 @@ public static class MyBaseModelDataType {
private final List<String> reasons;
@JsonCreator
- public ProductReviewAnalysisRes(
+ public MyBaseModelDataType(
@JsonProperty("id") String id,
@JsonProperty("score") int score,
@JsonProperty("reasons") List<String> reasons) {
@@ -218,7 +218,7 @@ public static class MyBaseModelDataType {
this.reasons = reasons;
}
- public ProductReviewAnalysisRes() {
+ public MyBaseModelDataType() {
id = null;
score = 0;
reasons = List.of();
@@ -239,7 +239,7 @@ public static class MyBaseModelDataType {
@Override
public String toString() {
return String.format(
- "ProductReviewAnalysisRes{id='%s', score=%d, reasons=%s}", id,
score, reasons);
+ "MyBaseModelDataType{id='%s', score=%d, reasons=%s}", id,
score, reasons);
}
}
diff --git a/docs/content/docs/development/workflow_agent.md
b/docs/content/docs/development/workflow_agent.md
index cea7f479..8e9171a3 100644
--- a/docs/content/docs/development/workflow_agent.md
+++ b/docs/content/docs/development/workflow_agent.md
@@ -412,7 +412,7 @@ There are 2 special types of event.
* `InputEvent`: Generated by the framework, carrying an input data record that
arrives at the agent in `input` field . Actions listening to the `InputEvent`
will be the entry points of agent.
* `OutputEvent`: The framework will listen to `OutputEvent`, and convert its
payload in `output` field into outputs of the agent. By generating
`OutputEvent`, actions can emit output data.
-User can define owner event by extends `Event`.
+User can define own event by extends `Event`.
{{< tabs "Custom Event" >}}