unique_toolkit 1.14.2__py3-none-any.whl → 1.14.4__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.
- unique_toolkit/__init__.py +19 -1
- unique_toolkit/chat/__init__.py +8 -1
- unique_toolkit/chat/service.py +86 -1430
- unique_toolkit/content/schemas.py +2 -1
- unique_toolkit/framework_utilities/langchain/client.py +18 -1
- unique_toolkit/services/chat_service.py +1498 -0
- unique_toolkit/{knowledge_base.py → services/knowledge_base.py} +0 -11
- {unique_toolkit-1.14.2.dist-info → unique_toolkit-1.14.4.dist-info}/METADATA +11 -1
- {unique_toolkit-1.14.2.dist-info → unique_toolkit-1.14.4.dist-info}/RECORD +11 -10
- {unique_toolkit-1.14.2.dist-info → unique_toolkit-1.14.4.dist-info}/LICENSE +0 -0
- {unique_toolkit-1.14.2.dist-info → unique_toolkit-1.14.4.dist-info}/WHEEL +0 -0
unique_toolkit/__init__.py
CHANGED
@@ -2,15 +2,27 @@
|
|
2
2
|
from unique_toolkit.chat import ChatService
|
3
3
|
from unique_toolkit.content import ContentService
|
4
4
|
from unique_toolkit.embedding import EmbeddingService
|
5
|
-
from unique_toolkit.
|
5
|
+
from unique_toolkit.framework_utilities.openai.client import (
|
6
|
+
get_async_openai_client,
|
7
|
+
get_openai_client,
|
8
|
+
)
|
6
9
|
from unique_toolkit.language_model import (
|
7
10
|
LanguageModelMessages,
|
8
11
|
LanguageModelName,
|
9
12
|
LanguageModelService,
|
10
13
|
LanguageModelToolDescription,
|
11
14
|
)
|
15
|
+
from unique_toolkit.services.knowledge_base import KnowledgeBaseService
|
12
16
|
from unique_toolkit.short_term_memory import ShortTermMemoryService
|
13
17
|
|
18
|
+
# Conditionally import langchain utilities if langchain is installed
|
19
|
+
try:
|
20
|
+
from unique_toolkit.framework_utilities.langchain.client import get_langchain_client # noqa: F401, I001
|
21
|
+
|
22
|
+
_LANGCHAIN_AVAILABLE = True
|
23
|
+
except ImportError:
|
24
|
+
_LANGCHAIN_AVAILABLE = False
|
25
|
+
|
14
26
|
# You can add other classes you frequently use here as well
|
15
27
|
|
16
28
|
__all__ = [
|
@@ -23,4 +35,10 @@ __all__ = [
|
|
23
35
|
"EmbeddingService",
|
24
36
|
"ShortTermMemoryService",
|
25
37
|
"KnowledgeBaseService",
|
38
|
+
"get_openai_client",
|
39
|
+
"get_async_openai_client",
|
26
40
|
]
|
41
|
+
|
42
|
+
# Add langchain-specific exports if available
|
43
|
+
if _LANGCHAIN_AVAILABLE:
|
44
|
+
__all__.append("get_langchain_client")
|
unique_toolkit/chat/__init__.py
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
import warnings
|
2
|
+
|
1
3
|
from .constants import DOMAIN_NAME as DOMAIN_NAME
|
2
4
|
from .schemas import ChatMessage as ChatMessage
|
3
5
|
from .schemas import ChatMessageAssessment as ChatMessageAssessment
|
@@ -5,7 +7,12 @@ from .schemas import ChatMessageAssessmentLabel as ChatMessageAssessmentLabel
|
|
5
7
|
from .schemas import ChatMessageAssessmentStatus as ChatMessageAssessmentStatus
|
6
8
|
from .schemas import ChatMessageAssessmentType as ChatMessageAssessmentType
|
7
9
|
from .schemas import ChatMessageRole as ChatMessageRole
|
8
|
-
|
10
|
+
|
11
|
+
# Import ChatService with deprecation warning suppressed for internal use
|
12
|
+
with warnings.catch_warnings():
|
13
|
+
warnings.simplefilter("ignore", DeprecationWarning)
|
14
|
+
from .service import ChatService as ChatService
|
15
|
+
|
9
16
|
from .utils import (
|
10
17
|
convert_chat_history_to_injectable_string as convert_chat_history_to_injectable_string,
|
11
18
|
)
|