need to update the path depending on where you stored itfeast_repo_path = "../../../../../my_feature_repo/feature_repo/"store = FeatureStore(repo_path=feast_repo_path)Prompts‚ÄãHere we will set up a custom FeastPromptTemplate. This prompt template will take in a driver id, look up their stats, and format those stats into a prompt.Note that the input to this prompt template is just driver_id, since that is the only user defined piece (all other variables are looked up inside the prompt template).from langchain.prompts import PromptTemplate, StringPromptTemplatetemplate = """Given the driver's up to date stats, write them note relaying those stats to them.If they have a conversation rate above .5, give them a compliment. Otherwise, make a silly joke about chickens at the end to make them feel betterHere are the drivers stats:Conversation rate: {conv_rate}Acceptance rate: {acc_rate}Average Daily Trips: {avg_daily_trips}Your response:"""prompt = PromptTemplate.from_template(template)class FeastPromptTemplate(StringPromptTemplate):    def format(self, **kwargs) -> str:        driver_id = kwargs.pop("driver_id")        feature_vector = store.get_online_features(            features=[                "driver_hourly_stats:conv_rate",                "driver_hourly_stats:acc_rate",                "driver_hourly_stats:avg_daily_trips",            ],            entity_rows=[{"driver_id": driver_id}],        ).to_dict()        kwargs["conv_rate"] = feature_vector["conv_rate"][0]        kwargs["acc_rate"] = feature_vector["acc_rate"][0]        kwargs["avg_daily_trips"] = feature_vector["avg_daily_trips"][0]        return prompt.format(**kwargs)prompt_template = FeastPromptTemplate(input_variables=["driver_id"])print(prompt_template.format(driver_id=1001))    Given the driver's up to date stats, write them note relaying those stats to them.    If they have a conversation rate above .5, give them a compliment. Otherwise, make a silly joke about chickens at the end to make them feel
Feature stores are a concept from traditional machine learning that make sure data fed into models is up-to-date and relevant. For more on this, see here.
Feature stores are a concept from traditional machine learning that make sure data fed into models is up-to-date and relevant. For more on this, see here. ->: need to update the path depending on where you stored itfeast_repo_path = "../../../../../my_feature_repo/feature_repo/"store = FeatureStore(repo_path=feast_repo_path)Prompts‚ÄãHere we will set up a custom FeastPromptTemplate. This prompt template will take in a driver id, look up their stats, and format those stats into a prompt.Note that the input to this prompt template is just driver_id, since that is the only user defined piece (all other variables are looked up inside the prompt template).from langchain.prompts import PromptTemplate, StringPromptTemplatetemplate = """Given the driver's up to date stats, write them note relaying those stats to them.If they have a conversation rate above .5, give them a compliment. Otherwise, make a silly joke about chickens at the end to make them feel betterHere are the drivers stats:Conversation rate: {conv_rate}Acceptance rate: {acc_rate}Average Daily Trips: {avg_daily_trips}Your response:"""prompt = PromptTemplate.from_template(template)class FeastPromptTemplate(StringPromptTemplate):    def format(self, **kwargs) -> str:        driver_id = kwargs.pop("driver_id")        feature_vector = store.get_online_features(            features=[                "driver_hourly_stats:conv_rate",                "driver_hourly_stats:acc_rate",                "driver_hourly_stats:avg_daily_trips",            ],            entity_rows=[{"driver_id": driver_id}],        ).to_dict()        kwargs["conv_rate"] = feature_vector["conv_rate"][0]        kwargs["acc_rate"] = feature_vector["acc_rate"][0]        kwargs["avg_daily_trips"] = feature_vector["avg_daily_trips"][0]        return prompt.format(**kwargs)prompt_template = FeastPromptTemplate(input_variables=["driver_id"])print(prompt_template.format(driver_id=1001))    Given the driver's up to date stats, write them note relaying those stats to them.    If they have a conversation rate above .5, give them a compliment. Otherwise, make a silly joke about chickens at the end to make them feel