Spaces:
Sleeping
Sleeping
Download app/agents/order_agent.py from Prerna43/Shopify_AI: direct link, hf CLI and curl.
- Browser
- Download file 440 Bytes
-
https://huggingface.co/spaces/Prerna43/Shopify_AI/resolve/main/app/agents/order_agent.py
- Command line
-
hf download hf://spaces/Prerna43/Shopify_AI/app/agents/order_agent.py
-
curl -L -o order_agent.py https://huggingface.co/spaces/Prerna43/Shopify_AI/resolve/main/app/agents/order_agent.py
440 Bytes
| from app.services.shopify_service import ShopifyService | |
| from app.utils.helpers import extract_order_id | |
| class OrderAgent: | |
| def __init__(self, service: ShopifyService | None = None): | |
| self.service = service or ShopifyService() | |
| def fetch(self, message: str, order_id: str | None = None) -> dict | None: | |
| resolved_order_id = order_id or extract_order_id(message) | |
| return self.service.get_order(resolved_order_id) | |