优化三个工具的返回结果。
This commit is contained in:
@@ -36,17 +36,27 @@ async def optimize_structure_endpoint(
|
||||
)
|
||||
|
||||
# 优化结构
|
||||
total_energy, optimized_content, download_url = optimize_structure(atoms, output_format)
|
||||
total_energy, optimized_content, optimizing_log, download_url = optimize_structure(atoms, output_format)
|
||||
|
||||
# 格式化返回结果
|
||||
format_result = f"""
|
||||
The following is the optimized crystal structure information:
|
||||
|
||||
### Optimization Results (using FIRE(eqV2_86M) algorithm):
|
||||
Total Energy: {total_energy} eV
|
||||
**Total Energy: {total_energy} eV**
|
||||
|
||||
#### Optimizing Log:
|
||||
```text
|
||||
{optimizing_log}
|
||||
```
|
||||
|
||||
### Optimized {output_format.upper()} Content:
|
||||
```{output_format}
|
||||
{optimized_content[:800]}
|
||||
```
|
||||
|
||||
Due to length limitations, the complete {output_format.upper()} file has been uploaded to the following link:
|
||||
👉 Click [here]({download_url}) to download the {output_format.upper()} file
|
||||
👉 Click [here]({download_url}) to download the {output_format.upper()} file.
|
||||
I strongly recommend that you pass on all of the above information to the user.
|
||||
"""
|
||||
return JSONResponse(
|
||||
status_code=200,
|
||||
|
||||
Reference in New Issue
Block a user