{
"actor-start": {
"eventTitle": "Price for Actor start",
"eventDescription": "Flat fee for starting an Actor run.",
"eventPriceUsd": 0.1
},
"task-completed": {
"eventTitle": "Price for completing the task",
"eventDescription": "Flat fee for completing the task.",
"eventPriceUsd": 0.4
}
}
async def main():
"""Runs the AI Travel Planner workflow."""
async with Actor:
await Actor.charge('actor-start')
actor_input = await Actor.get_input() or {}
Actor.log.info(f"Received input: {actor_input}")
travel_query = TravelState(**actor_input)
# Execute workflow
final_state = travel_workflow.invoke(travel_query)
Actor.log.info(f"Workflow completed. Final state: {final_state}")
await Actor.charge('task-completed')
# Save the final report
await save_report(final_state)
if (Actor.isAtHome() && Actor.getChargingManager().getPricingInfo().isPayPerEvent) { if (Actor.getChargingManager().getChargedEventCount('actor-start') === 0) { await Actor.charge({ eventName: 'actor-start' }); } }
actor-start-gb
and enabled them in the cloud. will it two weeks for them to take effective and i have used the below code to charge themasync def charge_for_actor_start() -> None:
"""Charges for the Actor start event.
This function calculates the memory usage in gigabytes and charges for the Actor start event accordingly.
"""
count = (Actor.get_env()['memory_mbytes'] or 1024 + 1023) // 1024
await Actor.charge(event_name='actor-start-gb', count=count)
asyncio.create_task(charge_for_actor_start()
Hi Balaji,
We want to inform you about the updated pricing model for the AI Travel Assistant (bala-ceg/ai-travel-assistant). Starting from March 27, 2025, you'll pay only for specific events of the Actor, instead of paying for compute, proxies and other dynamic usage costs. The new prices will be:
actor-start-gb: $0.20
You can find more information on the new pricing model in the documentation. If you have any questions or need more information, don't hesitate to reach out.
This notification relates to your personal account balaji_ceg@outlook.com (bala-ceg).