formula_get
Retrieve complete formula details from Wikidata, BioModels, or SciPy by ID, including LaTeX, SymPy expressions, variable definitions, units, and source URLs.
Instructions
獲取公式詳細資訊
根據 ID 獲取完整的公式資訊,包括 LaTeX、SymPy 表達式、變數定義等。
Args:
formula_id: 公式識別碼
- Wikidata: Q 號(如 "Q179057")
- BioModels: 模型 ID(如 "BIOMD0000000012")
- SciPy: 常數名(如 "speed_of_light")
source: 資料來源
- "wikidata": Wikidata(預設)
- "biomodels": BioModels
- "scipy": SciPy 常數
Returns:
{
"success": true,
"formula": {
"id": "Q179057",
"name": "Reynolds number",
"latex": "Re = \frac{\rho v L}{\mu}",
"sympy_str": "rho * v * L / mu",
"variables": {
"rho": {"description": "密度", "unit": "kg/m³"},
"v": {"description": "流速", "unit": "m/s"},
"L": {"description": "特徵長度", "unit": "m"},
"mu": {"description": "動力黏度", "unit": "Pa·s"}
},
"source": "wikidata",
"url": "https://www.wikidata.org/wiki/Q179057"
}
}
Example:
# 獲取 Wikidata 公式
formula_get("Q179057", source="wikidata")
# 獲取 BioModels 模型
formula_get("BIOMD0000000012", source="biomodels")
# 獲取物理常數
formula_get("speed_of_light", source="scipy")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | No | wikidata | |
| formula_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||