MCPcopy Create free account
hub / github.com/enowdev/enowX-Coder / finish

Method finish

src-tauri/src/services/chat_service.rs:58–69  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

56
57impl UsageAccumulator {
58 fn finish(self) -> Option<TokenUsage> {
59 let total = self.prompt_tokens + self.completion_tokens;
60 if total == 0 {
61 None
62 } else {
63 Some(TokenUsage {
64 prompt_tokens: self.prompt_tokens,
65 completion_tokens: self.completion_tokens,
66 total_tokens: total,
67 })
68 }
69 }
70}
71
72pub async fn get_messages(db: &SqlitePool, session_id: &str) -> AppResult<Vec<Message>> {

Callers 2

stream_openai_sseFunction · 0.80
stream_anthropic_sseFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected