File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 77from mellea .stdlib .base import (
88 CBlock ,
99 Component ,
10+ Context ,
1011 ImageBlock ,
11- LegacyContext ,
1212 ModelOutputThunk ,
1313 ModelToolCall ,
1414 TemplateRepresentation ,
@@ -113,7 +113,7 @@ def __str__(self):
113113 return f'mellea.Message(role="{ self .role } ", content="{ self .content } ", name="{ self .name } ")'
114114
115115
116- def as_chat_history (ctx : LegacyContext ) -> list [Message ]:
116+ def as_chat_history (ctx : Context ) -> list [Message ]:
117117 """Returns a list of Messages corresponding to a Context."""
118118
119119 def _to_msg (c : CBlock | Component | ModelOutputThunk ) -> Message | None :
@@ -129,7 +129,7 @@ def _to_msg(c: CBlock | Component | ModelOutputThunk) -> Message | None:
129129 case _:
130130 return None
131131
132- all_ctx_events = ctx .full_event_log ()
132+ all_ctx_events = ctx .full_data_as_list ()
133133 if all_ctx_events is None :
134134 raise Exception ("Trying to cast a non-linear history into a chat history." )
135135 else :
You can’t perform that action at this time.
0 commit comments