MCPcopy Index your code
hub / github.com/abetlen/llama-cpp-python / ChatFormatterResponse

Class ChatFormatterResponse

llama_cpp/llama_chat_format.py:168–178  ·  view source on GitHub ↗

Dataclass that stores completion parameters for a given chat format and create_chat_completion request. prompt contains the formatted prompt generated from the chat format and messages. stop contains the stop token or list of stop tokens to use for the chat format.

Source from the content-addressed store, hash-verified

166
167@dataclasses.dataclass
168class ChatFormatterResponse:
169 """Dataclass that stores completion parameters for a given chat format and
170 create_chat_completion request.
171
172 prompt contains the formatted prompt generated from the chat format and messages.
173 stop contains the stop token or list of stop tokens to use for the chat format."""
174
175 prompt: str
176 stop: Optional[Union[str, List[str]]] = None
177 stopping_criteria: Optional[llama.StoppingCriteriaList] = None
178 added_special: bool = False
179
180
181class ChatFormatter(Protocol):

Callers 15

__call__Method · 0.85
format_autotokenizerFunction · 0.85
format_tokenizer_configFunction · 0.85
format_llama2Function · 0.85
format_llama3Function · 0.85
format_alpacaFunction · 0.85
format_qwenFunction · 0.85
formatFunction · 0.85
format_oasst_llamaFunction · 0.85
format_baichuan2Function · 0.85
format_baichuanFunction · 0.85
format_openbuddyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…