llmOS-Agent / src /schema.py
minchyeom's picture
Add 'system' role to Msg TypedDict for enhanced message handling
79f2753
raw
history blame contribute delete
302 Bytes
from __future__ import annotations
from typing import List, Literal, Optional, TypedDict
from ollama import Message
class Msg(TypedDict, total=False):
role: Literal["system", "user", "assistant", "tool"]
content: str
name: Optional[str]
tool_calls: Optional[List[Message.ToolCall]]