haystack-experimental 0.15.2__py3-none-any.whl → 0.17.0__py3-none-any.whl
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_experimental/chat_message_stores/in_memory.py +3 -3
- haystack_experimental/chat_message_stores/types.py +2 -2
- haystack_experimental/components/agents/agent.py +264 -124
- haystack_experimental/components/agents/human_in_the_loop/dataclasses.py +6 -6
- haystack_experimental/components/agents/human_in_the_loop/errors.py +1 -5
- haystack_experimental/components/agents/human_in_the_loop/strategies.py +10 -10
- haystack_experimental/components/agents/human_in_the_loop/types.py +5 -5
- haystack_experimental/components/agents/human_in_the_loop/user_interfaces.py +2 -2
- haystack_experimental/components/generators/chat/openai.py +11 -11
- haystack_experimental/components/preprocessors/__init__.py +1 -3
- haystack_experimental/components/retrievers/chat_message_retriever.py +4 -4
- haystack_experimental/components/retrievers/types/protocol.py +3 -3
- haystack_experimental/components/summarizers/llm_summarizer.py +7 -7
- haystack_experimental/core/pipeline/breakpoint.py +6 -6
- haystack_experimental/dataclasses/breakpoints.py +2 -2
- haystack_experimental/memory_stores/__init__.py +7 -0
- haystack_experimental/memory_stores/mem0/__init__.py +16 -0
- haystack_experimental/memory_stores/mem0/memory_store.py +323 -0
- haystack_experimental/memory_stores/types/__init__.py +7 -0
- haystack_experimental/memory_stores/types/protocol.py +94 -0
- haystack_experimental/utils/hallucination_risk_calculator/dataclasses.py +9 -9
- haystack_experimental/utils/hallucination_risk_calculator/openai_planner.py +4 -4
- haystack_experimental/utils/hallucination_risk_calculator/skeletonization.py +5 -5
- {haystack_experimental-0.15.2.dist-info → haystack_experimental-0.17.0.dist-info}/METADATA +8 -11
- {haystack_experimental-0.15.2.dist-info → haystack_experimental-0.17.0.dist-info}/RECORD +28 -24
- haystack_experimental/components/preprocessors/embedding_based_document_splitter.py +0 -430
- {haystack_experimental-0.15.2.dist-info → haystack_experimental-0.17.0.dist-info}/WHEEL +0 -0
- {haystack_experimental-0.15.2.dist-info → haystack_experimental-0.17.0.dist-info}/licenses/LICENSE +0 -0
- {haystack_experimental-0.15.2.dist-info → haystack_experimental-0.17.0.dist-info}/licenses/LICENSE-MIT.txt +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
|
|
5
5
|
from dataclasses import replace
|
|
6
|
-
from typing import Any, Iterable
|
|
6
|
+
from typing import Any, Iterable
|
|
7
7
|
|
|
8
8
|
from haystack import default_from_dict, default_to_dict
|
|
9
9
|
from haystack.dataclasses import ChatMessage, ChatRole
|
|
@@ -42,7 +42,7 @@ class InMemoryChatMessageStore:
|
|
|
42
42
|
```
|
|
43
43
|
"""
|
|
44
44
|
|
|
45
|
-
def __init__(self, skip_system_messages: bool = True, last_k:
|
|
45
|
+
def __init__(self, skip_system_messages: bool = True, last_k: int | None = 10) -> None:
|
|
46
46
|
"""
|
|
47
47
|
Create an InMemoryChatMessageStore.
|
|
48
48
|
|
|
@@ -135,7 +135,7 @@ class InMemoryChatMessageStore:
|
|
|
135
135
|
|
|
136
136
|
return len(messages_to_write)
|
|
137
137
|
|
|
138
|
-
def retrieve_messages(self, chat_history_id: str, last_k:
|
|
138
|
+
def retrieve_messages(self, chat_history_id: str, last_k: int | None = None) -> list[ChatMessage]:
|
|
139
139
|
"""
|
|
140
140
|
Retrieves all stored chat messages.
|
|
141
141
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
|
|
5
|
-
from typing import Any,
|
|
5
|
+
from typing import Any, Protocol
|
|
6
6
|
|
|
7
7
|
from haystack.dataclasses import ChatMessage
|
|
8
8
|
|
|
@@ -74,7 +74,7 @@ class ChatMessageStore(Protocol):
|
|
|
74
74
|
"""
|
|
75
75
|
...
|
|
76
76
|
|
|
77
|
-
def retrieve_messages(self, chat_history_id: str, last_k:
|
|
77
|
+
def retrieve_messages(self, chat_history_id: str, last_k: int | None = None) -> list[ChatMessage]:
|
|
78
78
|
"""
|
|
79
79
|
Retrieves chat messages from the ChatMessageStore.
|
|
80
80
|
|