Spaces:
Sleeping
Sleeping
Update app.py
#1
by LouisZhang - opened
app.py
CHANGED
|
@@ -21,11 +21,11 @@ def get_company_product_list(product_type:str, company_name:int)-> str: #it's im
|
|
| 21 |
"Merck": ["捷诺达"]
|
| 22 |
}
|
| 23 |
}
|
| 24 |
-
|
| 25 |
-
|
| 26 |
return f"""产品列表如下:{', '.join(product_list)}"""
|
| 27 |
-
|
| 28 |
-
return "
|
| 29 |
|
| 30 |
|
| 31 |
@tool
|
|
|
|
| 21 |
"Merck": ["捷诺达"]
|
| 22 |
}
|
| 23 |
}
|
| 24 |
+
try:
|
| 25 |
+
product_list = company_product_list[product_type][company_name]
|
| 26 |
return f"""产品列表如下:{', '.join(product_list)}"""
|
| 27 |
+
except Exception as e:
|
| 28 |
+
return f"Error fetching 产品列表 for timezone '{company_name}, {product_type}': {str(e)}"
|
| 29 |
|
| 30 |
|
| 31 |
@tool
|