Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jxx016
Copy link
Contributor

@jxx016 jxx016 commented Feb 17, 2025

This is an example for state management article

@jxx016 jxx016 requested a review from celesteanglm February 17, 2025 22:14
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"}
Copy link

@Ang-dot Ang-dot Feb 21, 2025

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
})
Copy link

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)
)
}
})
Copy link

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();
Copy link

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
}
}
})
Copy link

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

Comment on lines +71 to +78
// export const updateInventory = new GameFunction({
// name: "update_inventory",
// description: "Update the inventory",
// args: [] as const,
// executable: async (args, logger) => {
// return new ExecutableGameFunctionResponse
// }
// })
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants