17 lines
403 B
Python
17 lines
403 B
Python
from duck_core.tasks.state import TaskState
|
|
|
|
|
|
class ContextBuilder:
|
|
def build_basic_messages(
|
|
self,
|
|
task: TaskState,
|
|
history_messages: list[dict[str, str]] | None = None,
|
|
) -> list[dict[str, str]]:
|
|
return [
|
|
*(history_messages or []),
|
|
{
|
|
"role": "user",
|
|
"content": task.user_message,
|
|
},
|
|
]
|