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


##########
flink-models/flink-model-deepseek/src/main/java/org/apache/flink/model/deepseek/DeepSeekChatAndEmbeddingModelFunction.java:
##########
@@ -0,0 +1,189 @@
+/*
+ * 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.
+ */
+
+package org.apache.flink.model.deepseek;
+
+import org.apache.flink.configuration.ConfigOption;
+import org.apache.flink.configuration.ConfigOptions;
+import org.apache.flink.configuration.ReadableConfig;
+import org.apache.flink.table.data.GenericRowData;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.data.binary.BinaryStringData;
+import org.apache.flink.table.factories.ModelProviderFactory;
+import org.apache.flink.table.functions.AsyncPredictFunction;
+import org.apache.flink.table.types.logical.VarCharType;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonObject;
+import okhttp3.MediaType;
+import okhttp3.Request;
+import okhttp3.RequestBody;
+import okhttp3.Response;
+import java.io.IOException;
+
+import javax.annotation.Nullable;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.stream.Collectors;
+
+/** {@link AsyncPredictFunction} for DeepSeek chat completion task. */
+public class DeepSeekChatAndEmbeddingModelFunction extends 
AbstractDeepSeekModelFunction {
+    private static final long serialVersionUID = 1L;
+
+    public static final String ENDPOINT_SUFFIX = "chat/completions";
+
+    public static final ConfigOption<String> SYSTEM_PROMPT = 
+            ConfigOptions.key("system-prompt")
+                    .stringType()
+                    .defaultValue("You are a helpful assistant.")
+                    .withDescription("System message for chat tasks.");
+
+    public static final ConfigOption<Double> TEMPERATURE = 
+            ConfigOptions.key("temperature")
+                    .doubleType()
+                    .noDefaultValue()

Review Comment:
   the docs say that temperature has a default of 0.7



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