Skip to content

Commit

Permalink
Fix typos (#1223)
Browse files Browse the repository at this point in the history
  • Loading branch information
izeye committed Aug 15, 2024
1 parent a051978 commit 2d6117b
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ public record PingEvent(// @formatter:off
public ResponseEntity<ChatCompletionResponse> chatCompletionEntity(ChatCompletionRequest chatRequest) {

Assert.notNull(chatRequest, "The request body can not be null.");
Assert.isTrue(!chatRequest.stream(), "Request must set the steam property to false.");
Assert.isTrue(!chatRequest.stream(), "Request must set the stream property to false.");

return this.restClient.post()
.uri("/v1/messages")
Expand All @@ -902,7 +902,7 @@ public ResponseEntity<ChatCompletionResponse> chatCompletionEntity(ChatCompletio
public Flux<ChatCompletionResponse> chatCompletionStream(ChatCompletionRequest chatRequest) {

Assert.notNull(chatRequest, "The request body can not be null.");
Assert.isTrue(chatRequest.stream(), "Request must set the steam property to true.");
Assert.isTrue(chatRequest.stream(), "Request must set the stream property to true.");

AtomicBoolean isInsideTool = new AtomicBoolean(false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ public record ChunkChoice(
public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest chatRequest) {

Assert.notNull(chatRequest, "The request body can not be null.");
Assert.isTrue(!chatRequest.stream(), "Request must set the steam property to false.");
Assert.isTrue(!chatRequest.stream(), "Request must set the stream property to false.");

return this.restClient.post()
.uri("/v1/text/chatcompletion_v2")
Expand All @@ -698,7 +698,7 @@ public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest
public Flux<ChatCompletionChunk> chatCompletionStream(ChatCompletionRequest chatRequest) {

Assert.notNull(chatRequest, "The request body can not be null.");
Assert.isTrue(chatRequest.stream(), "Request must set the steam property to true.");
Assert.isTrue(chatRequest.stream(), "Request must set the stream property to true.");

AtomicBoolean isInsideTool = new AtomicBoolean(false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ public String getValue() {
public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest chatRequest) {

Assert.notNull(chatRequest, "The request body can not be null.");
Assert.isTrue(!chatRequest.stream(), "Request must set the steam property to false.");
Assert.isTrue(!chatRequest.stream(), "Request must set the stream property to false.");

return this.restClient.post()
.uri("/v1/chat/completions")
Expand All @@ -785,7 +785,7 @@ public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest
public Flux<ChatCompletionChunk> chatCompletionStream(ChatCompletionRequest chatRequest) {

Assert.notNull(chatRequest, "The request body can not be null.");
Assert.isTrue(chatRequest.stream(), "Request must set the steam property to true.");
Assert.isTrue(chatRequest.stream(), "Request must set the stream property to true.");

AtomicBoolean isInsideTool = new AtomicBoolean(false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ public Function(String description, String name, String jsonSchema) {
public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest chatRequest) {

Assert.notNull(chatRequest, "The request body can not be null.");
Assert.isTrue(!chatRequest.stream(), "Request must set the steam property to false.");
Assert.isTrue(!chatRequest.stream(), "Request must set the stream property to false.");

return this.restClient.post()
.uri("/v1/chat/completions")
Expand All @@ -589,7 +589,7 @@ public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest
*/
public Flux<ChatCompletionChunk> chatCompletionStream(ChatCompletionRequest chatRequest) {
Assert.notNull(chatRequest, "The request body can not be null.");
Assert.isTrue(chatRequest.stream(), "Request must set the steam property to true.");
Assert.isTrue(chatRequest.stream(), "Request must set the stream property to true.");

return this.webClient.post()
.uri("/v1/chat/completions")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ public GenerateResponse generate(GenerateRequest completionRequest) {
@Deprecated(since = "1.0.0-M2", forRemoval = true)
public Flux<GenerateResponse> generateStreaming(GenerateRequest completionRequest) {
Assert.notNull(completionRequest, REQUEST_BODY_NULL_ERROR);
Assert.isTrue(completionRequest.stream(), "Request must set the steam property to true.");
Assert.isTrue(completionRequest.stream(), "Request must set the stream property to true.");

return webClient.post()
.uri("/api/generate")
Expand Down Expand Up @@ -669,7 +669,7 @@ public ChatResponse chat(ChatRequest chatRequest) {
*/
public Flux<ChatResponse> streamingChat(ChatRequest chatRequest) {
Assert.notNull(chatRequest, REQUEST_BODY_NULL_ERROR);
Assert.isTrue(chatRequest.stream(), "Request must set the steam property to true.");
Assert.isTrue(chatRequest.stream(), "Request must set the stream property to true.");

return webClient.post()
.uri("/api/chat")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest
MultiValueMap<String, String> additionalHttpHeader) {

Assert.notNull(chatRequest, "The request body can not be null.");
Assert.isTrue(!chatRequest.stream(), "Request must set the steam property to false.");
Assert.isTrue(!chatRequest.stream(), "Request must set the stream property to false.");
Assert.notNull(additionalHttpHeader, "The additional HTTP headers can not be null.");

return this.restClient.post()
Expand Down Expand Up @@ -1009,7 +1009,7 @@ public Flux<ChatCompletionChunk> chatCompletionStream(ChatCompletionRequest chat
MultiValueMap<String, String> additionalHttpHeader) {

Assert.notNull(chatRequest, "The request body can not be null.");
Assert.isTrue(chatRequest.stream(), "Request must set the steam property to true.");
Assert.isTrue(chatRequest.stream(), "Request must set the stream property to true.");

AtomicBoolean isInsideTool = new AtomicBoolean(false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ public record ChatCompletionChunk(
public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest chatRequest) {

Assert.notNull(chatRequest, "The request body can not be null.");
Assert.isTrue(!chatRequest.stream(), "Request must set the steam property to false.");
Assert.isTrue(!chatRequest.stream(), "Request must set the stream property to false.");

return this.restClient.post()
.uri("/v1/wenxinworkshop/chat/{model}?access_token={token}",chatRequest.model, getAccessToken())
Expand All @@ -370,7 +370,7 @@ public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest
*/
public Flux<ChatCompletionChunk> chatCompletionStream(ChatCompletionRequest chatRequest) {
Assert.notNull(chatRequest, "The request body can not be null.");
Assert.isTrue(chatRequest.stream(), "Request must set the steam property to true.");
Assert.isTrue(chatRequest.stream(), "Request must set the stream property to true.");

return this.webClient.post()
.uri("/v1/wenxinworkshop/chat/{model}?access_token={token}",chatRequest.model, getAccessToken())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ public record ChunkChoice(
public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest chatRequest) {

Assert.notNull(chatRequest, "The request body can not be null.");
Assert.isTrue(!chatRequest.stream(), "Request must set the steam property to false.");
Assert.isTrue(!chatRequest.stream(), "Request must set the stream property to false.");

return this.restClient.post()
.uri("/v4/chat/completions")
Expand All @@ -672,7 +672,7 @@ public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest
public Flux<ChatCompletionChunk> chatCompletionStream(ChatCompletionRequest chatRequest) {

Assert.notNull(chatRequest, "The request body can not be null.");
Assert.isTrue(chatRequest.stream(), "Request must set the steam property to true.");
Assert.isTrue(chatRequest.stream(), "Request must set the stream property to true.");

AtomicBoolean isInsideTool = new AtomicBoolean(false);

Expand Down

0 comments on commit 2d6117b

Please sign in to comment.