Address Parsing and Intent Extraction

The address_intent_fetch method processes user-provided address information using natural language understanding. It extracts structured data such as street names, cities, postal codes, and action intents like adding, updating, or deleting an address.

# Initialize CatalogLake
cl = Cataloglake()

# Define the payload
address_intent_fetch_payload = {
    "prompt": "my address is 505 prestige empire Kothanur Bangalore 560079",
    "language": "en-us",
    "action_intent": "add_address",
    "model": "openai"
}

# Fetch address intent results
try:
    address_data = cl.address_intent_fetch(address_intent_fetch_payload)
    print(address_data)
except Exception as e:
    print("Error:", str(e))

Last updated