From 2d6117b796ee045b508090604e35ecea1d3c2c3d Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Thu, 15 Aug 2024 23:27:12 +0900 Subject: [PATCH] Fix typos (#1223) --- .../org/springframework/ai/anthropic/api/AnthropicApi.java | 4 ++-- .../java/org/springframework/ai/minimax/api/MiniMaxApi.java | 4 ++-- .../org/springframework/ai/mistralai/api/MistralAiApi.java | 4 ++-- .../java/org/springframework/ai/moonshot/api/MoonshotApi.java | 4 ++-- .../java/org/springframework/ai/ollama/api/OllamaApi.java | 4 ++-- .../java/org/springframework/ai/openai/api/OpenAiApi.java | 4 ++-- .../java/org/springframework/ai/qianfan/api/QianFanApi.java | 4 ++-- .../java/org/springframework/ai/zhipuai/api/ZhiPuAiApi.java | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/models/spring-ai-anthropic/src/main/java/org/springframework/ai/anthropic/api/AnthropicApi.java b/models/spring-ai-anthropic/src/main/java/org/springframework/ai/anthropic/api/AnthropicApi.java index 51eb70ab7..fe44ecb22 100644 --- a/models/spring-ai-anthropic/src/main/java/org/springframework/ai/anthropic/api/AnthropicApi.java +++ b/models/spring-ai-anthropic/src/main/java/org/springframework/ai/anthropic/api/AnthropicApi.java @@ -882,7 +882,7 @@ public class AnthropicApi { public ResponseEntity 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") @@ -902,7 +902,7 @@ public class AnthropicApi { public Flux 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); diff --git a/models/spring-ai-minimax/src/main/java/org/springframework/ai/minimax/api/MiniMaxApi.java b/models/spring-ai-minimax/src/main/java/org/springframework/ai/minimax/api/MiniMaxApi.java index 9218cd128..aedaed9d4 100644 --- a/models/spring-ai-minimax/src/main/java/org/springframework/ai/minimax/api/MiniMaxApi.java +++ b/models/spring-ai-minimax/src/main/java/org/springframework/ai/minimax/api/MiniMaxApi.java @@ -678,7 +678,7 @@ public class MiniMaxApi { public ResponseEntity 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") @@ -698,7 +698,7 @@ public class MiniMaxApi { public Flux 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); diff --git a/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/api/MistralAiApi.java b/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/api/MistralAiApi.java index 7796b58e0..cd31077d8 100644 --- a/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/api/MistralAiApi.java +++ b/models/spring-ai-mistral-ai/src/main/java/org/springframework/ai/mistralai/api/MistralAiApi.java @@ -765,7 +765,7 @@ public class MistralAiApi { public ResponseEntity 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") @@ -785,7 +785,7 @@ public class MistralAiApi { public Flux 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); diff --git a/models/spring-ai-moonshot/src/main/java/org/springframework/ai/moonshot/api/MoonshotApi.java b/models/spring-ai-moonshot/src/main/java/org/springframework/ai/moonshot/api/MoonshotApi.java index e1ecb4add..78ec36f2f 100644 --- a/models/spring-ai-moonshot/src/main/java/org/springframework/ai/moonshot/api/MoonshotApi.java +++ b/models/spring-ai-moonshot/src/main/java/org/springframework/ai/moonshot/api/MoonshotApi.java @@ -572,7 +572,7 @@ public class MoonshotApi { public ResponseEntity 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") @@ -589,7 +589,7 @@ public class MoonshotApi { */ public Flux 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") diff --git a/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaApi.java b/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaApi.java index eeb003d53..29c2e5ad0 100644 --- a/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaApi.java +++ b/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaApi.java @@ -336,7 +336,7 @@ public class OllamaApi { @Deprecated(since = "1.0.0-M2", forRemoval = true) public Flux 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") @@ -669,7 +669,7 @@ public class OllamaApi { */ public Flux 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") diff --git a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java index 73149dd75..d805bd1fb 100644 --- a/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java +++ b/models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java @@ -974,7 +974,7 @@ public class OpenAiApi { MultiValueMap 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() @@ -1009,7 +1009,7 @@ public class OpenAiApi { MultiValueMap 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); diff --git a/models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/api/QianFanApi.java b/models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/api/QianFanApi.java index 36eabe441..7dcfb67a1 100644 --- a/models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/api/QianFanApi.java +++ b/models/spring-ai-qianfan/src/main/java/org/springframework/ai/qianfan/api/QianFanApi.java @@ -353,7 +353,7 @@ public class QianFanApi extends AuthApi { public ResponseEntity 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()) @@ -370,7 +370,7 @@ public class QianFanApi extends AuthApi { */ public Flux 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()) diff --git a/models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/api/ZhiPuAiApi.java b/models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/api/ZhiPuAiApi.java index a7fc4c9c9..f634c8a8e 100644 --- a/models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/api/ZhiPuAiApi.java +++ b/models/spring-ai-zhipuai/src/main/java/org/springframework/ai/zhipuai/api/ZhiPuAiApi.java @@ -652,7 +652,7 @@ public class ZhiPuAiApi { public ResponseEntity 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") @@ -672,7 +672,7 @@ public class ZhiPuAiApi { public Flux 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);