mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 05:39:12 +00:00
Skip image, code generation if in research mode
This commit is contained in:
@@ -952,7 +952,7 @@ async def chat(
|
|||||||
)
|
)
|
||||||
|
|
||||||
## Gather Code Results
|
## Gather Code Results
|
||||||
if ConversationCommand.Code in conversation_commands:
|
if ConversationCommand.Code in conversation_commands and pending_research:
|
||||||
try:
|
try:
|
||||||
previous_iteration_history = (
|
previous_iteration_history = (
|
||||||
f"# Iteration 1:\n#---\nNotes:\n{compiled_references}\n\nOnline Results:{online_results}"
|
f"# Iteration 1:\n#---\nNotes:\n{compiled_references}\n\nOnline Results:{online_results}"
|
||||||
@@ -993,7 +993,7 @@ async def chat(
|
|||||||
|
|
||||||
# Generate Output
|
# Generate Output
|
||||||
## Generate Image Output
|
## Generate Image Output
|
||||||
if ConversationCommand.Image in conversation_commands:
|
if ConversationCommand.Image in conversation_commands and pending_research:
|
||||||
async for result in text_to_image(
|
async for result in text_to_image(
|
||||||
q,
|
q,
|
||||||
user,
|
user,
|
||||||
|
|||||||
Reference in New Issue
Block a user