orchestrator-core 4.6.2__py3-none-any.whl → 4.6.3rc1__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.
- orchestrator/__init__.py +1 -1
- orchestrator/api/api_v1/endpoints/search.py +44 -34
- orchestrator/{search/retrieval/utils.py → cli/search/display.py} +4 -29
- orchestrator/cli/search/search_explore.py +22 -24
- orchestrator/cli/search/speedtest.py +11 -9
- orchestrator/db/models.py +6 -6
- orchestrator/log_config.py +2 -0
- orchestrator/schemas/search.py +1 -1
- orchestrator/schemas/search_requests.py +59 -0
- orchestrator/search/agent/handlers.py +129 -0
- orchestrator/search/agent/prompts.py +54 -33
- orchestrator/search/agent/state.py +9 -24
- orchestrator/search/agent/tools.py +223 -144
- orchestrator/search/agent/validation.py +80 -0
- orchestrator/search/{schemas → aggregations}/__init__.py +20 -0
- orchestrator/search/aggregations/base.py +201 -0
- orchestrator/search/core/types.py +3 -2
- orchestrator/search/filters/__init__.py +4 -0
- orchestrator/search/filters/definitions.py +22 -1
- orchestrator/search/filters/numeric_filter.py +3 -3
- orchestrator/search/llm_migration.py +2 -1
- orchestrator/search/query/__init__.py +90 -0
- orchestrator/search/query/builder.py +285 -0
- orchestrator/search/query/engine.py +162 -0
- orchestrator/search/{retrieval → query}/exceptions.py +38 -7
- orchestrator/search/query/mixins.py +95 -0
- orchestrator/search/query/queries.py +129 -0
- orchestrator/search/query/results.py +252 -0
- orchestrator/search/{retrieval/query_state.py → query/state.py} +31 -11
- orchestrator/search/{retrieval → query}/validation.py +58 -1
- orchestrator/search/retrieval/__init__.py +0 -5
- orchestrator/search/retrieval/pagination.py +7 -8
- orchestrator/search/retrieval/retrievers/base.py +9 -9
- {orchestrator_core-4.6.2.dist-info → orchestrator_core-4.6.3rc1.dist-info}/METADATA +6 -6
- {orchestrator_core-4.6.2.dist-info → orchestrator_core-4.6.3rc1.dist-info}/RECORD +38 -32
- orchestrator/search/retrieval/builder.py +0 -127
- orchestrator/search/retrieval/engine.py +0 -197
- orchestrator/search/schemas/parameters.py +0 -133
- orchestrator/search/schemas/results.py +0 -80
- /orchestrator/search/{export.py → query/export.py} +0 -0
- {orchestrator_core-4.6.2.dist-info → orchestrator_core-4.6.3rc1.dist-info}/WHEEL +0 -0
- {orchestrator_core-4.6.2.dist-info → orchestrator_core-4.6.3rc1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# Copyright 2019-2025 SURF, GÉANT.
|
|
2
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
# you may not use this file except in compliance with the License.
|
|
4
|
-
# You may obtain a copy of the License at
|
|
5
|
-
#
|
|
6
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
#
|
|
8
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
9
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
-
# See the License for the specific language governing permissions and
|
|
12
|
-
# limitations under the License.
|
|
13
|
-
|
|
14
|
-
from typing import Literal
|
|
15
|
-
|
|
16
|
-
from pydantic import BaseModel, ConfigDict
|
|
17
|
-
|
|
18
|
-
from orchestrator.search.core.types import EntityType, FilterOp, SearchMetadata, UIType
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class MatchingField(BaseModel):
|
|
22
|
-
"""Contains the field that contributed most to the (fuzzy) search result."""
|
|
23
|
-
|
|
24
|
-
text: str
|
|
25
|
-
path: str
|
|
26
|
-
highlight_indices: list[tuple[int, int]] | None = None
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class SearchResult(BaseModel):
|
|
30
|
-
"""Represents a single search result item."""
|
|
31
|
-
|
|
32
|
-
entity_id: str
|
|
33
|
-
entity_type: EntityType
|
|
34
|
-
entity_title: str
|
|
35
|
-
score: float
|
|
36
|
-
perfect_match: int = 0
|
|
37
|
-
matching_field: MatchingField | None = None
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
class SearchResponse(BaseModel):
|
|
41
|
-
"""Response containing search results and metadata."""
|
|
42
|
-
|
|
43
|
-
results: list[SearchResult]
|
|
44
|
-
metadata: SearchMetadata
|
|
45
|
-
query_embedding: list[float] | None = None
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
class ValueSchema(BaseModel):
|
|
49
|
-
kind: UIType | Literal["none", "object"] = UIType.STRING
|
|
50
|
-
fields: dict[str, "ValueSchema"] | None = None
|
|
51
|
-
|
|
52
|
-
model_config = ConfigDict(extra="forbid")
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
class LeafInfo(BaseModel):
|
|
56
|
-
name: str
|
|
57
|
-
ui_types: list[UIType]
|
|
58
|
-
paths: list[str]
|
|
59
|
-
|
|
60
|
-
model_config = ConfigDict(
|
|
61
|
-
extra="forbid",
|
|
62
|
-
use_enum_values=True,
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
class ComponentInfo(BaseModel):
|
|
67
|
-
name: str
|
|
68
|
-
ui_types: list[UIType]
|
|
69
|
-
|
|
70
|
-
model_config = ConfigDict(
|
|
71
|
-
extra="forbid",
|
|
72
|
-
use_enum_values=True,
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
class TypeDefinition(BaseModel):
|
|
77
|
-
operators: list[FilterOp]
|
|
78
|
-
value_schema: dict[FilterOp, ValueSchema]
|
|
79
|
-
|
|
80
|
-
model_config = ConfigDict(use_enum_values=True)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|