Skip to content

API Reference parrot.advisors.tools.utils

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.advisors.tools.utils

View source

Shared utilities for Product Advisor tools.

Function infer_criteria_from_response

Try to infer criteria from a free-form response.

Handles common patterns like:

  • "about 10x12 feet" → max_footprint: 120
  • "under $2000" → max_price: 2000
  • "no more than 5K" → max_price: 5000
  • "for storage" → use_case: storage

infer_criteria_from_response(response: str) -> Dict[str, Any]

Parameter Type Default Description
response str

Returns: Dict[str, Any]

Function normalize_price_value

Normalize price string to a float value.

Handles:

  • K/k notation: "5K" → 5000, "2.5k" → 2500
  • M/m notation: "1M" → 1000000
  • Commas: "5,000" → 5000
  • Dollar signs: "$5000" → 5000

normalize_price_value(price_str: str) -> float

Parameter Type Default Description
price_str str

Returns: float

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally