From a3d4e76c8a50aefac2cc590afcc6e291907ceb29 Mon Sep 17 00:00:00 2001 From: Rene Teigen Date: Tue, 7 Mar 2023 21:29:40 +0000 Subject: [PATCH] Fix cost reporting in search too --- models/search_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/search_model.py b/models/search_model.py index 27ee284..6364ed9 100644 --- a/models/search_model.py +++ b/models/search_model.py @@ -491,8 +491,8 @@ class Search: embedding_model.last_token_usage, embeddings=True ) price += await self.usage_service.get_price( - llm_predictor.last_token_usage - ) + await self.usage_service.get_price(embedding_model.last_token_usage, True) + llm_predictor.last_token_usage, chatgpt=True + ) + await self.usage_service.get_price(embedding_model.last_token_usage, embeddings=True) if ctx: await self.try_edit(