Skip to content

Commit d97db5b

Browse files
author
Daniel OBrien
committed
Add LDMessage type
1 parent be7d0fa commit d97db5b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

ldai/types.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from enum import Enum
2-
from typing import Callable
2+
from typing import Callable, List, Literal
33
from dataclasses import dataclass
44

55
@dataclass
@@ -8,10 +8,15 @@ class TokenMetrics():
88
input: int
99
output: int # type: ignore
1010

11+
@dataclass
12+
class LDMessage():
13+
role: Literal['system', 'user', 'assistant']
14+
content: str
15+
1116
@dataclass
1217
class AIConfigData():
13-
config: dict
14-
prompt: any
18+
model: dict
19+
prompt: List[LDMessage]
1520
_ldMeta: dict
1621

1722
class AITracker():

0 commit comments

Comments
 (0)