mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-30 10:53:02 +01:00
Use consistent field name for queries in chat history & better image prompt
This commit is contained in:
parent
086d5f8324
commit
b7fad04870
1 changed files with 2 additions and 2 deletions
|
@ -465,8 +465,8 @@ async def text_to_image(
|
|||
chat_history += f"Q: {chat['intent']['query']}\n"
|
||||
chat_history += f"A: {chat['message']}\n"
|
||||
elif chat["by"] == "khoj" and "text-to-image" in chat["intent"].get("type"):
|
||||
chat_history += f"Q: {chat['intent']['query']}\n"
|
||||
chat_history += f"A: [generated image redacted by admin]. Enhanced image prompt: {chat['intent']['inferred-queries'][0]}\n"
|
||||
chat_history += f"Q: Query: {chat['intent']['query']}\n"
|
||||
chat_history += f"A: Improved Query: {chat['intent']['inferred-queries'][0]}\n"
|
||||
try:
|
||||
with timer("Improve the original user query", logger):
|
||||
improved_image_prompt = await generate_better_image_prompt(
|
||||
|
|
Loading…
Reference in a new issue