davidradl commented on code in PR #26932:
URL: https://github.com/apache/flink/pull/26932#discussion_r2290685813


##########
docs/content/docs/connectors/models/deepseek.md:
##########
@@ -0,0 +1,221 @@
+---
+title: "DeepSeekAI"
+weight: 1
+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.
+-->
+
+# DeepSeek
+
+The DeepSeek Model Function allows Flink SQL to call [DeepSeek 
API](https://api-docs.deepseek.com/) for inference tasks.
+
+deepseek-chat: generate a model response from a list of messages comprising a 
conversation.
+deepseek-reasoner: get a vector representation of a given input that can be 
easily consumed by machine learning models and algorithms.
+
+## Usage Example
+The following example creates a dialogue model and uses it to desensitize 
sensitive information.
+
+First, create the chat completions model with the following SQL statement:
+
+```sql
+-- Create chat model
+CREATE MODEL ai_data_desensitization
+INPUT (input STRING)
+OUTPUT (content STRING)
+WITH (
+  'provider' = 'deepseek',
+  'endpoint' = 'https://api.deepseek.com/v1',
+  'api-key' = 'your-api-key',
+  'model' = 'deepseek-chat',
+  'system-prompt' = 'Please desensitize the last four digits of the entered 
data ID number into*.'
+
+);
+```
+
+Assuming the following data is stored in a table named 'user_info', the 
prediction results will be stored in a table named 'print_stink':
+
+```sql
+CREATE TEMPORARY VIEW user_info(id, user_name,  info, actual_label)
+AS VALUES
+  (1, 'mj', 'My name is mj, ID number number: 412721199803135419.', 
'positive');
+
+CREATE TEMPORARY TABLE print_sink(
+  id BIGINT,
+  user_name VARCHAR,
+  predicit_label VARCHAR,

Review Comment:
   should this be `predicted_label`?



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