Skip to content

Commit

Permalink
Update details with results
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed Jun 4, 2024
1 parent 63f825e commit 78f8288
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions bioimageio_chatbot/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1790,14 +1790,13 @@ <h3 class="text-center">Welcome to BioImage.IO Chatbot</h3>
if (steps && steps.length > 0) {
let details = "<details class='details-box'> <summary>🔍More Details</summary>\n\n"
for (let step of steps) {
details += `### ${step.name}\n\n`;
details += `## ${step.name}\n\n`;

if (step.details.details) {
for (let detail of step.details.details) {
details += `-----\n#### Tool Call: \`${detail.name}\`\n\n`;

details += `-----\n### Tool Call: \`${detail.name}\`\n\n`;
details += "#### Arguments:\n\n";
if (detail.args && detail.args.length > 0) {
details += "Arguments:\n\n";
for (let arg of detail.args) {
const argValue = JSON.stringify(arg);
details += `\`\`\`\n${argValue}\n\`\`\`\n\n`;
Expand All @@ -1819,9 +1818,9 @@ <h3 class="text-center">Welcome to BioImage.IO Chatbot</h3>
if(detail.result){
const result = typeof detail.result === 'string' ? detail.result : JSON.stringify(detail.result, null, 2);
if(result.includes('\n'))
details += `**Result**:\n\n\`\`\`\n${result}\n\`\`\`\n\n`;
details += `#### Result:\n\n\`\`\`\n${result}\n\`\`\`\n\n`;
else
details += `**Result**: \`${result}\`\n\n`;
details += `#### Result: \`${result}\`\n\n`;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]

[project]
name = "bioimageio-chatbot"
version = "0.2.1"
version = "0.2.2"
readme = "README.md"
description = "Your Personal Assistant in Computational BioImaging."
dependencies = [
Expand Down

0 comments on commit 78f8288

Please sign in to comment.