a2a-source-edit: write agent.py
This commit is contained in:
9
agent.py
9
agent.py
@@ -371,6 +371,15 @@ def _build_comparison_result(comparison_id: str, quotes: list[QuoteInput], weigh
|
||||
}
|
||||
|
||||
|
||||
def _quote_sort_key(item: dict[str, Any]) -> tuple[Any, ...]:
|
||||
return (
|
||||
-item["scores"]["weighted_total"],
|
||||
item["total_price"],
|
||||
item["delivery_days"],
|
||||
item["vendor"].lower(),
|
||||
)
|
||||
|
||||
|
||||
def _parse_browser_documents(documents: list[BrowserDocument]) -> dict[str, Any]:
|
||||
quotes: list[QuoteInput] = []
|
||||
errors: list[dict[str, Any]] = []
|
||||
|
||||
Reference in New Issue
Block a user