Skip to content

Commit 40f350f

Browse files
committed
[ENH] Export schema and search types from chromadb.api
1 parent 38172c2 commit 40f350f

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

chromadb/api/__init__.py

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
from chromadb.api.types import * # noqa: F401, F403
2+
from chromadb.execution.expression import ( # noqa: F401, F403
3+
Search,
4+
Key,
5+
K,
6+
SearchWhere,
7+
And,
8+
Or,
9+
Eq,
10+
Ne,
11+
Gt,
12+
Gte,
13+
Lt,
14+
Lte,
15+
In,
16+
Nin,
17+
Regex,
18+
NotRegex,
19+
Contains,
20+
NotContains,
21+
Limit,
22+
Select,
23+
Rank,
24+
Abs,
25+
Div,
26+
Exp,
27+
Log,
28+
Max,
29+
Min,
30+
Mul,
31+
Knn,
32+
Rrf,
33+
Sub,
34+
Sum,
35+
Val,
36+
)
37+
138
from abc import ABC, abstractmethod
239
from typing import Sequence, Optional, List, Dict, Any
340
from uuid import UUID
@@ -30,8 +67,8 @@
3067
SearchResult,
3168
DefaultEmbeddingFunction,
3269
)
70+
3371
from chromadb.auth import UserIdentity
34-
from chromadb.execution.expression.plan import Search
3572
from chromadb.config import Component, Settings
3673
from chromadb.types import Database, Tenant, Collection as CollectionModel
3774
from chromadb.api.models.Collection import Collection

chromadb/execution/expression/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,17 @@
4545
Search,
4646
)
4747

48+
# Backwards-compatible alias so existing imports keep working
49+
SearchWhere = Where
50+
4851
__all__ = [
4952
# Main search class
5053
"Search",
5154
# Field proxy
5255
"Key",
5356
"K",
5457
# Where expressions
58+
"SearchWhere",
5559
"Where",
5660
"And",
5761
"Or",

0 commit comments

Comments
 (0)