mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Remove quotes wrapping the prompt from being passed to image gen model
This commit is contained in:
parent
fdd4c02461
commit
eb09aba747
1 changed files with 4 additions and 1 deletions
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue