From ab724a91c928b30117ae0efdf754dc7ecdc0d1a1 Mon Sep 17 00:00:00 2001 From: oldmanpushcart Date: Mon, 11 Mar 2024 01:12:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=91=E5=B8=83=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 3fcbee3..4c99ce2 100644 --- a/README.md +++ b/README.md @@ -81,14 +81,14 @@ final var client = QianFanClient.newBuilder() ```java // 对话请求 final var request = ChatRequest.newBuilder() - .model(ChatModel.ERNIE_V4) - .messages(Message.ofUser("hello!")) - .build(); + .model(ChatModel.ERNIE_V4) + .messages(Message.ofUser("hello!")) + .build(); // 对话响应 final var response = client.chat(request) - .async() - .join(); + .async() + .join(); // System.out.println(response); ``` @@ -170,17 +170,17 @@ final var response = client.chat(request) ```java final var request = ChatRequest.newBuilder() - .model(ChatModel.ERNIE_V4) - .functions(new QueryScoreFunction(), new ComputeAvgScoreFunction()) - .option(ChatOptions.IS_STREAM, true) - .option(ChatOptions.IS_ENABLE_SEARCH, false) - .option(ChatOptions.TEMPERATURE, 0.01f) - .messages(Message.ofUser("计算李四的语文和数学平均分")) - .build(); + .model(ChatModel.ERNIE_V4) + .functions(new QueryScoreFunction(), new ComputeAvgScoreFunction()) + .option(ChatOptions.IS_STREAM, true) + .option(ChatOptions.IS_ENABLE_SEARCH, false) + .option(ChatOptions.TEMPERATURE, 0.01f) + .messages(Message.ofUser("计算李四的语文和数学平均分")) + .build(); final var response = client.chat(request) - .async() - .join(); + .async() + .join(); // System.out.println(response.content()); ```