Source symbols: src/transformers/utils/chat_parsing/response_parser.py
Deterministic, value-free symbol metadata extracted from public source. Implementations and literal values are not copied into this page.
- Revision: main@9a0fe3f5dd36ffe1888133f09eb03f1eb14b8a6e · 2026-07-20T12:47:48Z
- Declarations: 15
- Referenced calls: 31
Declared symbols
parse_response— def at line 23; referencesload_response_template,ResponseParser,feed,finalize,ValueError,dictResponseParser— class at line 34; referencesload_response_template,ValueError,dict__init__— def at line 60; referencesload_response_template,ValueError,dict_consume_prefix— def at line 86; referencestruncate_past_last_anchor,_process,RuntimeError,isinstance,items,ValueError,_is_emptyfeed— def at line 100; referencesRuntimeError,_process,isinstance,items,ValueError,_is_emptyfinalize— def at line 111; referencesisinstance,RuntimeError,_process,items,ValueError,_is_empty_is_empty— def at line 117; referencesisinstance,RuntimeError,_process,items,ValueError_process— def at line 132; references_watchlist,_scan,start,_accumulate,end,_close_current,_open_explicit,len,values,append,search,and,_can_grow,min_watchlist— def at line 171; referencesvalues,append,len,search,and,_can_grow,min,start,end_scan— def at line 188; referenceslen,search,and,_can_grow,min,start,end,append_can_grow— def at line 238; referencesend,len,start,append_accumulate— def at line 257; referencesappend_open_explicit— def at line 274; referencesgroupdict,items_close_current— def at line 281; references_reset_to_implicit,process_field,setdefault,append_reset_to_implicit— def at line 297
File-level call references
load_response_template— line 27ResponseParser— line 28feed— line 29finalize— line 30ValueError— line 63dict— line 71_consume_prefix— line 84truncate_past_last_anchor— line 94_process— line 98RuntimeError— line 104isinstance— line 118items— line 124_is_empty— line 128_watchlist— line 134_scan— line 135start— line 139_accumulate— line 140end— line 141_close_current— line 143_open_explicit— line 144len— line 157values— line 179append— line 181search— line 220and— line 225_can_grow— line 225min— line 227groupdict— line 276_reset_to_implicit— line 286process_field— line 289setdefault— line 291
Source: src/transformers/utils/chat_parsing/response_parser.py