Class AnthropicServerToolResult
java.lang.Object
dev.langchain4j.model.anthropic.AnthropicServerToolResult
Represents a result from an Anthropic server-executed tool (e.g., web_search, code_execution).
Content is stored as raw Object to be flexible and survive API changes.
Users can cast to Map<String, Object> or List<Map<String, Object>> as needed.
- Since:
- 1.10.0
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()content()The raw content from the API response.booleaninthashCode()The ID linking this result to the corresponding server_tool_use block.toString()type()The type of server tool result (e.g., "web_search_tool_result", "code_execution_tool_result").
-
Constructor Details
-
AnthropicServerToolResult
-
-
Method Details
-
type
The type of server tool result (e.g., "web_search_tool_result", "code_execution_tool_result"). -
toolUseId
The ID linking this result to the corresponding server_tool_use block. -
content
The raw content from the API response. For web_search: typically aList<Map<String, Object>>with search results. For code_execution: typically aMap<String, Object>with stdout, stderr, return_code, etc. -
equals
-
hashCode
-
toString
-
builder
-