unique_toolkit 1.14.1__py3-none-any.whl → 1.14.3__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/framework_utilities/langchain/client.py +18 -1
- unique_toolkit/services/chat_service.py +1498 -0
- unique_toolkit/test_utilities/events.py +10 -8
- {unique_toolkit-1.14.1.dist-info → unique_toolkit-1.14.3.dist-info}/METADATA +9 -1
- {unique_toolkit-1.14.1.dist-info → unique_toolkit-1.14.3.dist-info}/RECORD +11 -10
- /unique_toolkit/{knowledge_base.py → services/knowledge_base.py} +0 -0
- {unique_toolkit-1.14.1.dist-info → unique_toolkit-1.14.3.dist-info}/LICENSE +0 -0
- {unique_toolkit-1.14.1.dist-info → unique_toolkit-1.14.3.dist-info}/WHEEL +0 -0
@@ -1,6 +1,8 @@
|
|
1
1
|
import importlib.util
|
2
2
|
import logging
|
3
3
|
|
4
|
+
from typing_extensions import deprecated
|
5
|
+
|
4
6
|
from unique_toolkit.app.unique_settings import UniqueSettings
|
5
7
|
from unique_toolkit.framework_utilities.utils import get_default_headers
|
6
8
|
|
@@ -22,7 +24,7 @@ else:
|
|
22
24
|
raise LangchainNotInstalledError()
|
23
25
|
|
24
26
|
|
25
|
-
def
|
27
|
+
def get_langchain_client(
|
26
28
|
unique_settings: UniqueSettings | None = None, model: str = "AZURE_GPT_4o_2024_0806"
|
27
29
|
) -> ChatOpenAI:
|
28
30
|
"""Get a Langchain ChatOpenAI client instance.
|
@@ -45,3 +47,18 @@ def get_client(
|
|
45
47
|
model=model,
|
46
48
|
api_key=unique_settings.app.key,
|
47
49
|
)
|
50
|
+
|
51
|
+
|
52
|
+
@deprecated("Use get_langchain_client instead")
|
53
|
+
def get_client(
|
54
|
+
unique_settings: UniqueSettings | None = None, model: str = "AZURE_GPT_4o_2024_0806"
|
55
|
+
) -> ChatOpenAI:
|
56
|
+
"""Get a Langchain ChatOpenAI client instance.
|
57
|
+
|
58
|
+
Args:
|
59
|
+
unique_settings: UniqueSettings instance
|
60
|
+
|
61
|
+
Returns:
|
62
|
+
ChatOpenAI client instance
|
63
|
+
"""
|
64
|
+
return get_client(unique_settings, model)
|