glchat-plugin 0.3.9__py3-none-any.whl → 0.3.11__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.
- glchat_plugin/config/constant.py +4 -0
- glchat_plugin/context/context_manager.py +27 -0
- {glchat_plugin-0.3.9.dist-info → glchat_plugin-0.3.11.dist-info}/METADATA +1 -1
- {glchat_plugin-0.3.9.dist-info → glchat_plugin-0.3.11.dist-info}/RECORD +6 -6
- {glchat_plugin-0.3.9.dist-info → glchat_plugin-0.3.11.dist-info}/WHEEL +1 -1
- {glchat_plugin-0.3.9.dist-info → glchat_plugin-0.3.11.dist-info}/top_level.txt +0 -0
glchat_plugin/config/constant.py
CHANGED
|
@@ -28,6 +28,9 @@ class SearchType(StrEnum):
|
|
|
28
28
|
Delivers the full picture with depth and thoroughness, covering all relevant angles,
|
|
29
29
|
details, and supporting data. Suitable for professional research tasks where
|
|
30
30
|
precision matters more than speed.
|
|
31
|
+
INTERNAL_DEEP_RESEARCH: Retrieves answers using Deep Research with internal data sources.
|
|
32
|
+
Accesses internal repositories such as Google Drive and utilizes the same processing
|
|
33
|
+
engine as Essentials Deep Research mode.
|
|
31
34
|
"""
|
|
32
35
|
|
|
33
36
|
NORMAL = "normal"
|
|
@@ -37,6 +40,7 @@ class SearchType(StrEnum):
|
|
|
37
40
|
_DEEP_RESEARCH = "deep_research"
|
|
38
41
|
ESSENTIALS_DEEP_RESEARCH = "essentials_deep_research"
|
|
39
42
|
COMPREHENSIVE_DEEP_RESEARCH = "comprehensive_deep_research"
|
|
43
|
+
INTERNAL_DEEP_RESEARCH = "internal_deep_research"
|
|
40
44
|
|
|
41
45
|
@property
|
|
42
46
|
def WEB(cls) -> "SearchType":
|
|
@@ -21,6 +21,7 @@ class ContextManager:
|
|
|
21
21
|
_tenant: ContextVar[str | None] = ContextVar("tenant_id", default=None)
|
|
22
22
|
_user: ContextVar[str | None] = ContextVar("user_id", default=None)
|
|
23
23
|
_user_session: ContextVar[Any | None] = ContextVar("user_session", default=None)
|
|
24
|
+
_request_id: ContextVar[str | None] = ContextVar("request_id", default=None)
|
|
24
25
|
|
|
25
26
|
@classmethod
|
|
26
27
|
def set_tenant(cls, tenant_id: str | None) -> None:
|
|
@@ -76,3 +77,29 @@ class ContextManager:
|
|
|
76
77
|
Any | None: The user session.
|
|
77
78
|
"""
|
|
78
79
|
return cls._user_session.get()
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def set_request_id(cls, request_id: str | None) -> None:
|
|
83
|
+
"""Set the request id in the context.
|
|
84
|
+
|
|
85
|
+
Args:
|
|
86
|
+
request_id (str | None): The request id.
|
|
87
|
+
"""
|
|
88
|
+
cls._request_id.set(request_id)
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def get_request_id(cls) -> str | None:
|
|
92
|
+
"""Get the request id from the context.
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
str | None: The request id.
|
|
96
|
+
"""
|
|
97
|
+
return cls._request_id.get()
|
|
98
|
+
|
|
99
|
+
@classmethod
|
|
100
|
+
def clear(cls) -> None:
|
|
101
|
+
"""Clear the context."""
|
|
102
|
+
cls._tenant.set(None)
|
|
103
|
+
cls._user.set(None)
|
|
104
|
+
cls._user_session.set(None)
|
|
105
|
+
cls._request_id.set(None)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
glchat_plugin/__init__.py,sha256=SHSBMz7JDU6MecyIrhHu5-3NVs89JkXhyvD3ZGOkWOE,37
|
|
2
2
|
glchat_plugin/config/__init__.py,sha256=DNnX8B_TvAN89oyMgq32zG1DeaezODrihiAXTwOPT5o,39
|
|
3
3
|
glchat_plugin/config/app_config.py,sha256=9_ShYtaQ7Rp14sSkrIFLoOAMlbwVlm13EuCxzOn4NCI,426
|
|
4
|
-
glchat_plugin/config/constant.py,sha256=
|
|
4
|
+
glchat_plugin/config/constant.py,sha256=sF-FyyrBwq1Y6MunZvFntpKpMVMb1JH3ICrxuuftDVs,3892
|
|
5
5
|
glchat_plugin/context/__init__.py,sha256=3Wx_apMIS6z-m6eRs6hoyOsJFLJfKmMFOkrPDkPQfJI,40
|
|
6
|
-
glchat_plugin/context/context_manager.py,sha256=
|
|
6
|
+
glchat_plugin/context/context_manager.py,sha256=4UWsdXV-5JkVfwltxR1PxIYiPpodhxo-CTo8am4qVQ8,2717
|
|
7
7
|
glchat_plugin/handler/__init__.py,sha256=H5DJaAfwwtRsvMcOaEzHfGMQk25H7la0E7uPfksWtoQ,40
|
|
8
8
|
glchat_plugin/handler/base_post_login_handler.py,sha256=48xSbe_LwTCjRY-lCuzWXqbnEr1ql8bAhQih1Xeh8f8,2835
|
|
9
9
|
glchat_plugin/pipeline/__init__.py,sha256=Sk-NfIGyA9VKIg0Bt5OHatNUYyWVPh9i5xhE5DFAfbo,41
|
|
@@ -19,7 +19,7 @@ glchat_plugin/storage/base_anonymizer_storage.py,sha256=oFwovWrsjM7v1YjeN-4p-M3O
|
|
|
19
19
|
glchat_plugin/storage/base_chat_history_storage.py,sha256=YIGM8zv7s5BQ8O7W1LfaLyQW4SF9Bt3aolowsoDaQw8,11257
|
|
20
20
|
glchat_plugin/tools/__init__.py,sha256=OFotHbgQ8mZEbdlvlv5aVMdxfubPvkVWAcTwhIPdIqQ,542
|
|
21
21
|
glchat_plugin/tools/decorators.py,sha256=AvQBV18wzXWdC483RSSmpfh92zsqTyp8SzDLIkreIGU,3925
|
|
22
|
-
glchat_plugin-0.3.
|
|
23
|
-
glchat_plugin-0.3.
|
|
24
|
-
glchat_plugin-0.3.
|
|
25
|
-
glchat_plugin-0.3.
|
|
22
|
+
glchat_plugin-0.3.11.dist-info/METADATA,sha256=96-oXZLhemSorKY4d2jOoegz8UN9n-J4WIB4Ms2rhSE,2064
|
|
23
|
+
glchat_plugin-0.3.11.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
24
|
+
glchat_plugin-0.3.11.dist-info/top_level.txt,sha256=fzKSXmct5dY4CAKku4-mkdHX-QPAyQVvo8vpQj8qizY,14
|
|
25
|
+
glchat_plugin-0.3.11.dist-info/RECORD,,
|
|
File without changes
|