Skip to content

Commit

Permalink
Merge pull request stitionai#202 from rajakumar05032000/fix/token-usa…
Browse files Browse the repository at this point in the history
…ge-log1

Fixed - token usage in UI & logs
  • Loading branch information
mufeedvh authored Mar 28, 2024
2 parents 5dd119b + ab2aa32 commit de007c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/src/lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ export async function executeAgent(prompt) {
}

export async function getTokenUsage() {
const response = await fetch(`${API_BASE_URL}/api/token-usage`);
const projectName = localStorage.getItem("selectedProject");
const response = await fetch(`${API_BASE_URL}/api/token-usage?project_name=${projectName}`);
const data = await response.json();
return data.token_usage;
}
Expand Down

0 comments on commit de007c6

Please sign in to comment.