mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-05 13:21:18 +00:00
Remove quotes wrapping the prompt from being passed to image gen model
This commit is contained in:
@@ -502,8 +502,11 @@ async def generate_better_image_prompt(
|
||||
|
||||
with timer("Chat actor: Generate contextual image prompt", logger):
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user