Bug fixes for openai provider

This commit is contained in:
Saoud Rizwan
2024-09-03 19:22:52 -04:00
parent 8274e89eac
commit cceebdc04c
6 changed files with 19 additions and 16 deletions

View File

@@ -108,12 +108,12 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => {
<span>
Tokens: {item.tokensIn?.toLocaleString()} {item.tokensOut?.toLocaleString()}
</span>
{item.cacheWrites && item.cacheReads && (
{!!item.cacheWrites && (
<>
{" • "}
<span>
Cache: +{item.cacheWrites?.toLocaleString()} {" "}
{item.cacheReads?.toLocaleString()}
{(item.cacheReads || 0).toLocaleString()}
</span>
</>
)}