Skip to content

Commit 2d6117b

Browse files
authored
Fix typos (#1223)
1 parent a051978 commit 2d6117b

File tree

8 files changed

+16
-16
lines changed
  • models
    • spring-ai-anthropic/src/main/java/org/springframework/ai/anthropic/api
    • spring-ai-minimax/src/main/java/org/springframework/ai/minimax/api
    • spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/api
    • spring-ai-moonshot/src/main/java/org/springframework/ai/moonshot/api
    • spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api
    • spring-ai-openai/src/main/java/org/springframework/ai/openai/api
    • spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/api
    • spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/api

8 files changed

+16
-16
lines changed

models/spring-ai-anthropic/src/main/java/org/springframework/ai/anthropic/api/AnthropicApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ public record PingEvent(// @formatter:off
882882
public ResponseEntity<ChatCompletionResponse> chatCompletionEntity(ChatCompletionRequest chatRequest) {
883883

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

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

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

907907
AtomicBoolean isInsideTool = new AtomicBoolean(false);
908908

models/spring-ai-minimax/src/main/java/org/springframework/ai/minimax/api/MiniMaxApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ public record ChunkChoice(
678678
public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest chatRequest) {
679679

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

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

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

703703
AtomicBoolean isInsideTool = new AtomicBoolean(false);
704704

models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/api/MistralAiApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ public String getValue() {
765765
public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest chatRequest) {
766766

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

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

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

790790
AtomicBoolean isInsideTool = new AtomicBoolean(false);
791791

models/spring-ai-moonshot/src/main/java/org/springframework/ai/moonshot/api/MoonshotApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ public Function(String description, String name, String jsonSchema) {
572572
public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest chatRequest) {
573573

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

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

594594
return this.webClient.post()
595595
.uri("/v1/chat/completions")

models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ public GenerateResponse generate(GenerateRequest completionRequest) {
336336
@Deprecated(since = "1.0.0-M2", forRemoval = true)
337337
public Flux<GenerateResponse> generateStreaming(GenerateRequest completionRequest) {
338338
Assert.notNull(completionRequest, REQUEST_BODY_NULL_ERROR);
339-
Assert.isTrue(completionRequest.stream(), "Request must set the steam property to true.");
339+
Assert.isTrue(completionRequest.stream(), "Request must set the stream property to true.");
340340

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

674674
return webClient.post()
675675
.uri("/api/chat")

models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest
974974
MultiValueMap<String, String> additionalHttpHeader) {
975975

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

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

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

10141014
AtomicBoolean isInsideTool = new AtomicBoolean(false);
10151015

models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/api/QianFanApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ public record ChatCompletionChunk(
353353
public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest chatRequest) {
354354

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

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

375375
return this.webClient.post()
376376
.uri("/v1/wenxinworkshop/chat/{model}?access_token={token}",chatRequest.model, getAccessToken())

models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/api/ZhiPuAiApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ public record ChunkChoice(
652652
public ResponseEntity<ChatCompletion> chatCompletionEntity(ChatCompletionRequest chatRequest) {
653653

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

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

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

677677
AtomicBoolean isInsideTool = new AtomicBoolean(false);
678678

0 commit comments

Comments
 (0)