def store_user_preferences(user_id: str, conversation: list):
"""Store user preferences from conversation history"""
client.add(conversation, user_id=user_id)
# Example conversation storage
messages = [
{
"role": "user",
"content": "Hi there! I'm planning a vacation and could use some advice.",
},
{
"role": "assistant",
"content": "Hello! I'd be happy to help with your vacation planning. What kind of destination do you prefer?",
},
{"role": "user", "content": "I am more of a beach person than a mountain person."},
{
"role": "assistant",
"content": "That's interesting. Do you like hotels or Airbnb?",
},
{"role": "user", "content": "I like Airbnb more."},
]
store_user_preferences("crew_user_1", messages)