Skip to content

Commit 2e6fdd2

Browse files
committed
Review_comments
1 parent 7a035f5 commit 2e6fdd2

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

posts/2026-03-10-26.0.0.3-beta.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ See also link:{url-prefix}/blog/?search=beta&key=tag[previous Open Liberty beta
3838

3939
When a client calls a tool, the object that is returned by the tool method is converted to a `ToolResponse`, which usually contains one or more `Content` objects. The `ToolResponse` maps directly to the result returned in the response.
4040

41-
If you need more control over the response from your tool, you can return a `ToolResponse` or `Content` object directly. Now it is also possible to register encoders to control how other objects are converted into a response.
41+
If you need more control over the response from your tool, you can return a `ToolResponse` or `Content` object directly. Now, it is also possible to register encoders to control how other objects are converted into a response.
4242

4343
* Use `ToolResponseEncoder` to convert an object into a `ToolResponse`, which gives you complete control over the whole response.
4444
* Use `ContentEncoder` when you only need to convert an object into a `Content` that is included in the response. You can also return a list of objects, and each object is individually converted into a `Content` and included in the response.
@@ -47,7 +47,7 @@ If a tool method returns an object for which no encoder is provided, JSON-B enco
4747

4848
=== Example
4949

50-
Consider a tool which does a search over some datastore:
50+
Consider a tool that does a search over some datastore:
5151

5252
[source,java]
5353
----
@@ -60,12 +60,12 @@ public SearchResult search(@ToolArg(name="query", description="the query to run"
6060

6161
In this scenario, the `SearchResult` object encapsulates a list of individual results. Each entry contains a summary, associated metadata, and a relevance score that indicates its relationship to the query.
6262

63-
By default, the `SearchResult` object that is returned is encoded as JSON by using JSON-B and placed into a `TextContent`. However, to return each search result summary as an individual `TextContent` and map the relevance score to a priority annotation, a `ToolResponseEncoder` is to be used
63+
By default, the `SearchResult` object that is returned is encoded as JSON by using JSON-B and placed into a `TextContent`. However, to return each search result summary as an individual `TextContent` and map the relevance score to a priority annotation, a `ToolResponseEncoder` is to be used.
6464

6565
Create a CDI bean that implements the `ToolResponseEncoder` interface and implement:
6666

6767
* the `encode` method to create a `ToolResponse` from a `SearchResult`
68-
* the `supports` method to indicate that your encoder can be used for any `SearchResult`.
68+
* the `supports` method to indicate that your encoder can be used for any `SearchResult`
6969

7070
[source,java]
7171
----
@@ -127,7 +127,7 @@ public SearchResult search(@ToolArg(name="query") String query, RequestId reques
127127
The following bugs have been fixed:
128128

129129
* Output schemas were not generated correctly for asynchronous tool methods which have `structuredContent = true`
130-
* Omitting the `arguments` object when calling a tool would result in an error. The `arguments` object is optional if the tool does not require any arguments.
130+
* Omitting the `arguments` object when calling a tool would result in an error. The `arguments` object is optional if the tool does not require any arguments
131131

132132
[#run]
133133
=== Try it now

0 commit comments

Comments
 (0)