@@ -347,7 +347,12 @@ class Chatgpt(SimpleService): messages ) info['web_search'] = search_context_size - if file: + if image: + messages[-1]['content'] = [ + {'type': 'input_text', 'text': input_message.content}, + {'type': 'input_image', 'image_url': image_data['image_url']['url']} + ] + elif file: if sum([len(chunk.content) for chunk in chunks]) > 20_000: document_name = chunks[0].content.partition(f':{chr(10)}')[2].split(f'{chr(10)}')[0][:100] embedding_tokens, file_data = self.get_large_file_data(chunks, proxy, input_message.content)