Skip to content

Conversation

@filiphr
Copy link
Contributor

@filiphr filiphr commented May 30, 2025

The ToolContext does not have a get(String) method. This PR is fixing the documentation to show the methods that can be used.

However, I think that it would be better if ToolContext had a get(String) method that would look like:

public Object get(String key) {
    return this.context.get(key);
}

It could also be made generic:

public <T> T get(String key) {
    return (T) this.context.get(key);
}

If you prefer to add the method, I can go ahead and create a PR for that instead

@filiphr filiphr force-pushed the update-documentation-for-non-existing-method branch from 7b87101 to e3aa15f Compare May 30, 2025 07:43
@ilayaperumalg ilayaperumalg self-assigned this May 30, 2025
@ilayaperumalg ilayaperumalg added documentation Improvements or additions to documentation bug Something isn't working for: backport-to-1.0.x labels May 30, 2025
@ilayaperumalg ilayaperumalg added this to the 1.1.x milestone May 30, 2025
@ilayaperumalg
Copy link
Member

@filiphr Thanks for fixing the documentation to use the right method for ToolContext!

@ilayaperumalg ilayaperumalg merged commit 72ed429 into spring-projects:main May 30, 2025
2 checks passed
ilayaperumalg pushed a commit that referenced this pull request May 30, 2025
@ilayaperumalg
Copy link
Member

Back-ported into 1.0.x as cd364e3

@filiphr filiphr deleted the update-documentation-for-non-existing-method branch May 30, 2025 08:25
namsoo2 pushed a commit to namsoo2/spring-ai that referenced this pull request Jun 9, 2025
chedim pushed a commit to couchbaselabs/spring-ai that referenced this pull request Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation for: backport-to-1.0.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants