chevron_left
{{ chatBotName() }}
@for (message of messages(); track $index) { @if (message.content || (message.tool_calls?.length && showToolCalls()) || !isLoading() || ($last && isLoading() && message.role === 'assistant')) { @if (editingIndex() === $index) {
{{ 'CHATBOT_CANCEL_EDIT' | translate }}
{{ 'BTN_SAVE' | translate }}
} @else {
@if (message.role === 'user' && !isLoading()) {
edit
}
@if (message.error) {
{{ message.content.trim() | translate }}
} @else {
{{ message.content.trim() }}
} @if (isLoading() && $last && message.role === 'assistant') {
} @if (message.tool_calls?.length && showToolCalls()) {
@if (message.tool_calls.length > 1) {
{{ isToolCallsCollapsed() ? 'expand_more' : 'expand_less' }}
{{ 'SHOW_PREVIOUS_TOOL_CALLS' | translate: { count: message.tool_calls.length - 1 } }}
@if (!isToolCallsCollapsed()) {
@for (tool of message.tool_calls.slice(0, -1); track tool.id) {
build
{{ tool.function.name }}
{{ tool.function.arguments }}
}
} } @let lastTool = message.tool_calls[message.tool_calls.length - 1];
build
{{ lastTool.function.name }}
{{ lastTool.function.arguments }}
}
} } }