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

Class ChatCompletionRequestMessage

examples/server/server.py:2705–2718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2703
2704
2705class ChatCompletionRequestMessage(BaseModel):
2706 model_config = ConfigDict(
2707 extra="allow",
2708 json_schema_extra=omit_additional_properties,
2709 )
2710
2711 role: Literal["system", "developer", "user", "assistant", "tool", "function"] = Field(
2712 default="user"
2713 )
2714 content: Optional[Union[str, List[Dict[str, Any]]]] = Field(default="")
2715 name: Optional[str] = Field(default=None)
2716 tool_call_id: Optional[str] = Field(default=None)
2717 function_call: Optional[ChatCompletionFunctionCall] = Field(default=None)
2718 tool_calls: Optional[List[ChatCompletionToolCall]] = Field(default=None)
2719
2720
2721class ChatTemplateFunctionDefinition(TypedDict, total=False):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…