Skip to content

Fix various typos and casing inconsistencies across the codebase #2823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
ee816b5
fix: correct name typo from 'stdoiTransports' to 'stdioTransports', '…
ohiomanbo Apr 21, 2025
f364d1f
fix: correct name typo from 'AsynClients' to 'AsyncClients'
ohiomanbo Apr 21, 2025
45cc1b0
fix: correct name typo from 'Autoconfiguration' to 'AutoConfiguration…
ohiomanbo Apr 21, 2025
d2393df
fix: correct name typo from 'Differnt' to 'Different'
ohiomanbo Apr 21, 2025
f16dde7
fix: correct name typo from 'Compatability' to 'Compatibility'
ohiomanbo Apr 21, 2025
b67fe95
fix: correct name typo from 'Evalutaor' to 'Evaluator'
ohiomanbo Apr 21, 2025
bc61126
fix: correct name typo from 'Empyt' to 'Empty'
ohiomanbo Apr 21, 2025
170cd41
fix: correct name typo from 'Chroma Vecor Store' to 'Chroma Vector St…
ohiomanbo Apr 21, 2025
2bcac60
fix: correct name typo from 'Specificaiton' to 'Specification'
ohiomanbo Apr 21, 2025
eff421f
fix: correct name typo from 'applicaiton' to 'application'
ohiomanbo Apr 21, 2025
134f4d8
fix: correct name typo from 'apropriate' to 'appropriate'
ohiomanbo Apr 21, 2025
6362fe7
fix: correct name typo from 'asigned' to 'assigned'
ohiomanbo Apr 21, 2025
8a95926
fix: correct name typo from 'capabilitity' to 'capability'
ohiomanbo Apr 21, 2025
2395f3f
fix: correct name typo from 'configuraiton' to 'configuration'
ohiomanbo Apr 21, 2025
045b59a
fix: correct name typo from 'conntection' to 'connection'
ohiomanbo Apr 21, 2025
947d748
fix: correct name typo from 'curent' to 'current'
ohiomanbo Apr 21, 2025
996df31
fix: correct name typo from 'customised' to 'customized'
ohiomanbo Apr 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public List<McpAsyncClient> mcpAsyncClients(McpAsyncClientConfigurer mcpSyncClie

@Bean
@ConditionalOnProperty(prefix = McpClientCommonProperties.CONFIG_PREFIX, name = "type", havingValue = "ASYNC")
public CloseableMcpAsyncClients makeAsynClientsClosable(List<McpAsyncClient> clients) {
public CloseableMcpAsyncClients makeAsyncClientsClosable(List<McpAsyncClient> clients) {
return new CloseableMcpAsyncClients(clients);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
@AutoConfiguration(after = { McpClientAutoConfiguration.class })
@EnableConfigurationProperties(McpClientCommonProperties.class)
@Conditional(McpToolCallbackAutoConfiguration.McpToolCallbackAutoconfigurationCondition.class)
@Conditional(McpToolCallbackAutoConfiguration.McpToolCallbackAutoConfigurationCondition.class)
public class McpToolCallbackAutoConfiguration {

/**
Expand All @@ -64,9 +64,9 @@ public ToolCallbackProvider mcpAsyncToolCallbacks(ObjectProvider<List<McpAsyncCl
return new AsyncMcpToolCallbackProvider(mcpClients);
}

public static class McpToolCallbackAutoconfigurationCondition extends AllNestedConditions {
public static class McpToolCallbackAutoConfigurationCondition extends AllNestedConditions {

public McpToolCallbackAutoconfigurationCondition() {
public McpToolCallbackAutoConfigurationCondition() {
super(ConfigurationPhase.PARSE_CONFIGURATION);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,21 @@ public class StdioTransportAutoConfiguration {
* <li>Server-specific parameters from properties
* <li>Unique connection name for identification
* </ul>
* @param sdioProperties the stdio client properties containing server configurations
* @param stdioProperties the stdio client properties containing server configurations
* @return list of named MCP transports
*/
@Bean
public List<NamedClientMcpTransport> stdioTransports(McpStdioClientProperties sdioProperties) {
public List<NamedClientMcpTransport> stdioTransports(McpStdioClientProperties stdioProperties) {

List<NamedClientMcpTransport> stdoiTransports = new ArrayList<>();
List<NamedClientMcpTransport> stdioTransports = new ArrayList<>();

for (Map.Entry<String, ServerParameters> serverParameters : sdioProperties.toServerParameters().entrySet()) {
for (Map.Entry<String, ServerParameters> serverParameters : stdioProperties.toServerParameters().entrySet()) {
var transport = new StdioClientTransport(serverParameters.getValue());
stdoiTransports.add(new NamedClientMcpTransport(serverParameters.getKey(), transport));
stdioTransports.add(new NamedClientMcpTransport(serverParameters.getKey(), transport));

}

return stdoiTransports;
return stdioTransports;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import org.junit.jupiter.api.Test;

import org.springframework.ai.mcp.client.autoconfigure.McpToolCallbackAutoConfiguration.McpToolCallbackAutoconfigurationCondition;
import org.springframework.ai.mcp.client.autoconfigure.McpToolCallbackAutoConfiguration.McpToolCallbackAutoConfigurationCondition;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
Expand All @@ -27,9 +27,9 @@
import static org.assertj.core.api.Assertions.assertThat;

/**
* Tests for {@link McpToolCallbackAutoconfigurationCondition}.
* Tests for {@link McpToolCallbackAutoConfigurationCondition}.
*/
public class McpToolCallbackAutoconfigurationConditionTests {
public class McpToolCallbackAutoConfigurationConditionTests {

private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withUserConfiguration(TestConfiguration.class);
Expand Down Expand Up @@ -78,7 +78,7 @@ void doesNotMatchWhenBothPropertiesAreMissing() {
}

@Configuration
@Conditional(McpToolCallbackAutoconfigurationCondition.class)
@Conditional(McpToolCallbackAutoConfigurationCondition.class)
static class TestConfiguration {

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class McpToolCallbackAutoConfigurationTests {
.withConfiguration(AutoConfigurations.of(McpToolCallbackAutoConfiguration.class));

@Test
void disabledByDeafault() {
void disabledByDefault() {

this.applicationContext.run(context -> {
assertThat(context).doesNotHaveBean("mcpToolCallbacks");
Expand All @@ -52,7 +52,7 @@ void disabledByDeafault() {
}

@Test
void enabledMcpToolCallbackAutoconfiguration() {
void enabledMcpToolCallbackAutoConfiguration() {

// sync
this.applicationContext.withPropertyValues("spring.ai.mcp.client.toolcallback.enabled=true").run(context -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ void callWith8KResponseContext() {
"spring.ai.anthropic.chat.options.model=" + AnthropicApi.ChatModel.CLAUDE_3_5_SONNET.getValue())
.run(context -> {
AnthropicChatModel chatModel = context.getBean(AnthropicChatModel.class);
var optoins = AnthropicChatOptions.builder().maxTokens(8192).build();
var response = chatModel.call(new Prompt("Tell me a joke", optoins));
var options = AnthropicChatOptions.builder().maxTokens(8192).build();
var response = chatModel.call(new Prompt("Tell me a joke", options));
assertThat(response.getResult().getOutput().getText()).isNotEmpty();
logger.info("Response: " + response);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ public class VertexAiTextEmbeddingModelAutoConfigurationIT {
public void textEmbedding() {
this.contextRunner.withConfiguration(AutoConfigurations.of(VertexAiTextEmbeddingAutoConfiguration.class))
.run(context -> {
var conntectionProperties = context.getBean(VertexAiEmbeddingConnectionProperties.class);
var connectionProperties = context.getBean(VertexAiEmbeddingConnectionProperties.class);
var textEmbeddingProperties = context.getBean(VertexAiTextEmbeddingProperties.class);

assertThat(conntectionProperties).isNotNull();
assertThat(connectionProperties).isNotNull();

VertexAiTextEmbeddingModel embeddingModel = context.getBean(VertexAiTextEmbeddingModel.class);
assertThat(embeddingModel).isInstanceOf(VertexAiTextEmbeddingModel.class);
Expand Down Expand Up @@ -97,10 +97,10 @@ void textEmbeddingActivation() {
public void multimodalEmbedding() {
this.contextRunner.withConfiguration(AutoConfigurations.of(VertexAiMultiModalEmbeddingAutoConfiguration.class))
.run(context -> {
var conntectionProperties = context.getBean(VertexAiEmbeddingConnectionProperties.class);
var connectionProperties = context.getBean(VertexAiEmbeddingConnectionProperties.class);
var multimodalEmbeddingProperties = context.getBean(VertexAiMultimodalEmbeddingProperties.class);

assertThat(conntectionProperties).isNotNull();
assertThat(connectionProperties).isNotNull();

VertexAiMultimodalEmbeddingModel multiModelEmbeddingModel = context
.getBean(VertexAiMultimodalEmbeddingModel.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void getToolCallbacksShouldThrowExceptionForDuplicateToolNames() {
}

@Test
void getSameNameToolsButDifferntClientInfoNamesShouldProduceDifferentToolCallbackNames() {
void getSameNameToolsButDifferentClientInfoNamesShouldProduceDifferentToolCallbackNames() {

Tool tool1 = mock(Tool.class);
when(tool1.name()).thenReturn("sameName");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void constructorShouldBePrivate() throws Exception {
}

@Test
void toSyncToolSpecificaitonShouldConvertSingleCallback() {
void toSyncToolSpecificationShouldConvertSingleCallback() {

ToolCallback callback = createMockToolCallback("test", "success");

Expand Down Expand Up @@ -138,7 +138,7 @@ void toSyncToolSpecificationShouldConvertMultipleCallbacks() {
}

@Test
void toAsyncToolSpecificaitonShouldConvertSingleCallback() {
void toAsyncToolSpecificationShouldConvertSingleCallback() {
ToolCallback callback = createMockToolCallback("test", "success");

AsyncToolSpecification toolSpecification = McpToolUtils.toAsyncToolSpecification(callback);
Expand All @@ -160,10 +160,10 @@ void toAsyncToolSpecificaitonShouldConvertSingleCallback() {
void toAsyncToolSpecificationShouldHandleError() {
ToolCallback callback = createMockToolCallback("test", new RuntimeException("error"));

AsyncToolSpecification toolSpecificaiton = McpToolUtils.toAsyncToolSpecification(callback);
AsyncToolSpecification toolSpecification = McpToolUtils.toAsyncToolSpecification(callback);

assertThat(toolSpecificaiton).isNotNull();
StepVerifier.create(toolSpecificaiton.call().apply(mock(McpAsyncServerExchange.class), Map.of()))
assertThat(toolSpecification).isNotNull();
StepVerifier.create(toolSpecification.call().apply(mock(McpAsyncServerExchange.class), Map.of()))
.assertNext(result -> {
TextContent content = (TextContent) result.content().get(0);
assertThat(content.text()).isEqualTo("error");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public enum AzureOpenAiResponseFormat {
// default value used by OpenAI
TEXT,
/*
* From the OpenAI API documentation: Compatability: Compatible with GPT-4 Turbo and
* From the OpenAI API documentation: Compatibility: Compatible with GPT-4 Turbo and
* all GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106. Caveats: This enables JSON
* mode, which guarantees the message the model generates is valid JSON. Important:
* when using JSON mode, you must also instruct the model to produce JSON yourself via
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class MistralAiChatModelIT {
protected Resource qaEvaluatorNotRelatedResource;

@Value("classpath:/prompts/eval/qa-evaluator-fact-based-answer.st")
protected Resource qaEvalutaorFactBasedAnswerResource;
protected Resource qaEvaluatorFactBasedAnswerResource;

@Value("classpath:/prompts/eval/user-evaluator-message.st")
protected Resource userEvaluatorResource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public static class Builder {
private String publisher;

/**
* Allows the connection settings to be customised
* Allows the connection settings to be customized
*/
private PredictionServiceSettings predictionServiceSettings;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ public Flux<ChatResponse> internalStream(Prompt prompt, ChatResponse previousCha

protected List<Generation> responseCandidateToGeneration(Candidate candidate) {

// TODO - The candidateIndex (e.g. choice must be asigned to the generation).
// TODO - The candidateIndex (e.g. choice must be assigned to the generation).
int candidateIndex = candidate.getIndex();
FinishReason candidateFinishReason = candidate.getFinishReason();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ TIP: In addition to the model specific https://github.com/spring-projects/spring

== Function Calling

NOTE: The current version of the deepseek-chat model's Function Calling capabilitity is unstable, which may result in looped calls or empty responses.
NOTE: The current version of the deepseek-chat model's Function Calling capability is unstable, which may result in looped calls or empty responses.

== Multimodal

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ link:https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/gemin

== Prerequisites

- Install the link:https://cloud.google.com/sdk/docs/install[gcloud] CLI, apropriate for you OS.
- Install the link:https://cloud.google.com/sdk/docs/install[gcloud] CLI, appropriate for you OS.
- Authenticate by running the following command.
Replace `PROJECT_ID` with your Google Cloud project ID and `ACCOUNT` with your Google Cloud username.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The following are the components for which the cloud binding support is currentl
[cols="|,|"]
|====
| Service Type | Binding Type | Source Properties | Target Properties
| `Chroma Vecor Store`
| `Chroma Vector Store`
| `chroma` | `uri`, `username`, `passwor` | `spring.ai.vectorstore.chroma.client.host`, `spring.ai.vectorstore.chroma.client.port`, `spring.ai.vectorstore.chroma.client.username`, `spring.ai.vectorstore.chroma.client.host.password`

| `Mistral AI`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ The prefix `spring.ai.azure.openai` is the property prefix to configure the conn
| spring.ai.azure.openai.endpoint | The endpoint from the Azure AI OpenAI `Keys and Endpoint` section under `Resource Management` | -
| spring.ai.azure.openai.openai-api-key | (non Azure) OpenAI API key. Used to authenticate with the OpenAI service, instead of Azure OpenAI.
This automatically sets the endpoint to https://api.openai.com/v1. Use either `api-key` or `openai-api-key` property.
With this configuraiton the `spring.ai.azure.openai.embedding.options.deployment-name` is threated as an https://platform.openai.com/docs/models[OpenAi Model] name.| -
With this configuration the `spring.ai.azure.openai.embedding.options.deployment-name` is threated as an https://platform.openai.com/docs/models[OpenAi Model] name.| -
|====


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ that means that you model is larger than 2GB and is serialized in two files: `mo

The `model.onnx_data` is called link:https://onnx.ai/onnx/repo-docs/ExternalData.html#external-data[External Data] and is expected to be under the same directory of the `model.onnx`.

Currently the only workaround is to copy the large `model.onnx_data` in the folder you run your Boot applicaiton.
Currently the only workaround is to copy the large `model.onnx_data` in the folder you run your Boot application.
====

[NOTE]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ Async::
[source,java]
----
List<ToolCallback> toolCallbacks = // obtain tool callbacks
List<AsyncToolSpecification> asyncToolSpecificaitons = McpToolUtils.toAsyncToolSpecifications(toolCallbacks);
List<AsyncToolSpecification> asyncToolSpecifications = McpToolUtils.toAsyncToolSpecifications(toolCallbacks);
----
+
then you can use the `McpServer.AsyncSpecification` to register the tool specifications:
+
[source,java]
----
McpServer.AsyncSpecification asyncSpec = ...
asyncSpec.tools(asyncToolSpecificaitons);
asyncSpec.tools(asyncToolSpecifications);
----
======

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.util.Map;

/**
* A EmpytUsage implementation that returns zero for all property getters
* A EmptyUsage implementation that returns zero for all property getters
*
* @author John Blum
* @author Ilayaperumal Gopinathan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static Usage getCumulativeUsage(final Usage currentUsage, final ChatRespo
usageFromPreviousChatResponse = previousChatResponse.getMetadata().getUsage();
}
else {
// Return the curent usage when the previous chat response usage is empty or
// Return the current usage when the previous chat response usage is empty or
// null.
return currentUsage;
}
Expand Down