vision support for history (not including the image itself)

This commit is contained in:
gilcu3
2023-11-09 17:52:14 +01:00
parent 4c29d7bcfc
commit f69f9e5034
2 changed files with 31 additions and 4 deletions

View File

@@ -452,7 +452,7 @@ class ChatGPTTelegramBot:
self.usage[user_id] = UsageTracker(user_id, update.message.from_user.name)
try:
interpretation, tokens = await self.openai.interpret_image(temp_file_png.name, prompt=prompt)
interpretation, tokens = await self.openai.interpret_image(chat_id, temp_file_png.name, prompt=prompt)
vision_token_price = self.config['vision_token_price']
self.usage[user_id].add_vision_tokens(tokens, vision_token_price)