Implement streaming for all providers

This commit is contained in:
Saoud Rizwan
2024-09-29 01:32:58 -04:00
parent 59c188019a
commit 06ccaf6f67
11 changed files with 201 additions and 161 deletions

View File

@@ -124,8 +124,8 @@ export class OpenRouterHandler implements ApiHandler {
type: "usage",
inputTokens: generation?.native_tokens_prompt || 0,
outputTokens: generation?.native_tokens_completion || 0,
cacheWriteTokens: 0,
cacheReadTokens: 0,
// cacheWriteTokens: 0,
// cacheReadTokens: 0,
totalCost: generation?.total_cost || 0,
}
} catch (error) {