Skip to content

Commit

Permalink
添加发布脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
oldmanpushcart committed Mar 10, 2024
1 parent 6dbf7ed commit ab724a9
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
```
Expand Down Expand Up @@ -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());
```
Expand Down

0 comments on commit ab724a9

Please sign in to comment.