File size: 302 Bytes
0e02b97
 
 
 
 
 
 
 
79f2753
0e02b97
 
bedb8e2
1
2
3
4
5
6
7
8
9
10
11
12
13
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]]