haystack-ai 3.4.0.dev20261006000327__tar.gz → 3.4.0.dev20261007000336__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/PKG-INFO +1 -1
- haystack_ai-3.4.0.dev20261007000336/VERSION.txt +1 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/query/query_expander.py +45 -12
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/rankers/llm_ranker.py +17 -11
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/dataclasses/chat_message.py +164 -6
- haystack_ai-3.4.0.dev20261006000327/VERSION.txt +0 -1
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/.gitignore +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/LICENSE +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/README.md +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/agents/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/agents/agent.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/agents/state/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/agents/state/state.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/agents/state/state_utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/agents/tool_calling.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/agents/utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/builders/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/builders/answer_builder.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/builders/chat_prompt_builder.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/builders/prompt_builder.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/caching/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/caching/cache_checker.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/csv.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/docx.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/file_to_file_content.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/html.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/image/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/image/document_to_image.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/image/file_to_document.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/image/file_to_image.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/image/image_utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/image/pdf_to_image.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/json.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/markdown.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/msg.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/multi_file_converter.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/output_adapter.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/pdfminer.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/pptx.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/pypdf.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/txt.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/converters/xlsx.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/embedders/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/embedders/azure_document_embedder.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/embedders/azure_text_embedder.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/embedders/mock_document_embedder.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/embedders/mock_text_embedder.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/embedders/mock_utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/embedders/openai_document_embedder.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/embedders/openai_text_embedder.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/embedders/types/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/embedders/types/protocol.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/evaluators/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/evaluators/answer_exact_match.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/evaluators/context_relevance.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/evaluators/document_map.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/evaluators/document_mrr.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/evaluators/document_ndcg.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/evaluators/document_recall.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/evaluators/faithfulness.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/evaluators/llm_evaluator.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/evaluators/sas_evaluator.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/extractors/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/extractors/image/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/extractors/image/llm_document_content_extractor.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/extractors/llm_metadata_extractor.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/extractors/regex_text_extractor.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/fetchers/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/fetchers/link_content.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/generators/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/generators/chat/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/generators/chat/azure.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/generators/chat/azure_responses.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/generators/chat/fallback.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/generators/chat/llm.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/generators/chat/mock.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/generators/chat/openai.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/generators/chat/openai_responses.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/generators/chat/types/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/generators/chat/types/protocol.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/generators/openai_image_generator.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/generators/utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/joiners/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/joiners/answer_joiner.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/joiners/branch.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/joiners/document_joiner.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/joiners/list_joiner.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/joiners/string_joiner.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/preprocessors/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/preprocessors/_page_numbers.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/preprocessors/csv_document_cleaner.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/preprocessors/csv_document_splitter.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/preprocessors/document_cleaner.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/preprocessors/document_preprocessor.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/preprocessors/document_splitter.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/preprocessors/embedding_based_document_splitter.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/preprocessors/hierarchical_document_splitter.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/preprocessors/markdown_header_splitter.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/preprocessors/python_code_splitter.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/preprocessors/recursive_splitter.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/preprocessors/sentence_tokenizer.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/preprocessors/text_cleaner.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/query/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/rankers/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/rankers/lost_in_the_middle.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/rankers/meta_field.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/rankers/meta_field_grouping_ranker.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/retrievers/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/retrievers/auto_merging_retriever.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/retrievers/filter_retriever.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/retrievers/in_memory/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/retrievers/in_memory/bm25_retriever.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/retrievers/in_memory/embedding_retriever.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/retrievers/multi_query_embedding_retriever.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/retrievers/multi_query_text_retriever.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/retrievers/multi_retriever.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/retrievers/sentence_window_retriever.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/retrievers/text_embedding_retriever.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/retrievers/types/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/retrievers/types/protocol.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/routers/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/routers/conditional_router.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/routers/document_length_router.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/routers/document_type_router.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/routers/file_type_router.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/routers/llm_messages_router.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/routers/metadata_router.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/samplers/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/samplers/top_p.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/validators/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/validators/json_schema.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/writers/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/components/writers/document_writer.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/component/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/component/component.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/component/sockets.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/component/types.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/errors.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/pipeline/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/pipeline/base.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/pipeline/breakpoint.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/pipeline/component_checks.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/pipeline/descriptions.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/pipeline/draw.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/pipeline/pipeline.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/pipeline/utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/serialization.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/serialization_security.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/super_component/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/super_component/super_component.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/super_component/utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/core/type_utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/data/abbreviations/de.txt +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/data/abbreviations/en.txt +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/dataclasses/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/dataclasses/answer.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/dataclasses/breakpoints.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/dataclasses/byte_stream.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/dataclasses/document.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/dataclasses/file_content.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/dataclasses/image_content.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/dataclasses/skill_info.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/dataclasses/sparse_embedding.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/dataclasses/streaming_chunk.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/document_stores/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/document_stores/errors/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/document_stores/errors/errors.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/document_stores/in_memory/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/document_stores/in_memory/document_store.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/document_stores/types/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/document_stores/types/filter_policy.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/document_stores/types/policy.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/document_stores/types/protocol.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/errors.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/evaluation/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/evaluation/eval_run_result.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/budget/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/budget/hooks.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/compaction/AGENTS.md +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/compaction/CLAUDE.md +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/compaction/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/compaction/hooks.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/compaction/sliding_window.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/compaction/summarization.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/compaction/tool_result_pruning.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/compaction/types/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/compaction/types/protocol.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/compaction/utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/from_function.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/human_in_the_loop/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/human_in_the_loop/dataclasses.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/human_in_the_loop/hooks.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/human_in_the_loop/policies.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/human_in_the_loop/strategies.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/human_in_the_loop/types/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/human_in_the_loop/types/protocol.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/human_in_the_loop/user_interfaces.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/invocation.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/protocol.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/tool_result_offloading/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/tool_result_offloading/hooks.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/tool_result_offloading/policies.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/tool_result_offloading/stores.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/tool_result_offloading/types/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/tool_result_offloading/types/protocol.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/hooks/utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/lazy_imports.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/logging.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/marshal/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/marshal/protocol.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/marshal/yaml.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/py.typed +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/skill_stores/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/skill_stores/file_system/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/skill_stores/file_system/skill_store.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/skill_stores/types/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/skill_stores/types/protocol.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/telemetry/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/telemetry/_environment.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/telemetry/_telemetry.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/callable_serialization/random_callable.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/document_store.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/document_store_async.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/factory.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/accumulate.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/add_value.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/concatenate.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/double.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/fstring.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/future_annotations.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/greet.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/hello.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/joiner.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/parity.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/remainder.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/repeat.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/subtract.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/sum.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/text_splitter.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/sample_components/threshold.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/telemetry.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/testing/test_utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/token_counters/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/token_counters/approximate_counter.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/token_counters/openai_counter.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/token_counters/tiktoken_counter.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/token_counters/types/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/token_counters/types/protocol.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/token_counters/utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tools/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tools/agent_tool.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tools/component_tool.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tools/errors.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tools/from_function.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tools/parameters_schema_utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tools/pipeline_tool.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tools/searchable_toolset.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tools/serde_utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tools/skills/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tools/skills/skill_toolset.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tools/tool.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tools/tool_types.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tools/toolset.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tools/utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tracing/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tracing/logging_tracer.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tracing/tracer.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/tracing/utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/__init__.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/async_utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/auth.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/azure.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/base_serialization.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/callable_serialization.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/dataclasses.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/deserialization.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/device.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/experimental.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/filters.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/hf.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/http_client.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/jinja2_chat_extension.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/jinja2_extensions.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/jinja2_sandbox.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/jupyter.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/misc.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/requests_utils.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/type_serialization.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/utils/url_validation.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/version.py +0 -0
- {haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: haystack-ai
|
|
3
|
-
Version: 3.4.0.
|
|
3
|
+
Version: 3.4.0.dev20261007000336
|
|
4
4
|
Summary: LLM framework to build customizable, production-ready LLM applications. Connect components (models, vector DBs, file converters) to pipelines or agents that can interact with your data.
|
|
5
5
|
Project-URL: CI: GitHub, https://github.com/deepset-ai/haystack/actions
|
|
6
6
|
Project-URL: Docs: RTD, https://haystack.deepset.ai/overview/intro
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.4.0.dev20261007000336
|
|
@@ -199,7 +199,7 @@ class QueryExpander:
|
|
|
199
199
|
self.warm_up()
|
|
200
200
|
|
|
201
201
|
if not isinstance(query, str) or not query.strip():
|
|
202
|
-
logger.warning("Empty query provided to QueryExpander")
|
|
202
|
+
logger.warning("Empty query provided to QueryExpander. {fallback}", fallback=self._fallback_message())
|
|
203
203
|
return {"queries": [query] if self.include_original_query and isinstance(query, str) else []}
|
|
204
204
|
|
|
205
205
|
response = {"queries": [query] if self.include_original_query else []}
|
|
@@ -216,7 +216,11 @@ class QueryExpander:
|
|
|
216
216
|
span.set_content_tag("haystack.component.output", generator_result)
|
|
217
217
|
|
|
218
218
|
if not generator_result.get("replies") or len(generator_result["replies"]) == 0:
|
|
219
|
-
logger.warning(
|
|
219
|
+
logger.warning(
|
|
220
|
+
"ChatGenerator returned no replies for query: {query}. {fallback}",
|
|
221
|
+
query=query,
|
|
222
|
+
fallback=self._fallback_message(),
|
|
223
|
+
)
|
|
220
224
|
return response
|
|
221
225
|
|
|
222
226
|
expanded_text = generator_result["replies"][0].text.strip()
|
|
@@ -243,7 +247,12 @@ class QueryExpander:
|
|
|
243
247
|
|
|
244
248
|
except Exception as e:
|
|
245
249
|
# Fallback: return original query to maintain pipeline functionality
|
|
246
|
-
logger.exception(
|
|
250
|
+
logger.exception(
|
|
251
|
+
"Failed to expand query {query}. {fallback} Error: {error}",
|
|
252
|
+
query=query,
|
|
253
|
+
fallback=self._fallback_message(),
|
|
254
|
+
error=str(e),
|
|
255
|
+
)
|
|
247
256
|
return response
|
|
248
257
|
|
|
249
258
|
@component.output_types(queries=list[str])
|
|
@@ -269,7 +278,7 @@ class QueryExpander:
|
|
|
269
278
|
await self.warm_up_async()
|
|
270
279
|
|
|
271
280
|
if not isinstance(query, str) or not query.strip():
|
|
272
|
-
logger.warning("Empty query provided to QueryExpander")
|
|
281
|
+
logger.warning("Empty query provided to QueryExpander. {fallback}", fallback=self._fallback_message())
|
|
273
282
|
return {"queries": [query] if self.include_original_query and isinstance(query, str) else []}
|
|
274
283
|
|
|
275
284
|
response = {"queries": [query] if self.include_original_query else []}
|
|
@@ -286,7 +295,11 @@ class QueryExpander:
|
|
|
286
295
|
span.set_content_tag("haystack.component.output", generator_result)
|
|
287
296
|
|
|
288
297
|
if not generator_result.get("replies") or len(generator_result["replies"]) == 0:
|
|
289
|
-
logger.warning(
|
|
298
|
+
logger.warning(
|
|
299
|
+
"ChatGenerator returned no replies for query: {query}. {fallback}",
|
|
300
|
+
query=query,
|
|
301
|
+
fallback=self._fallback_message(),
|
|
302
|
+
)
|
|
290
303
|
return response
|
|
291
304
|
|
|
292
305
|
expanded_text = generator_result["replies"][0].text.strip()
|
|
@@ -313,7 +326,12 @@ class QueryExpander:
|
|
|
313
326
|
|
|
314
327
|
except Exception as e:
|
|
315
328
|
# Fallback: return original query to maintain pipeline functionality
|
|
316
|
-
logger.exception(
|
|
329
|
+
logger.exception(
|
|
330
|
+
"Failed to expand query {query}. {fallback} Error: {error}",
|
|
331
|
+
query=query,
|
|
332
|
+
fallback=self._fallback_message(),
|
|
333
|
+
error=str(e),
|
|
334
|
+
)
|
|
317
335
|
return response
|
|
318
336
|
|
|
319
337
|
def warm_up(self) -> None:
|
|
@@ -348,23 +366,32 @@ class QueryExpander:
|
|
|
348
366
|
elif hasattr(self.chat_generator, "close"):
|
|
349
367
|
self.chat_generator.close()
|
|
350
368
|
|
|
351
|
-
|
|
352
|
-
|
|
369
|
+
def _fallback_message(self) -> str:
|
|
370
|
+
return "Returning only the original query." if self.include_original_query else "Returning no queries."
|
|
371
|
+
|
|
372
|
+
def _parse_expanded_queries(self, generator_response: str) -> list[str]:
|
|
353
373
|
"""
|
|
354
374
|
Parse the generator response to extract individual expanded queries.
|
|
355
375
|
|
|
356
376
|
:param generator_response: The raw text response from the generator.
|
|
357
377
|
:return: List of parsed expanded queries, deduplicated in first-seen order.
|
|
358
378
|
"""
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
379
|
+
try:
|
|
380
|
+
parsed = _parse_dict_from_json(generator_response, expected_keys=["queries"], raise_on_failure=True)
|
|
381
|
+
except ValueError as e:
|
|
382
|
+
logger.warning(
|
|
383
|
+
"QueryExpander failed to parse the ChatGenerator response: {response}. {fallback} Error: {error}",
|
|
384
|
+
response=generator_response,
|
|
385
|
+
fallback=self._fallback_message(),
|
|
386
|
+
error=e,
|
|
387
|
+
)
|
|
362
388
|
return []
|
|
363
389
|
|
|
364
390
|
if not isinstance(parsed["queries"], list):
|
|
365
391
|
logger.warning(
|
|
366
|
-
"Expected 'queries' to be a list but got {type}.
|
|
392
|
+
"Expected 'queries' to be a list but got {type}. {fallback}",
|
|
367
393
|
type=type(parsed["queries"]).__name__,
|
|
394
|
+
fallback=self._fallback_message(),
|
|
368
395
|
)
|
|
369
396
|
return []
|
|
370
397
|
|
|
@@ -379,4 +406,10 @@ class QueryExpander:
|
|
|
379
406
|
else:
|
|
380
407
|
logger.warning("Skipping non-string or empty query in response: {item}", item=item)
|
|
381
408
|
|
|
409
|
+
if not queries:
|
|
410
|
+
logger.warning(
|
|
411
|
+
"QueryExpander found no valid queries in the ChatGenerator response. {fallback}",
|
|
412
|
+
fallback=self._fallback_message(),
|
|
413
|
+
)
|
|
414
|
+
|
|
382
415
|
return queries
|
|
@@ -89,8 +89,8 @@ class LLMRanker:
|
|
|
89
89
|
are kept, so the output can contain fewer than `top_k` documents, or none if the LLM considers none relevant.
|
|
90
90
|
|
|
91
91
|
If the query is empty, or if generation or parsing fails and `raise_on_failure` is `False`, the ranker falls back
|
|
92
|
-
to the deduplicated input documents in their original order. `top_k` is not applied to
|
|
93
|
-
|
|
92
|
+
to the deduplicated input documents, unranked and in their original order. `top_k` is not applied to them, since
|
|
93
|
+
cutting off unranked documents could drop relevant ones.
|
|
94
94
|
|
|
95
95
|
Usage example:
|
|
96
96
|
|
|
@@ -162,7 +162,7 @@ class LLMRanker:
|
|
|
162
162
|
documents.
|
|
163
163
|
:param raise_on_failure:
|
|
164
164
|
If `True`, raise when generation or response parsing fails. If `False`, log the failure and return all
|
|
165
|
-
deduplicated input documents in their original order, without applying `top_k`.
|
|
165
|
+
deduplicated input documents unranked, in their original order, without applying `top_k`.
|
|
166
166
|
:raises ValueError:
|
|
167
167
|
If `top_k` is not greater than 0 or if `prompt` doesn't include exactly the variables `query` and
|
|
168
168
|
`documents`.
|
|
@@ -254,7 +254,7 @@ class LLMRanker:
|
|
|
254
254
|
A dictionary with the following key:
|
|
255
255
|
- `documents`: Up to `top_k` documents the LLM considers relevant, from most to least relevant. If
|
|
256
256
|
`query` is empty, or if generation or parsing fails and `raise_on_failure` is `False`, all deduplicated
|
|
257
|
-
input documents in their original order.
|
|
257
|
+
input documents unranked, in their original order.
|
|
258
258
|
:raises ValueError:
|
|
259
259
|
If `top_k` is not greater than 0.
|
|
260
260
|
"""
|
|
@@ -269,7 +269,7 @@ class LLMRanker:
|
|
|
269
269
|
fallback_documents = deduplicated_documents
|
|
270
270
|
|
|
271
271
|
if not isinstance(query, str) or not query.strip():
|
|
272
|
-
logger.warning("Empty query provided to LLMRanker. Returning documents
|
|
272
|
+
logger.warning("Empty query provided to LLMRanker. Returning the deduplicated input documents unranked.")
|
|
273
273
|
return {"documents": fallback_documents}
|
|
274
274
|
|
|
275
275
|
self.warm_up()
|
|
@@ -285,7 +285,9 @@ class LLMRanker:
|
|
|
285
285
|
if self.raise_on_failure:
|
|
286
286
|
raise
|
|
287
287
|
logger.warning(
|
|
288
|
-
"LLMRanker failed during chat generation. Returning
|
|
288
|
+
"LLMRanker failed during chat generation. Returning the deduplicated input documents unranked. "
|
|
289
|
+
"Error: {error}",
|
|
290
|
+
error=exc,
|
|
289
291
|
)
|
|
290
292
|
return {"documents": fallback_documents}
|
|
291
293
|
|
|
@@ -296,7 +298,8 @@ class LLMRanker:
|
|
|
296
298
|
if self.raise_on_failure:
|
|
297
299
|
raise
|
|
298
300
|
logger.warning(
|
|
299
|
-
"LLMRanker failed while processing the chat response. Returning
|
|
301
|
+
"LLMRanker failed while processing the chat response. Returning the deduplicated input documents "
|
|
302
|
+
"unranked. Error: {error}",
|
|
300
303
|
error=exc,
|
|
301
304
|
)
|
|
302
305
|
return {"documents": fallback_documents}
|
|
@@ -327,7 +330,7 @@ class LLMRanker:
|
|
|
327
330
|
A dictionary with the following key:
|
|
328
331
|
- `documents`: Up to `top_k` documents the LLM considers relevant, from most to least relevant. If
|
|
329
332
|
`query` is empty, or if generation or parsing fails and `raise_on_failure` is `False`, all deduplicated
|
|
330
|
-
input documents in their original order.
|
|
333
|
+
input documents unranked, in their original order.
|
|
331
334
|
:raises ValueError:
|
|
332
335
|
If `top_k` is not greater than 0.
|
|
333
336
|
"""
|
|
@@ -342,7 +345,7 @@ class LLMRanker:
|
|
|
342
345
|
fallback_documents = deduplicated_documents
|
|
343
346
|
|
|
344
347
|
if not isinstance(query, str) or not query.strip():
|
|
345
|
-
logger.warning("Empty query provided to LLMRanker. Returning documents
|
|
348
|
+
logger.warning("Empty query provided to LLMRanker. Returning the deduplicated input documents unranked.")
|
|
346
349
|
return {"documents": fallback_documents}
|
|
347
350
|
|
|
348
351
|
await self.warm_up_async()
|
|
@@ -358,7 +361,9 @@ class LLMRanker:
|
|
|
358
361
|
if self.raise_on_failure:
|
|
359
362
|
raise
|
|
360
363
|
logger.warning(
|
|
361
|
-
"LLMRanker failed during chat generation. Returning
|
|
364
|
+
"LLMRanker failed during chat generation. Returning the deduplicated input documents unranked. "
|
|
365
|
+
"Error: {error}",
|
|
366
|
+
error=exc,
|
|
362
367
|
)
|
|
363
368
|
return {"documents": fallback_documents}
|
|
364
369
|
|
|
@@ -369,7 +374,8 @@ class LLMRanker:
|
|
|
369
374
|
if self.raise_on_failure:
|
|
370
375
|
raise
|
|
371
376
|
logger.warning(
|
|
372
|
-
"LLMRanker failed while processing the chat response. Returning
|
|
377
|
+
"LLMRanker failed while processing the chat response. Returning the deduplicated input documents "
|
|
378
|
+
"unranked. Error: {error}",
|
|
373
379
|
error=exc,
|
|
374
380
|
)
|
|
375
381
|
return {"documents": fallback_documents}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
|
|
5
5
|
import json
|
|
6
|
+
import reprlib
|
|
6
7
|
from collections.abc import Sequence
|
|
7
8
|
from dataclasses import asdict, dataclass, field
|
|
8
9
|
from enum import Enum
|
|
@@ -15,6 +16,11 @@ from haystack.utils.dataclasses import _warn_on_inplace_mutation
|
|
|
15
16
|
|
|
16
17
|
logger = logging.getLogger(__name__)
|
|
17
18
|
|
|
19
|
+
# Shows OpenAI content parts in error messages without their base64 payloads. The string limit matches the reprs of
|
|
20
|
+
# ImageContent and FileContent.
|
|
21
|
+
_CONTENT_PART_REPR = reprlib.Repr()
|
|
22
|
+
_CONTENT_PART_REPR.maxstring = 100
|
|
23
|
+
|
|
18
24
|
|
|
19
25
|
def _parse_openai_tool_call_arguments(raw_arguments: Any) -> dict[str, Any]:
|
|
20
26
|
"""
|
|
@@ -649,6 +655,9 @@ class ChatMessage:
|
|
|
649
655
|
Convert a ChatMessage to the dictionary format expected by OpenAI's Chat Completions API.
|
|
650
656
|
|
|
651
657
|
The `_meta` field of ChatMessage is removed because it is not supported by OpenAI's Chat Completions API.
|
|
658
|
+
The exception is a non-empty string in `meta["refusal"]` of an assistant message. It is sent as a refusal
|
|
659
|
+
content part, or as the `refusal` field if the message also has text. If the message also has tool calls, the
|
|
660
|
+
refusal is dropped with a warning, because OpenAI ignores the tool calls of a message with a refusal.
|
|
652
661
|
|
|
653
662
|
:param require_tool_call_ids:
|
|
654
663
|
If True (default), enforces that each Tool Call includes a non-null `id` attribute.
|
|
@@ -747,6 +756,22 @@ class ChatMessage:
|
|
|
747
756
|
# OpenAI Chat Completions API does not support reasoning content, so we ignore it
|
|
748
757
|
if self.texts:
|
|
749
758
|
openai_msg["content"] = self.texts[0]
|
|
759
|
+
refusal = self._meta.get("refusal") if self.is_from(ChatRole.ASSISTANT) else None
|
|
760
|
+
# Only a string is a refusal. Any other value under this key is ordinary metadata, which isn't sent.
|
|
761
|
+
if not isinstance(refusal, str):
|
|
762
|
+
refusal = None
|
|
763
|
+
elif refusal and self.tool_calls:
|
|
764
|
+
logger.warning(
|
|
765
|
+
"Dropping the refusal of an assistant message that also has tool calls, because OpenAI ignores the "
|
|
766
|
+
"tool calls of a message with a refusal and then rejects the tool results that follow."
|
|
767
|
+
)
|
|
768
|
+
refusal = None
|
|
769
|
+
# OpenAI's content array holds either text parts or exactly one refusal part, so a refusal next to text goes
|
|
770
|
+
# into the `refusal` field.
|
|
771
|
+
if refusal and "content" in openai_msg:
|
|
772
|
+
openai_msg["refusal"] = refusal
|
|
773
|
+
elif refusal:
|
|
774
|
+
openai_msg["content"] = [{"type": "refusal", "refusal": refusal}]
|
|
750
775
|
if self.tool_calls:
|
|
751
776
|
openai_tool_calls = []
|
|
752
777
|
for tc in self.tool_calls:
|
|
@@ -784,11 +809,21 @@ class ChatMessage:
|
|
|
784
809
|
if role not in ["assistant", "user", "system", "developer", "tool"]:
|
|
785
810
|
raise ValueError(f"Unsupported role: {role}")
|
|
786
811
|
|
|
812
|
+
if content is not None and not isinstance(content, (str, list)):
|
|
813
|
+
raise ValueError(
|
|
814
|
+
f"The `content` field must be a string or a list of content parts, got {type(content).__name__}."
|
|
815
|
+
)
|
|
816
|
+
|
|
787
817
|
if role == "assistant":
|
|
818
|
+
refusal = message.get("refusal")
|
|
819
|
+
if refusal is not None and not isinstance(refusal, str):
|
|
820
|
+
raise ValueError(f"The `refusal` field must be a string, got {type(refusal).__name__}.")
|
|
788
821
|
# An empty string is valid content for an assistant message: that is how a reply with nothing to send
|
|
789
|
-
# is serialized. Other falsy content requires tool calls.
|
|
790
|
-
if not content and content != "" and not tool_calls:
|
|
791
|
-
raise ValueError(
|
|
822
|
+
# is serialized. Other falsy content requires tool calls or a refusal.
|
|
823
|
+
if not content and content != "" and not tool_calls and not refusal:
|
|
824
|
+
raise ValueError(
|
|
825
|
+
"For assistant messages, either `content`, `tool_calls`, or `refusal` must be present."
|
|
826
|
+
)
|
|
792
827
|
if tool_calls:
|
|
793
828
|
for tc in tool_calls:
|
|
794
829
|
if "function" not in tc:
|
|
@@ -796,11 +831,118 @@ class ChatMessage:
|
|
|
796
831
|
elif not content:
|
|
797
832
|
raise ValueError(f"The `content` field is required for {role} messages.")
|
|
798
833
|
|
|
834
|
+
@staticmethod
|
|
835
|
+
def _parse_openai_data_url(data_url: Any) -> tuple[str | None, str]:
|
|
836
|
+
"""
|
|
837
|
+
Split a base64 data URL in OpenAI format into its MIME type and base64 payload.
|
|
838
|
+
|
|
839
|
+
:param data_url: A data URL in the format `data:<mime_type>;base64,<base64_data>`.
|
|
840
|
+
:returns: A tuple containing the MIME type (or None if absent) and the base64 data.
|
|
841
|
+
:raises ValueError: If the URL is not a string or not a base64 data URL.
|
|
842
|
+
"""
|
|
843
|
+
if not isinstance(data_url, str) or not data_url.startswith("data:") or ";base64," not in data_url:
|
|
844
|
+
raise ValueError(
|
|
845
|
+
f"Unsupported URL: {_CONTENT_PART_REPR.repr(data_url)}. Only base64 data URLs in the format "
|
|
846
|
+
"`data:<mime_type>;base64,<base64_data>` are supported."
|
|
847
|
+
)
|
|
848
|
+
header, base64_data = data_url.split(";base64,", 1)
|
|
849
|
+
return header[len("data:") :] or None, base64_data
|
|
850
|
+
|
|
851
|
+
@classmethod
|
|
852
|
+
def _from_openai_content_parts(cls, content: list[Any]) -> list[TextContent | ImageContent | FileContent]:
|
|
853
|
+
"""
|
|
854
|
+
Convert a list of content parts in OpenAI format into Haystack content parts.
|
|
855
|
+
|
|
856
|
+
:param content: A list of content parts in OpenAI format.
|
|
857
|
+
:returns: A list of TextContent, ImageContent, and FileContent objects.
|
|
858
|
+
:raises ValueError: If a content part is malformed or of an unsupported type.
|
|
859
|
+
"""
|
|
860
|
+
parts: list[TextContent | ImageContent | FileContent] = []
|
|
861
|
+
for part in content:
|
|
862
|
+
part_type = part.get("type") if isinstance(part, dict) else None
|
|
863
|
+
if part_type == "text":
|
|
864
|
+
if not isinstance(part.get("text"), str):
|
|
865
|
+
raise ValueError(
|
|
866
|
+
f"Unsupported text content part: {_CONTENT_PART_REPR.repr(part)}. "
|
|
867
|
+
"Text parts must contain a `text` string."
|
|
868
|
+
)
|
|
869
|
+
parts.append(TextContent(text=part["text"]))
|
|
870
|
+
elif part_type == "image_url":
|
|
871
|
+
image_url = part.get("image_url")
|
|
872
|
+
if not isinstance(image_url, dict):
|
|
873
|
+
raise ValueError(
|
|
874
|
+
f"Unsupported image content part: {_CONTENT_PART_REPR.repr(part)}. "
|
|
875
|
+
"Image parts must contain an `image_url` object."
|
|
876
|
+
)
|
|
877
|
+
mime_type, base64_image = cls._parse_openai_data_url(image_url.get("url"))
|
|
878
|
+
parts.append(
|
|
879
|
+
ImageContent(base64_image=base64_image, mime_type=mime_type, detail=image_url.get("detail"))
|
|
880
|
+
)
|
|
881
|
+
elif part_type == "file":
|
|
882
|
+
file = part.get("file")
|
|
883
|
+
if not isinstance(file, dict):
|
|
884
|
+
raise ValueError(
|
|
885
|
+
f"Unsupported file content part: {_CONTENT_PART_REPR.repr(part)}. "
|
|
886
|
+
"File parts must contain a `file` object."
|
|
887
|
+
)
|
|
888
|
+
file_data = file.get("file_data")
|
|
889
|
+
if not file_data:
|
|
890
|
+
raise ValueError(
|
|
891
|
+
f"Unsupported file content part: {_CONTENT_PART_REPR.repr(part)}. Only files with inline "
|
|
892
|
+
"base64 `file_data` are supported: files referenced by `file_id` cannot be converted."
|
|
893
|
+
)
|
|
894
|
+
mime_type, base64_data = cls._parse_openai_data_url(file_data)
|
|
895
|
+
parts.append(FileContent(base64_data=base64_data, mime_type=mime_type, filename=file.get("filename")))
|
|
896
|
+
else:
|
|
897
|
+
raise ValueError(
|
|
898
|
+
f"Unsupported content part: {_CONTENT_PART_REPR.repr(part)}. "
|
|
899
|
+
"Supported part types are `text`, `image_url`, and `file`."
|
|
900
|
+
)
|
|
901
|
+
return parts
|
|
902
|
+
|
|
903
|
+
@staticmethod
|
|
904
|
+
def _join_openai_text_parts(content: list[Any], role: str) -> dict[str, str]:
|
|
905
|
+
"""
|
|
906
|
+
Join the text and refusal content parts of a system, developer, or assistant message in OpenAI format.
|
|
907
|
+
|
|
908
|
+
Text parts are joined into a single text because `to_openai_dict_format` only sends the first text of these
|
|
909
|
+
messages. Refusal parts are accepted only in assistant messages and are joined separately, so a refusal never
|
|
910
|
+
ends up in the text.
|
|
911
|
+
|
|
912
|
+
:param content: A list of content parts in OpenAI format.
|
|
913
|
+
:param role: The role of the message, which decides whether refusal parts are accepted.
|
|
914
|
+
:returns: A dictionary that maps each part type in `content` to the texts of its parts, joined with a newline.
|
|
915
|
+
:raises ValueError: If a content part is not a text part with a `text` string, or, in an assistant message, a
|
|
916
|
+
refusal part with a `refusal` string.
|
|
917
|
+
"""
|
|
918
|
+
allowed_types = ("text", "refusal") if role == "assistant" else ("text",)
|
|
919
|
+
texts: dict[str, list[str]] = {}
|
|
920
|
+
for part in content:
|
|
921
|
+
# In OpenAI format, a part's text sits under a key named after its type.
|
|
922
|
+
if (
|
|
923
|
+
not isinstance(part, dict)
|
|
924
|
+
or part.get("type") not in allowed_types
|
|
925
|
+
or not isinstance(part.get(part["type"]), str)
|
|
926
|
+
):
|
|
927
|
+
supported = " and ".join(f"`{t}` parts with a `{t}` string" for t in allowed_types)
|
|
928
|
+
raise ValueError(
|
|
929
|
+
f"Unsupported content part in {role} message: {_CONTENT_PART_REPR.repr(part)}. "
|
|
930
|
+
f"Only {supported} are supported."
|
|
931
|
+
)
|
|
932
|
+
texts.setdefault(part["type"], []).append(part[part["type"]])
|
|
933
|
+
return {part_type: "\n".join(part_texts) for part_type, part_texts in texts.items()}
|
|
934
|
+
|
|
799
935
|
@classmethod
|
|
800
936
|
def from_openai_dict_format(cls, message: dict[str, Any]) -> "ChatMessage":
|
|
801
937
|
"""
|
|
802
938
|
Create a ChatMessage from a dictionary in the format expected by OpenAI's Chat API.
|
|
803
939
|
|
|
940
|
+
`content` can be a string or a list of content parts. In user messages, `text` parts become `TextContent`,
|
|
941
|
+
`image_url` parts with a base64 data URL become `ImageContent`, and `file` parts with inline `file_data` become
|
|
942
|
+
`FileContent`. System, developer, and assistant messages accept `text` parts, which are joined with a newline
|
|
943
|
+
into a single text. An assistant's refusal, given as a `refusal` part or as the `refusal` field, is stored in
|
|
944
|
+
`meta["refusal"]` instead of the text.
|
|
945
|
+
|
|
804
946
|
NOTE: While OpenAI's API requires `tool_call_id` in both tool calls and tool messages, this method
|
|
805
947
|
accepts messages without it to support shallow OpenAI-compatible APIs.
|
|
806
948
|
If you plan to use the resulting ChatMessage with OpenAI, you must include `tool_call_id` or you'll
|
|
@@ -812,7 +954,9 @@ class ChatMessage:
|
|
|
812
954
|
The created ChatMessage object.
|
|
813
955
|
|
|
814
956
|
:raises ValueError:
|
|
815
|
-
If the message dictionary is missing required fields
|
|
957
|
+
If the message dictionary is missing required fields, if `content` is neither a string nor a list, or if
|
|
958
|
+
it contains content parts that can't be converted, such as image URLs that are not base64 data URLs or
|
|
959
|
+
files referenced by `file_id`.
|
|
816
960
|
"""
|
|
817
961
|
cls._validate_openai_message(message)
|
|
818
962
|
|
|
@@ -837,13 +981,27 @@ class ChatMessage:
|
|
|
837
981
|
arguments=_parse_openai_tool_call_arguments(raw_arguments),
|
|
838
982
|
)
|
|
839
983
|
haystack_tool_calls.append(haystack_tc)
|
|
840
|
-
|
|
984
|
+
text = content
|
|
985
|
+
refusals = [message["refusal"]] if message.get("refusal") else []
|
|
986
|
+
if isinstance(content, list):
|
|
987
|
+
joined = cls._join_openai_text_parts(content=content, role=role)
|
|
988
|
+
text = joined.get("text")
|
|
989
|
+
if "refusal" in joined:
|
|
990
|
+
refusals.append(joined["refusal"])
|
|
991
|
+
# ChatMessage has no refusal content, so the refusal goes to meta, from which to_openai_dict_format
|
|
992
|
+
# sends it back. dict.fromkeys keeps a refusal sent both as the field and as a part only once.
|
|
993
|
+
meta = {"refusal": "\n".join(dict.fromkeys(refusals))} if refusals else None
|
|
994
|
+
return cls.from_assistant(text=text, meta=meta, name=name, tool_calls=haystack_tool_calls)
|
|
841
995
|
|
|
842
996
|
assert content is not None # ensured by _validate_openai_message, but we need to make mypy happy
|
|
843
997
|
|
|
844
998
|
if role == "user":
|
|
845
|
-
|
|
999
|
+
if isinstance(content, str):
|
|
1000
|
+
return cls.from_user(text=content, name=name)
|
|
1001
|
+
return cls.from_user(content_parts=cls._from_openai_content_parts(content), name=name)
|
|
846
1002
|
if role in ["system", "developer"]:
|
|
1003
|
+
if isinstance(content, list):
|
|
1004
|
+
content = cls._join_openai_text_parts(content=content, role=role)["text"]
|
|
847
1005
|
return cls.from_system(text=content, name=name)
|
|
848
1006
|
|
|
849
1007
|
if isinstance(content, list):
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.4.0.dev20261006000327
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{haystack_ai-3.4.0.dev20261006000327 → haystack_ai-3.4.0.dev20261007000336}/haystack/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|