aidputils.agents.tools.http.parsers.text_parser

Text response parser.

Default parser for plain text and unknown content types.

class aidputils.agents.tools.http.parsers.text_parser.TextResponseParser[source]

Bases: ResponseParser

Parser for text responses (fallback for unknown types).

classmethod content_types() List[str][source]

Return content-types this parser handles.

parse(raw_data: Any, headers: Dict[str, str]) Any[source]

Parse text response data.

Parameters:
  • raw_data – Raw response data

  • headers – Response headers

Returns:

Text string

get_response_type() str[source]

Return response type identifier.