langchain-timbr 2.1.10__py3-none-any.whl → 2.1.12__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.
- langchain_timbr/_version.py +2 -2
- langchain_timbr/utils/timbr_llm_utils.py +1 -1
- langchain_timbr/utils/timbr_utils.py +17 -5
- {langchain_timbr-2.1.10.dist-info → langchain_timbr-2.1.12.dist-info}/METADATA +4 -3
- {langchain_timbr-2.1.10.dist-info → langchain_timbr-2.1.12.dist-info}/RECORD +7 -7
- {langchain_timbr-2.1.10.dist-info → langchain_timbr-2.1.12.dist-info}/WHEEL +0 -0
- {langchain_timbr-2.1.10.dist-info → langchain_timbr-2.1.12.dist-info}/licenses/LICENSE +0 -0
langchain_timbr/_version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '2.1.
|
|
32
|
-
__version_tuple__ = version_tuple = (2, 1,
|
|
31
|
+
__version__ = version = '2.1.12'
|
|
32
|
+
__version_tuple__ = version_tuple = (2, 1, 12)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -304,7 +304,7 @@ def determine_concept(
|
|
|
304
304
|
|
|
305
305
|
concepts_desc_arr.append(concept_verbose)
|
|
306
306
|
|
|
307
|
-
if len(concepts_and_views) == 1:
|
|
307
|
+
if len(concepts_and_views) == 1:
|
|
308
308
|
# If only one concept is provided, return it directly
|
|
309
309
|
determined_concept_name = list(concepts_and_views.keys())[0]
|
|
310
310
|
else:
|
|
@@ -241,24 +241,36 @@ def get_tags(conn_params: dict, include_tags: Optional[Any] = None) -> dict:
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
|
|
244
|
-
def _should_ignore_list(list: list) -> bool:
|
|
244
|
+
def _should_ignore_list(list: list[Any] | None) -> bool:
|
|
245
245
|
return bool(list and len(list) == 1 and (list[0].lower() in ['none', 'null']))
|
|
246
246
|
|
|
247
247
|
|
|
248
|
-
def _should_select_all(list: list) -> bool:
|
|
248
|
+
def _should_select_all(list: list[Any] | None) -> bool:
|
|
249
249
|
return bool(list and len(list) == 1 and list[0] == '*')
|
|
250
250
|
|
|
251
251
|
|
|
252
|
+
def _has_dtimbr_permissions(conn_params: dict) -> bool:
|
|
253
|
+
has_perms = True
|
|
254
|
+
dtimbr_query = "SHOW TABLES IN dtimbr"
|
|
255
|
+
try:
|
|
256
|
+
dtimbr_tables = run_query(dtimbr_query, conn_params)
|
|
257
|
+
has_perms = len(dtimbr_tables) > 0
|
|
258
|
+
except Exception:
|
|
259
|
+
has_perms = False
|
|
260
|
+
|
|
261
|
+
return has_perms
|
|
262
|
+
|
|
263
|
+
|
|
252
264
|
@cache_with_version_check
|
|
253
265
|
def get_concepts(
|
|
254
266
|
conn_params,
|
|
255
|
-
concepts_list: Optional[list] = None,
|
|
256
|
-
views_list: Optional[list] = None,
|
|
267
|
+
concepts_list: Optional[list[Any]] = None,
|
|
268
|
+
views_list: Optional[list[Any]] = None,
|
|
257
269
|
include_logic_concepts: Optional[bool] = False,
|
|
258
270
|
) -> dict:
|
|
259
271
|
"""Fetch concepts (or views) from timbr.sys_concepts and/or timbr.sys_views."""
|
|
260
272
|
joined_views = ','.join(f"'{v}'" for v in views_list) if views_list else ''
|
|
261
|
-
should_ignore_concepts = _should_ignore_list(concepts_list)
|
|
273
|
+
should_ignore_concepts = _should_ignore_list(concepts_list) or not _has_dtimbr_permissions(conn_params)
|
|
262
274
|
should_ignore_views = _should_ignore_list(views_list)
|
|
263
275
|
|
|
264
276
|
filter_concepts = " WHERE concept IN (SELECT DISTINCT concept FROM timbr.sys_concept_properties)" if not include_logic_concepts else ""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langchain-timbr
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.12
|
|
4
4
|
Summary: LangChain & LangGraph extensions that parse LLM prompts into Timbr semantic SQL and execute them.
|
|
5
5
|
Project-URL: Homepage, https://github.com/WPSemantix/langchain-timbr
|
|
6
6
|
Project-URL: Documentation, https://docs.timbr.ai/doc/docs/integration/langchain-sdk/
|
|
@@ -23,10 +23,11 @@ Requires-Dist: cryptography==45.0.7; python_version >= '3.11'
|
|
|
23
23
|
Requires-Dist: cryptography>=44.0.3; python_version == '3.10'
|
|
24
24
|
Requires-Dist: langchain-community==0.3.30; python_version >= '3.11'
|
|
25
25
|
Requires-Dist: langchain-community>=0.3.27; python_version == '3.10'
|
|
26
|
-
Requires-Dist: langchain-core>=0.3.
|
|
26
|
+
Requires-Dist: langchain-core>=0.3.81
|
|
27
27
|
Requires-Dist: langchain==0.3.27; python_version >= '3.11'
|
|
28
28
|
Requires-Dist: langchain>=0.3.25; python_version == '3.10'
|
|
29
|
-
Requires-Dist: langgraph==0.
|
|
29
|
+
Requires-Dist: langgraph-checkpoint==3.0.0
|
|
30
|
+
Requires-Dist: langgraph==1.0.1; python_version >= '3.11'
|
|
30
31
|
Requires-Dist: langgraph>=0.3.20; python_version == '3.10'
|
|
31
32
|
Requires-Dist: pydantic==2.10.4
|
|
32
33
|
Requires-Dist: pytimbr-api>=2.1.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
langchain_timbr/__init__.py,sha256=qNyk3Rt-8oWr_OGuU_E-6siNZXuCnvVEkj65EIuVbbQ,824
|
|
2
|
-
langchain_timbr/_version.py,sha256=
|
|
2
|
+
langchain_timbr/_version.py,sha256=1lj0AemMGT5453uaWZkkL9tBMOyKax93TB9JdLpfKiI,706
|
|
3
3
|
langchain_timbr/config.py,sha256=b-mLIrswgSez282ItJntb5mCa8poOe7kqXG1W_jGxvw,1971
|
|
4
4
|
langchain_timbr/timbr_llm_connector.py,sha256=Y3nzWoocI5txvPGPAxwFsJde9k9l2J9ioB54MYRLrEQ,13288
|
|
5
5
|
langchain_timbr/langchain/__init__.py,sha256=ejcsZKP9PK0j4WrrCCcvBXpDpP-TeRiVb21OIUJqix8,580
|
|
@@ -20,9 +20,9 @@ langchain_timbr/llm_wrapper/timbr_llm_wrapper.py,sha256=sDqDOz0qu8b4WWlagjNceswM
|
|
|
20
20
|
langchain_timbr/utils/general.py,sha256=KkehHvIj8GoQ_0KVXLcUVeaYaTtkuzgXmYYx2TXJhI4,10253
|
|
21
21
|
langchain_timbr/utils/prompt_service.py,sha256=QVmfA9cHO2IPVsKG8V5cuMm2gPfvRq2VzLcx04sqT88,12197
|
|
22
22
|
langchain_timbr/utils/temperature_supported_models.json,sha256=d3UmBUpG38zDjjB42IoGpHTUaf0pHMBRSPY99ao1a3g,1832
|
|
23
|
-
langchain_timbr/utils/timbr_llm_utils.py,sha256=
|
|
24
|
-
langchain_timbr/utils/timbr_utils.py,sha256=
|
|
25
|
-
langchain_timbr-2.1.
|
|
26
|
-
langchain_timbr-2.1.
|
|
27
|
-
langchain_timbr-2.1.
|
|
28
|
-
langchain_timbr-2.1.
|
|
23
|
+
langchain_timbr/utils/timbr_llm_utils.py,sha256=ggz-9SpxFNxBO3bwSCNdNeyjZJYK-vCIufBvRZAgyMM,34418
|
|
24
|
+
langchain_timbr/utils/timbr_utils.py,sha256=rhnGQndTIm4Hb5R_vAuJydnjYd88nbzm1I0yp5L8oEQ,19268
|
|
25
|
+
langchain_timbr-2.1.12.dist-info/METADATA,sha256=pk7feupa72SCwWmHyca4u9J_fnASPxnCHb8jphZBWfw,10768
|
|
26
|
+
langchain_timbr-2.1.12.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
27
|
+
langchain_timbr-2.1.12.dist-info/licenses/LICENSE,sha256=0ITGFk2alkC7-e--bRGtuzDrv62USIiVyV2Crf3_L_0,1065
|
|
28
|
+
langchain_timbr-2.1.12.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|