Skip to content

Commit

Permalink
finesse display of llm cost
Browse files Browse the repository at this point in the history
  • Loading branch information
mcjustin committed Nov 14, 2024
1 parent fa29583 commit bda7541
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/ips/assets/js/llmChat.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async function sendMessage() {
row.cells[1].textContent = data.content; // Response
row.cells[2].textContent = promptTokens; // Prompt Tokens
row.cells[3].textContent = completionTokens; // Completion Tokens
row.cells[4].textContent = costInput.toString() + " (in) + " + costOutput.toString() + " (out) = " + cost.toString();
row.cells[4].textContent = costInput.toString(8) + " (in) + " + costOutput.toString(8) + " (out) = " + cost.toString(8);
} catch (error) {
console.error('Error sending message to LLM:', error);
row.cells[1].textContent = 'Failed to get a response. Please try again.'; // Update response cell with error message
Expand Down

0 comments on commit bda7541

Please sign in to comment.