Skip to content

Commit

Permalink
Simplify redundant logic for constructing structured messages with im…
Browse files Browse the repository at this point in the history
…age url
  • Loading branch information
sabaimran committed Sep 11, 2024
1 parent 07e2c49 commit 2932d30
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/khoj/processor/conversation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,9 @@ def generate_chatml_messages_with_context(

message_content = chat["message"] + message_notes

if chat.get("uploadedImageData") and vision_enabled:
message_content = construct_structured_message(
message_content, chat.get("uploadedImageData"), model_type, vision_enabled
)
message_content = construct_structured_message(
message_content, chat.get("uploadedImageData"), model_type, vision_enabled
)

reconstructed_message = ChatMessage(content=message_content, role=role)

Expand Down

0 comments on commit 2932d30

Please sign in to comment.