-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding state management example #56
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Ang Weoy Yang <[email protected]>
args: [ | ||
{name: "currentBudget", description: "The current budget of the kitchen"}, | ||
{name: "ingredient", description: "The ingredient to buy"}, | ||
{name: "price", description: "The price of the ingredient"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like we're not getting the price from your defined record from worker.ts
, the agent is estimating its own ingredient price if we don't provide the price list for it^
HeadChef | ||
] , | ||
getAgentState: getAgentState | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some nit to add a newline at end of file to comply with POSIX standard
JSON.stringify(restaurantBudget) | ||
) | ||
} | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same regarding the posix standard
} | ||
} | ||
|
||
main(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same regarding the posix standard
inventory: restaurantInventory | ||
} | ||
} | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same regarding the posix standard
// export const updateInventory = new GameFunction({ | ||
// name: "update_inventory", | ||
// description: "Update the inventory", | ||
// args: [] as const, | ||
// executable: async (args, logger) => { | ||
// return new ExecutableGameFunctionResponse | ||
// } | ||
// }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is not used I think we could remove these lines?
This is an example for state management article