File size: 693 Bytes
927c050
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from typing import List
from pydantic import BaseModel, Field


class UserInput(BaseModel):
    identifier: str = Field(
        default="",
        description=(
            "Identifier: can be a customer ID (numeric), "
            "email address (contains @), or phone number (starts with + or contains digits). "
            "Return empty string if no identifier is found in the message."
        ),
    )


class UserProfile(BaseModel):
    customer_id: str = Field(description="The customer ID of the customer")
    music_preferences: List[str] = Field(
        default_factory=list,
        description="The music preferences of the customer (artists, genres, albums they like)",
    )