yanand0909 commented on code in PR #800:
URL: https://github.com/apache/flink-web/pull/800#discussion_r2199779547


##########
docs/content/posts/2025-07-31-release-2.1.0.md:
##########
@@ -0,0 +1,438 @@
+---
+authors:
+  - reswqa:
+    name: "Ron Liu"
+    twitter: "Ron999"
+
+date: "2025-07-31T08:00:00Z"
+subtitle: ""
+title: Announcing the Release of Apache Flink 2.1
+aliases:
+  - /news/2025/07/31/release-2.1.0.html
+---
+
+The Apache Flink PMC is pleased to announce the release of Apache Flink 2.1.0. 
As usual, we are
+looking at a packed release with a wide variety of improvements and new 
features. Overall, 116
+people contributed to this release completing 15 FLIPs and 200+ issues. Thank 
you!
+
+Let's dive into the highlights.
+
+# Flink SQL Improvements
+
+## Realtime AI Function
+
+Since Flink 2.0, we have introduced dedicated syntax for AI models, enabling 
users to define models as easily as creating catalog objects 
+and invoke them like standard functions or table functions in SQL statements. 
+
+In Flink 2.1, we expanded the `ML_PREDICT` table-valued function (TVF) to 
perform realtime model inference in SQL queries, applying machine learning 
models to data streams seamlessly. 
+The implementation supports both embedded models (including OpenAI) and custom 
model providers, accelerating Flink's evolution from a real-time data 
processing engine to a unified realtime AI platform. 
+Looking ahead, we plan to introduce more AI functions such as `ML_EVALUATE`, 
`VECTOR_SEARCHOR` to unlock end-to-end experience for real-time data 
processing, model training, and inference.
+
+Take the following SQL statements as an example:
+```sql
+-- Declare a AI model
+CREATE MODEL `my_model`
+INPUT (f1 INT, f2 STRING)
+OUTPUT (label STRING, probs ARRAY<FLOAT>)
+WITH(
+  'task' = 'classification',
+  'type' = 'remote',
+  'provider' = 'openai',
+  'openai.endpoint' = 'https://api.openai.com/v1/llm/v1/chat',
+  'openai.api_key' = 'abcdefg'
+);
+
+-- Basic usage
+SELECT * FROM ML_PREDICT(
+  TABLE input_table,
+  MODEL my_model,
+  DESCRIPTOR(feature1, feature2)
+);
+
+-- With configuration options
+SELECT * FROM ML_PREDICT(
+  TABLE input_table,
+  MODEL my_model,
+  DESCRIPTOR(feature1, feature2),
+  MAP['async', 'true', 'timeout', '100s']
+);
+
+-- Using named parameters
+SELECT * FROM ML_PREDICT(
+  INPUT => TABLE input_table,
+  MODEL => MODEL my_model,
+  ARGS => DESCRIPTOR(feature1, feature2),
+  CONFIG => MAP['async', 'true']
+);
+```

Review Comment:
   +1 for ## Realtime AI Function
   
   FLIP:507 could be a good extension to this section. For example:
   
   New: **Model DDLs Table API Support**
   We have also added Model DDLs Table API support, enabling users to define 
and manage AI models programmatically via the Table API in both Java and 
Python. This provides a flexible, code-driven alternative to SQL for model 
management and integration within Flink applications.
   
   Example: Defining a Model via Table API (Java)
   java
   table_env.create_model("MyModel", ModelDescriptor.for_provider("OPENAI")
     .input_schema(Schema.new_builder()
       .column("f0", DataTypes.STRING())
       .build())
     .output_schema(Schema.new_builder()
       .column("label", DataTypes.STRING())
       .build())
     .option("task", "classification")
     .option("type", "remote")
     .option("provider", "openai")
     .option("openai.endpoint", "remote")
     .option("openai.api_key", "abcdefg")
     .build(), true);



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to