Remove quotes wrapping the prompt from being passed to image gen model

This commit is contained in:
Debanjum Singh Solanky 2024-04-26 16:49:11 +05:30
parent fdd4c02461
commit eb09aba747

View file

@ -502,8 +502,11 @@ async def generate_better_image_prompt(
with timer("Chat actor: Generate contextual image prompt", logger): with timer("Chat actor: Generate contextual image prompt", logger):
response = await send_message_to_model_wrapper(image_prompt, chat_model_option=summarizer_model) response = await send_message_to_model_wrapper(image_prompt, chat_model_option=summarizer_model)
response = response.strip()
if response.startswith(('"', "'")) and response.endswith(('"', "'")):
response = response[1:-1]
return response.strip() return response
async def send_message_to_model_wrapper( async def send_message_to_model_wrapper(