Skip to content

Commit ef86010

Browse files
Merge pull request #134 from microsoft/dev
chore: Dev to Main Merge
2 parents d6b6db6 + a267da0 commit ef86010

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

infra/scripts/agent_scripts/01_create_agents.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,15 @@ async def create_agents():
5656
5757
If you don't find any information in the knowledge source, please say no data found.
5858
59-
IMPORTANT: Always include the product image in your response using markdown format: ![Product Name](image_url)
59+
IMPORTANT: For each product, you MUST use this exact format:
60+
61+
1. **Product Name**
62+
- **Description:** description text
63+
- **Price:** $price
64+
- ![Product Name](image_url)
65+
6066
The image URL is available in the 'image' field of each product from the search results.
67+
Always include every product's description, price, and image. Never omit any of these fields.
6168
"""
6269
product_agent = await provider.create_agent(
6370
name=f"product-agent-{solutionName}",

infra/scripts/data_scripts/03_write_products_to_cosmos.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def get_or_create_database(db_name: str):
4646
print(f"Database '{db_name}' ready.")
4747
return database
4848
except exceptions.CosmosHttpResponseError as e:
49-
sys.exit(f"Error creating database: {e}")
49+
raise SystemExit(f"Error creating database: {e}")
5050

5151

5252
def get_or_create_container(database, container_name: str, partition_key_path: str):
@@ -61,7 +61,7 @@ def get_or_create_container(database, container_name: str, partition_key_path: s
6161
)
6262
return container
6363
except exceptions.CosmosHttpResponseError as e:
64-
sys.exit(f"Error creating container: {e}")
64+
raise SystemExit(f"Error creating container: {e}")
6565

6666

6767
def normalize_row(row: Dict[str, Any]) -> Dict[str, Any]:

tests/e2e-test/pages/webUserPage.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from base.base import BasePage
2+
from playwright.sync_api import TimeoutError as PlaywightTimeoutError
23

34

45
class WebUserPage(BasePage):
@@ -240,7 +241,7 @@ def ask_question_and_verify(self, question, expected_keywords):
240241
arg=initial_response_count,
241242
timeout=60000
242243
)
243-
except:
244+
except PlaywightTimeoutError:
244245
pass
245246

246247
# Wait extra time to ensure new response has fully loaded
@@ -287,7 +288,7 @@ def get_latest_ai_response(self):
287288
# Validate this looks like an AI text response, not a product card
288289
if not self._is_product_card_text(cleaned):
289290
return cleaned
290-
except:
291+
except Exception:
291292
continue
292293

293294
# Method 2: Parse the full page and extract the latest AI response by timestamp

0 commit comments

Comments
 (0)