I am packaging a crewai Flow into a FastAPI endpoint that I want to run async.
When doing so, the inputs arguments I am giving in kickoff_async() are not properly passed when the Flow state is initialized.
When I call this endpoint, sentence_count is properly propagated into the EmailFlow State:
@app.post("/process_email")
def process_email(
uuid: str,
sentence_count: int
):
try:
result = EmailFlow().kickoff(inputs={"sentence_count": sentence_count})
When I call this async endpoint, sentence_count is not propagated into the EmailFlow state:
@app.post("/process_email")
async def process_email(
uuid: str,
sentence_count: int
):
try:
result = await EmailFlow().kickoff_async(inputs={"sentence_count": sentence_count})
Why are inputs not processed properly in the context of an async call?