MCPcopy Create free account
hub / github.com/abetlen/llama-cpp-python / _chat_message

Method _chat_message

examples/server/server.py:7926–7927  ·  view source on GitHub ↗
(data: Dict[str, Any])

Source from the content-addressed store, hash-verified

7924
7925 @staticmethod
7926 def _chat_message(data: Dict[str, Any]) -> ChatCompletionRequestMessage:
7927 return ChatCompletionRequestMessage.model_validate(data)
7928
7929 def _instructions_role(self) -> Literal["developer", "system"]:
7930 return "developer" if "developer" in self._chat_template_text() else "system"

Calls

no outgoing calls

Tested by

no test coverage detected