mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-06 02:47:56 +00:00
Fix schema validation error in getModelUsages (#93)
This commit is contained in:
parent
36e442601b
commit
6922e4b3ac
1 changed files with 3 additions and 0 deletions
|
|
@ -301,6 +301,7 @@ export const getModelUsage = async ({
|
|||
}
|
||||
|
||||
const userFilter = userId ? 'AND userId = {userId: String}' : '';
|
||||
|
||||
const queryParams: Record<string, string | number | string[]> = {
|
||||
orgId: orgId!,
|
||||
timePeriod,
|
||||
|
|
@ -310,6 +311,7 @@ export const getModelUsage = async ({
|
|||
TelemetryEventName.LLM_COMPLETION,
|
||||
],
|
||||
};
|
||||
|
||||
if (userId) {
|
||||
queryParams.userId = userId;
|
||||
}
|
||||
|
|
@ -327,6 +329,7 @@ export const getModelUsage = async ({
|
|||
orgId = {orgId: String}
|
||||
AND timestamp >= toUnixTimestamp(now() - INTERVAL {timePeriod: Int32} DAY)
|
||||
AND type IN ({types: Array(String)})
|
||||
AND modelId IS NOT NULL
|
||||
${userFilter}
|
||||
GROUP BY 1, 2
|
||||
`,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue