Class NaruAnthropicResponseParser
java.lang.Object
net.thevpc.naru.ext.models.anthropic.NaruAnthropicResponseParser
- All Implemented Interfaces:
net.thevpc.nuts.elem.NElementDeserializer<NaruResponse>
public class NaruAnthropicResponseParser
extends Object
implements net.thevpc.nuts.elem.NElementDeserializer<NaruResponse>
Parses an Anthropic Messages API response:
{
"id": "msg_...",
"type": "message",
"role": "assistant",
"content": [
{"type": "text", "text": "Hello"},
{"type": "tool_use", "id": "toolu_1", "name": "web_search", "input": {"q": "..."}}
],
"stop_reason": "end_turn" | "tool_use" | "max_tokens" | "stop_sequence",
"usage": {"input_tokens": 25, "output_tokens": 30}
}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparseInput(net.thevpc.nuts.elem.NElement inputEl) toObject(net.thevpc.nuts.elem.NElementDeserializerContext context)
-
Constructor Details
-
NaruAnthropicResponseParser
public NaruAnthropicResponseParser()
-
-
Method Details
-
toObject
- Specified by:
toObjectin interfacenet.thevpc.nuts.elem.NElementDeserializer<NaruResponse>
-
parseInput
-