Yasmine Benkacem
01/14/2025, 9:00 PMNate
01/14/2025, 9:19 PMfrom datetime import timedelta
from typing import Literal
from pydantic import BaseModel, Field
from prefect import flow
from prefect.types import DateTime
class NiceDateParams(BaseModel):
area: Literal["sand", "snow", "ice"]
currency: Literal["usd", "eur", "jpy"]
start_date: DateTime = Field(
default_factory=lambda: DateTime.now() - timedelta(days=1)
)
end_date: DateTime = Field(default_factory=lambda: DateTime.now())
@flow(log_prints=True)
def f(params: NiceDateParams):
print(params) # do arbitrary python with these params
if __name__ == "__main__":
f.serve(cron="0 0 * * *")
• ingest documents to support a RAG knowledgebase in a highly concurrent manner
• observe arbitrary tool calls of an agentYasmine Benkacem
01/14/2025, 9:24 PMNate
01/14/2025, 9:25 PMJanet Carson
01/14/2025, 11:08 PM