agents / Exports / UsageStorage
Interface: UsageStorage
Usage storage interface
Implemented by
Table of contents
Methods
Methods
save
▸ save(entry): Promise<void>
Parameters
| Name | Type |
|---|---|
entry | UsageStats |
Returns
Promise<void>
Defined in
packages/agents/src/plugins/usage/types.ts:99
getStats
▸ getStats(conversationId?, timeRange?): Promise<UsageStats[]>
Parameters
| Name | Type |
|---|---|
conversationId? | string |
timeRange? | Object |
timeRange.start | Date |
timeRange.end | Date |
Returns
Promise<UsageStats[]>
Defined in
packages/agents/src/plugins/usage/types.ts:100
getAggregatedStats
▸ getAggregatedStats(timeRange?): Promise<AggregatedUsageStats>
Parameters
| Name | Type |
|---|---|
timeRange? | Object |
timeRange.start | Date |
timeRange.end | Date |
Returns
Promise<AggregatedUsageStats>
Defined in
packages/agents/src/plugins/usage/types.ts:101
clear
▸ clear(): Promise<void>
Returns
Promise<void>
Defined in
packages/agents/src/plugins/usage/types.ts:102
flush
▸ flush(): Promise<void>
Returns
Promise<void>
Defined in
packages/agents/src/plugins/usage/types.ts:103
close
▸ close(): Promise<void>
Returns
Promise<void>