Skip to content

Commit b3736bd

Browse files
v0.14.2 core (#19879)
1 parent b5eb081 commit b3736bd

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

llama-index-core/llama_index/core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Top-level imports for LlamaIndex."""
22

3-
__version__ = "0.14.1"
3+
__version__ = "0.14.2"
44

55
import logging
66
from logging import NullHandler

llama-index-core/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dev = [
3131

3232
[project]
3333
name = "llama-index-core"
34-
version = "0.14.1"
34+
version = "0.14.2"
3535
description = "Interface between LLMs and your data"
3636
authors = [{name = "Jerry Liu", email = "[email protected]"}]
3737
requires-python = ">=3.9,<4.0"

llama-index-core/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

llama-index-integrations/vector_stores/llama-index-vector-stores-postgres/llama_index/vector_stores/postgres/base.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ class PGVectorStore(BasePydanticVectorStore):
245245
create_engine_kwargs: Dict
246246
initialization_fail_on_error: bool = False
247247
indexed_metadata_keys: Optional[Set[Tuple[str, PGType]]] = None
248-
customize_query_fn: Optional[Callable[[Select, Any, Any], Select]] = None
249248

250249
hnsw_kwargs: Optional[Dict[str, Any]]
251250

@@ -260,6 +259,9 @@ class PGVectorStore(BasePydanticVectorStore):
260259
)
261260
_async_session: sqlalchemy.ext.asyncio.AsyncSession = PrivateAttr()
262261
_is_initialized: bool = PrivateAttr(default=False)
262+
_customize_query_fn: Optional[Callable[[Select, Any, Any], Select]] = PrivateAttr(
263+
default=None
264+
)
263265

264266
def __init__(
265267
self,
@@ -337,7 +339,6 @@ def __init__(
337339
initialization_fail_on_error=initialization_fail_on_error,
338340
use_halfvec=use_halfvec,
339341
indexed_metadata_keys=indexed_metadata_keys,
340-
customize_query_fn=customize_query_fn,
341342
)
342343

343344
# sqlalchemy model
@@ -366,6 +367,8 @@ def __init__(
366367
"Both engine and async_engine must be provided, or both must be None"
367368
)
368369

370+
self._customize_query_fn = customize_query_fn
371+
369372
async def close(self) -> None:
370373
if not self._is_initialized:
371374
return
@@ -781,8 +784,8 @@ def _build_query(
781784
self._table_class.embedding.cosine_distance(embedding).label("distance"),
782785
).order_by(text("distance asc"))
783786

784-
if self.customize_query_fn is not None:
785-
stmt = self.customize_query_fn(stmt, self._table_class, **kwargs)
787+
if self._customize_query_fn is not None:
788+
stmt = self._customize_query_fn(stmt, self._table_class, **kwargs)
786789

787790
return self._apply_filters_and_limit(stmt, limit, metadata_filters)
788791

@@ -918,8 +921,8 @@ def get_col_spec(self, **kw: Any) -> str:
918921
.order_by(text("rank desc"))
919922
)
920923

921-
if self.customize_query_fn is not None:
922-
stmt = self.customize_query_fn(stmt, self._table_class, **kwargs)
924+
if self._customize_query_fn is not None:
925+
stmt = self._customize_query_fn(stmt, self._table_class, **kwargs)
923926

924927
# type: ignore
925928
return self._apply_filters_and_limit(stmt, limit, metadata_filters)

llama-index-integrations/vector_stores/llama-index-vector-stores-postgres/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dev = [
2727

2828
[project]
2929
name = "llama-index-vector-stores-postgres"
30-
version = "0.6.7"
30+
version = "0.6.8"
3131
description = "llama-index vector_stores postgres integration"
3232
authors = [{name = "Your Name", email = "[email protected]"}]
3333
requires-python = ">=3.9,<4.0"

0 commit comments

Comments
 (0)