Merge branch 'master' of github.com:khoj-ai/khoj into features/improve-multiple-output-mode-generation

This commit is contained in:
sabaimran
2024-12-10 16:56:36 -08:00
4 changed files with 479 additions and 492 deletions

View File

@@ -334,9 +334,10 @@ def construct_structured_message(
ChatModelOptions.ModelType.GOOGLE,
ChatModelOptions.ModelType.ANTHROPIC,
]:
constructed_messages: List[Any] = [
{"type": "text", "text": message},
]
if not attached_file_context and not (vision_enabled and images):
return message
constructed_messages: List[Any] = [{"type": "text", "text": message}]
if not is_none_or_empty(attached_file_context):
constructed_messages.append({"type": "text", "text": attached_file_context})