worqhat 3.8.0__py3-none-any.whl → 3.10.0__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.
- worqhat/_client.py +9 -10
- worqhat/_version.py +1 -1
- worqhat/resources/__init__.py +14 -14
- worqhat/resources/db/db.py +868 -24
- worqhat/resources/{client/storage.py → storage.py} +11 -11
- worqhat/types/__init__.py +20 -0
- worqhat/types/db_cluster_params.py +27 -0
- worqhat/types/db_cluster_response.py +44 -0
- worqhat/types/db_detect_anomalies_params.py +24 -0
- worqhat/types/db_detect_anomalies_response.py +50 -0
- worqhat/types/db_execute_query_params.py +9 -4
- worqhat/types/db_find_similar_params.py +31 -0
- worqhat/types/db_find_similar_response.py +30 -0
- worqhat/types/db_hybrid_search_params.py +32 -0
- worqhat/types/db_hybrid_search_response.py +48 -0
- worqhat/types/db_process_nl_query_params.py +0 -3
- worqhat/types/db_recommend_params.py +33 -0
- worqhat/types/db_recommend_response.py +36 -0
- worqhat/types/db_semantic_search_params.py +33 -0
- worqhat/types/db_semantic_search_response.py +36 -0
- worqhat/types/{client/storage_delete_file_by_id_response.py → storage_delete_file_by_id_response.py} +1 -1
- worqhat/types/{client/storage_retrieve_file_by_id_response.py → storage_retrieve_file_by_id_response.py} +1 -1
- worqhat/types/{client/storage_retrieve_file_by_path_response.py → storage_retrieve_file_by_path_response.py} +1 -1
- worqhat/types/{client/storage_upload_file_params.py → storage_upload_file_params.py} +1 -1
- worqhat/types/{client/storage_upload_file_response.py → storage_upload_file_response.py} +1 -1
- {worqhat-3.8.0.dist-info → worqhat-3.10.0.dist-info}/METADATA +1 -1
- {worqhat-3.8.0.dist-info → worqhat-3.10.0.dist-info}/RECORD +30 -21
- worqhat/resources/client/__init__.py +0 -33
- worqhat/resources/client/client.py +0 -102
- worqhat/types/client/__init__.py +0 -12
- /worqhat/types/{client/storage_retrieve_file_by_path_params.py → storage_retrieve_file_by_path_params.py} +0 -0
- {worqhat-3.8.0.dist-info → worqhat-3.10.0.dist-info}/WHEEL +0 -0
- {worqhat-3.8.0.dist-info → worqhat-3.10.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -6,22 +6,22 @@ from typing import Mapping, cast
|
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
9
|
+
from ..types import storage_upload_file_params, storage_retrieve_file_by_path_params
|
|
10
|
+
from .._types import Body, Omit, Query, Headers, NotGiven, FileTypes, omit, not_given
|
|
11
|
+
from .._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
|
|
12
|
+
from .._compat import cached_property
|
|
13
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
14
|
+
from .._response import (
|
|
14
15
|
to_raw_response_wrapper,
|
|
15
16
|
to_streamed_response_wrapper,
|
|
16
17
|
async_to_raw_response_wrapper,
|
|
17
18
|
async_to_streamed_response_wrapper,
|
|
18
19
|
)
|
|
19
|
-
from
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
from
|
|
24
|
-
from ...types.client.storage_retrieve_file_by_path_response import StorageRetrieveFileByPathResponse
|
|
20
|
+
from .._base_client import make_request_options
|
|
21
|
+
from ..types.storage_upload_file_response import StorageUploadFileResponse
|
|
22
|
+
from ..types.storage_delete_file_by_id_response import StorageDeleteFileByIDResponse
|
|
23
|
+
from ..types.storage_retrieve_file_by_id_response import StorageRetrieveFileByIDResponse
|
|
24
|
+
from ..types.storage_retrieve_file_by_path_response import StorageRetrieveFileByPathResponse
|
|
25
25
|
|
|
26
26
|
__all__ = ["StorageResource", "AsyncStorageResource"]
|
|
27
27
|
|
worqhat/types/__init__.py
CHANGED
|
@@ -2,23 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from .db_cluster_params import DBClusterParams as DBClusterParams
|
|
6
|
+
from .db_cluster_response import DBClusterResponse as DBClusterResponse
|
|
7
|
+
from .db_recommend_params import DBRecommendParams as DBRecommendParams
|
|
8
|
+
from .db_recommend_response import DBRecommendResponse as DBRecommendResponse
|
|
5
9
|
from .health_check_response import HealthCheckResponse as HealthCheckResponse
|
|
10
|
+
from .db_find_similar_params import DBFindSimilarParams as DBFindSimilarParams
|
|
6
11
|
from .db_execute_batch_params import DBExecuteBatchParams as DBExecuteBatchParams
|
|
7
12
|
from .db_execute_query_params import DBExecuteQueryParams as DBExecuteQueryParams
|
|
13
|
+
from .db_hybrid_search_params import DBHybridSearchParams as DBHybridSearchParams
|
|
8
14
|
from .db_insert_record_params import DBInsertRecordParams as DBInsertRecordParams
|
|
9
15
|
from .flow_get_metrics_params import FlowGetMetricsParams as FlowGetMetricsParams
|
|
10
16
|
from .db_delete_records_params import DBDeleteRecordsParams as DBDeleteRecordsParams
|
|
17
|
+
from .db_find_similar_response import DBFindSimilarResponse as DBFindSimilarResponse
|
|
11
18
|
from .db_update_records_params import DBUpdateRecordsParams as DBUpdateRecordsParams
|
|
12
19
|
from .get_server_info_response import GetServerInfoResponse as GetServerInfoResponse
|
|
13
20
|
from .db_execute_batch_response import DBExecuteBatchResponse as DBExecuteBatchResponse
|
|
14
21
|
from .db_execute_query_response import DBExecuteQueryResponse as DBExecuteQueryResponse
|
|
22
|
+
from .db_hybrid_search_response import DBHybridSearchResponse as DBHybridSearchResponse
|
|
15
23
|
from .db_insert_record_response import DBInsertRecordResponse as DBInsertRecordResponse
|
|
24
|
+
from .db_semantic_search_params import DBSemanticSearchParams as DBSemanticSearchParams
|
|
16
25
|
from .flow_get_metrics_response import FlowGetMetricsResponse as FlowGetMetricsResponse
|
|
17
26
|
from .db_delete_records_response import DBDeleteRecordsResponse as DBDeleteRecordsResponse
|
|
27
|
+
from .db_detect_anomalies_params import DBDetectAnomaliesParams as DBDetectAnomaliesParams
|
|
18
28
|
from .db_process_nl_query_params import DBProcessNlQueryParams as DBProcessNlQueryParams
|
|
19
29
|
from .db_update_records_response import DBUpdateRecordsResponse as DBUpdateRecordsResponse
|
|
30
|
+
from .storage_upload_file_params import StorageUploadFileParams as StorageUploadFileParams
|
|
31
|
+
from .db_semantic_search_response import DBSemanticSearchResponse as DBSemanticSearchResponse
|
|
32
|
+
from .db_detect_anomalies_response import DBDetectAnomaliesResponse as DBDetectAnomaliesResponse
|
|
20
33
|
from .db_process_nl_query_response import DBProcessNlQueryResponse as DBProcessNlQueryResponse
|
|
34
|
+
from .storage_upload_file_response import StorageUploadFileResponse as StorageUploadFileResponse
|
|
21
35
|
from .flow_trigger_with_file_params import FlowTriggerWithFileParams as FlowTriggerWithFileParams
|
|
22
36
|
from .flow_trigger_with_file_response import FlowTriggerWithFileResponse as FlowTriggerWithFileResponse
|
|
23
37
|
from .flow_trigger_with_payload_params import FlowTriggerWithPayloadParams as FlowTriggerWithPayloadParams
|
|
24
38
|
from .flow_trigger_with_payload_response import FlowTriggerWithPayloadResponse as FlowTriggerWithPayloadResponse
|
|
39
|
+
from .storage_delete_file_by_id_response import StorageDeleteFileByIDResponse as StorageDeleteFileByIDResponse
|
|
40
|
+
from .storage_retrieve_file_by_id_response import StorageRetrieveFileByIDResponse as StorageRetrieveFileByIDResponse
|
|
41
|
+
from .storage_retrieve_file_by_path_params import StorageRetrieveFileByPathParams as StorageRetrieveFileByPathParams
|
|
42
|
+
from .storage_retrieve_file_by_path_response import (
|
|
43
|
+
StorageRetrieveFileByPathResponse as StorageRetrieveFileByPathResponse,
|
|
44
|
+
)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["DBClusterParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DBClusterParams(TypedDict, total=False):
|
|
11
|
+
table: Required[str]
|
|
12
|
+
"""Table to cluster"""
|
|
13
|
+
|
|
14
|
+
environment: Literal["development", "staging", "production"]
|
|
15
|
+
"""Environment to cluster (development, staging, production)"""
|
|
16
|
+
|
|
17
|
+
generate_labels: bool
|
|
18
|
+
"""Whether to generate AI labels for clusters"""
|
|
19
|
+
|
|
20
|
+
max_clusters: float
|
|
21
|
+
"""Maximum clusters for auto-detection"""
|
|
22
|
+
|
|
23
|
+
min_clusters: float
|
|
24
|
+
"""Minimum clusters for auto-detection"""
|
|
25
|
+
|
|
26
|
+
num_clusters: float
|
|
27
|
+
"""Number of clusters (auto-detected if not provided)"""
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import Field as FieldInfo
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["DBClusterResponse", "Cluster"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Cluster(BaseModel):
|
|
13
|
+
id: Optional[float] = None
|
|
14
|
+
"""Cluster ID"""
|
|
15
|
+
|
|
16
|
+
centroid: Optional[List[float]] = None
|
|
17
|
+
"""Cluster center embedding (first 10 dimensions)"""
|
|
18
|
+
|
|
19
|
+
label: Optional[str] = None
|
|
20
|
+
"""AI-generated cluster description"""
|
|
21
|
+
|
|
22
|
+
sample_records: Optional[List[Dict[str, object]]] = None
|
|
23
|
+
"""3-5 representative records from cluster"""
|
|
24
|
+
|
|
25
|
+
size: Optional[float] = None
|
|
26
|
+
"""Number of records in cluster"""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class DBClusterResponse(BaseModel):
|
|
30
|
+
clusters: Optional[List[Cluster]] = None
|
|
31
|
+
|
|
32
|
+
execution_time: Optional[float] = FieldInfo(alias="executionTime", default=None)
|
|
33
|
+
"""Clustering execution time in milliseconds"""
|
|
34
|
+
|
|
35
|
+
iterations: Optional[float] = None
|
|
36
|
+
"""Number of K-means iterations performed"""
|
|
37
|
+
|
|
38
|
+
optimal_k: Optional[float] = None
|
|
39
|
+
"""Determined optimal cluster count"""
|
|
40
|
+
|
|
41
|
+
silhouette_score: Optional[float] = None
|
|
42
|
+
"""Clustering quality metric (0-1)"""
|
|
43
|
+
|
|
44
|
+
success: Optional[bool] = None
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["DBDetectAnomaliesParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DBDetectAnomaliesParams(TypedDict, total=False):
|
|
11
|
+
table: Required[str]
|
|
12
|
+
"""Table to analyze for anomalies"""
|
|
13
|
+
|
|
14
|
+
environment: Literal["development", "staging", "production"]
|
|
15
|
+
"""Environment to analyze (development, staging, production)"""
|
|
16
|
+
|
|
17
|
+
k: float
|
|
18
|
+
"""Number of nearest neighbors to consider"""
|
|
19
|
+
|
|
20
|
+
limit: float
|
|
21
|
+
"""Maximum number of anomalies to return"""
|
|
22
|
+
|
|
23
|
+
threshold: float
|
|
24
|
+
"""Minimum anomaly score threshold"""
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import Field as FieldInfo
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["DBDetectAnomaliesResponse", "Anomaly", "AnomalyNearestNeighbor", "Parameters"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AnomalyNearestNeighbor(BaseModel):
|
|
13
|
+
distance: Optional[float] = None
|
|
14
|
+
|
|
15
|
+
record: Optional[Dict[str, object]] = None
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Anomaly(BaseModel):
|
|
19
|
+
anomaly_score: Optional[float] = None
|
|
20
|
+
"""Anomaly score (0-1, higher = more unusual)"""
|
|
21
|
+
|
|
22
|
+
avg_distance: Optional[float] = None
|
|
23
|
+
"""Average distance to K nearest neighbors"""
|
|
24
|
+
|
|
25
|
+
nearest_neighbors: Optional[List[AnomalyNearestNeighbor]] = None
|
|
26
|
+
|
|
27
|
+
record: Optional[Dict[str, object]] = None
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class Parameters(BaseModel):
|
|
31
|
+
k: Optional[float] = None
|
|
32
|
+
|
|
33
|
+
threshold: Optional[float] = None
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class DBDetectAnomaliesResponse(BaseModel):
|
|
37
|
+
anomalies: Optional[List[Anomaly]] = None
|
|
38
|
+
|
|
39
|
+
anomaly_count: Optional[float] = None
|
|
40
|
+
"""Number of anomalies detected"""
|
|
41
|
+
|
|
42
|
+
execution_time: Optional[float] = FieldInfo(alias="executionTime", default=None)
|
|
43
|
+
"""Analysis execution time in milliseconds"""
|
|
44
|
+
|
|
45
|
+
parameters: Optional[Parameters] = None
|
|
46
|
+
|
|
47
|
+
success: Optional[bool] = None
|
|
48
|
+
|
|
49
|
+
total_records: Optional[float] = None
|
|
50
|
+
"""Total number of records analyzed"""
|
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict
|
|
5
|
+
from typing import Dict, Union
|
|
6
6
|
from typing_extensions import Literal, Required, TypedDict
|
|
7
7
|
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
|
|
8
10
|
__all__ = ["DBExecuteQueryParams"]
|
|
9
11
|
|
|
10
12
|
|
|
11
13
|
class DBExecuteQueryParams(TypedDict, total=False):
|
|
12
14
|
query: Required[str]
|
|
13
|
-
"""SQL query to execute
|
|
15
|
+
"""SQL query to execute.
|
|
16
|
+
|
|
17
|
+
Supports both named parameters ({param}) and positional parameters ($1, $2)
|
|
18
|
+
"""
|
|
14
19
|
|
|
15
20
|
environment: Literal["development", "staging", "production"]
|
|
16
21
|
"""Environment to query (development, staging, production)"""
|
|
17
22
|
|
|
18
|
-
params: Dict[str, object]
|
|
19
|
-
"""
|
|
23
|
+
params: Union[Dict[str, object], SequenceNotStr[Union[str, float, bool]]]
|
|
24
|
+
"""Named parameters for queries with {param} syntax"""
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["DBFindSimilarParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class DBFindSimilarParams(TypedDict, total=False):
|
|
12
|
+
record_id: Required[Union[str, float]]
|
|
13
|
+
"""ID of the source record"""
|
|
14
|
+
|
|
15
|
+
table: Required[str]
|
|
16
|
+
"""Table containing the source record"""
|
|
17
|
+
|
|
18
|
+
environment: Literal["development", "staging", "production"]
|
|
19
|
+
"""Environment to search in (development, staging, production)"""
|
|
20
|
+
|
|
21
|
+
exclude_self: bool
|
|
22
|
+
"""Whether to exclude the source record from results"""
|
|
23
|
+
|
|
24
|
+
limit: float
|
|
25
|
+
"""Maximum number of similar records to return"""
|
|
26
|
+
|
|
27
|
+
target_table: str
|
|
28
|
+
"""Different table to search in (optional)"""
|
|
29
|
+
|
|
30
|
+
threshold: float
|
|
31
|
+
"""Minimum similarity score threshold"""
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import Field as FieldInfo
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["DBFindSimilarResponse", "SimilarRecord"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class SimilarRecord(BaseModel):
|
|
13
|
+
record: Optional[Dict[str, object]] = None
|
|
14
|
+
|
|
15
|
+
similarity: Optional[float] = None
|
|
16
|
+
"""Similarity score (0-1)"""
|
|
17
|
+
|
|
18
|
+
table: Optional[str] = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class DBFindSimilarResponse(BaseModel):
|
|
22
|
+
execution_time: Optional[float] = FieldInfo(alias="executionTime", default=None)
|
|
23
|
+
"""Search execution time in milliseconds"""
|
|
24
|
+
|
|
25
|
+
similar_records: Optional[List[SimilarRecord]] = None
|
|
26
|
+
|
|
27
|
+
source_record: Optional[Dict[str, object]] = None
|
|
28
|
+
"""The original record used for similarity search"""
|
|
29
|
+
|
|
30
|
+
success: Optional[bool] = None
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
6
|
+
|
|
7
|
+
from .._types import SequenceNotStr
|
|
8
|
+
|
|
9
|
+
__all__ = ["DBHybridSearchParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DBHybridSearchParams(TypedDict, total=False):
|
|
13
|
+
query: Required[str]
|
|
14
|
+
"""Search query combining natural language and keywords"""
|
|
15
|
+
|
|
16
|
+
table: Required[str]
|
|
17
|
+
"""Table to search in"""
|
|
18
|
+
|
|
19
|
+
environment: Literal["development", "staging", "production"]
|
|
20
|
+
"""Environment to search in (development, staging, production)"""
|
|
21
|
+
|
|
22
|
+
keyword_weight: float
|
|
23
|
+
"""Weight for keyword matching score"""
|
|
24
|
+
|
|
25
|
+
limit: float
|
|
26
|
+
"""Maximum number of results to return"""
|
|
27
|
+
|
|
28
|
+
semantic_weight: float
|
|
29
|
+
"""Weight for semantic similarity score"""
|
|
30
|
+
|
|
31
|
+
text_columns: SequenceNotStr[str]
|
|
32
|
+
"""Columns to include in keyword search"""
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import Field as FieldInfo
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["DBHybridSearchResponse", "Result", "Result_Meta", "Result_MetaWeights"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Result_MetaWeights(BaseModel):
|
|
13
|
+
keyword: Optional[float] = None
|
|
14
|
+
|
|
15
|
+
semantic: Optional[float] = None
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Result_Meta(BaseModel):
|
|
19
|
+
search_type: Optional[str] = None
|
|
20
|
+
|
|
21
|
+
weights: Optional[Result_MetaWeights] = None
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Result(BaseModel):
|
|
25
|
+
api_meta: Optional[Result_Meta] = FieldInfo(alias="_meta", default=None)
|
|
26
|
+
|
|
27
|
+
combined_score: Optional[float] = None
|
|
28
|
+
"""Combined semantic + keyword score"""
|
|
29
|
+
|
|
30
|
+
keyword_score: Optional[float] = None
|
|
31
|
+
"""Keyword matching score"""
|
|
32
|
+
|
|
33
|
+
record: Optional[Dict[str, object]] = None
|
|
34
|
+
|
|
35
|
+
semantic_score: Optional[float] = None
|
|
36
|
+
"""Semantic similarity score"""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class DBHybridSearchResponse(BaseModel):
|
|
40
|
+
execution_time: Optional[float] = FieldInfo(alias="executionTime", default=None)
|
|
41
|
+
"""Search execution time in milliseconds"""
|
|
42
|
+
|
|
43
|
+
query_embedding_preview: Optional[List[float]] = None
|
|
44
|
+
"""First 5 dimensions of the query embedding"""
|
|
45
|
+
|
|
46
|
+
results: Optional[List[Result]] = None
|
|
47
|
+
|
|
48
|
+
success: Optional[bool] = None
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
|
|
10
|
+
__all__ = ["DBRecommendParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class DBRecommendParams(TypedDict, total=False):
|
|
14
|
+
table: Required[str]
|
|
15
|
+
"""Table to generate recommendations from"""
|
|
16
|
+
|
|
17
|
+
environment: Literal["development", "staging", "production"]
|
|
18
|
+
"""Environment to search in (development, staging, production)"""
|
|
19
|
+
|
|
20
|
+
exclude_ids: SequenceNotStr[str]
|
|
21
|
+
"""Record IDs to exclude from recommendations"""
|
|
22
|
+
|
|
23
|
+
limit: float
|
|
24
|
+
"""Maximum number of recommendations to return"""
|
|
25
|
+
|
|
26
|
+
record_id: Union[str, float]
|
|
27
|
+
"""Source item ID for item-to-item recommendations"""
|
|
28
|
+
|
|
29
|
+
strategy: Literal["similar", "diverse", "popular"]
|
|
30
|
+
"""Recommendation strategy to use"""
|
|
31
|
+
|
|
32
|
+
user_history: SequenceNotStr[str]
|
|
33
|
+
"""Array of record IDs the user has interacted with"""
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import Field as FieldInfo
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["DBRecommendResponse", "Recommendation", "Recommendation_Meta"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Recommendation_Meta(BaseModel):
|
|
13
|
+
source: Optional[str] = None
|
|
14
|
+
|
|
15
|
+
strategy: Optional[str] = None
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Recommendation(BaseModel):
|
|
19
|
+
api_meta: Optional[Recommendation_Meta] = FieldInfo(alias="_meta", default=None)
|
|
20
|
+
|
|
21
|
+
record: Optional[Dict[str, object]] = None
|
|
22
|
+
|
|
23
|
+
similarity: Optional[float] = None
|
|
24
|
+
"""Similarity score (0-1)"""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class DBRecommendResponse(BaseModel):
|
|
28
|
+
execution_time: Optional[float] = FieldInfo(alias="executionTime", default=None)
|
|
29
|
+
"""Recommendation generation time in milliseconds"""
|
|
30
|
+
|
|
31
|
+
recommendations: Optional[List[Recommendation]] = None
|
|
32
|
+
|
|
33
|
+
strategy: Optional[str] = None
|
|
34
|
+
"""Strategy used for recommendations"""
|
|
35
|
+
|
|
36
|
+
success: Optional[bool] = None
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
|
|
10
|
+
__all__ = ["DBSemanticSearchParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class DBSemanticSearchParams(TypedDict, total=False):
|
|
14
|
+
query: Required[str]
|
|
15
|
+
"""Natural language search query"""
|
|
16
|
+
|
|
17
|
+
environment: Literal["development", "staging", "production"]
|
|
18
|
+
"""Environment to search in (development, staging, production)"""
|
|
19
|
+
|
|
20
|
+
filters: Dict[str, object]
|
|
21
|
+
"""Additional WHERE conditions to apply"""
|
|
22
|
+
|
|
23
|
+
limit: float
|
|
24
|
+
"""Maximum number of results to return"""
|
|
25
|
+
|
|
26
|
+
table: str
|
|
27
|
+
"""Single table to search in (optional if tables is provided)"""
|
|
28
|
+
|
|
29
|
+
tables: SequenceNotStr[str]
|
|
30
|
+
"""Multiple tables to search across (optional if table is provided)"""
|
|
31
|
+
|
|
32
|
+
threshold: float
|
|
33
|
+
"""Minimum similarity score threshold"""
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import Field as FieldInfo
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["DBSemanticSearchResponse", "Result", "Result_Meta"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Result_Meta(BaseModel):
|
|
13
|
+
matched_fields: Optional[List[str]] = None
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Result(BaseModel):
|
|
17
|
+
api_meta: Optional[Result_Meta] = FieldInfo(alias="_meta", default=None)
|
|
18
|
+
|
|
19
|
+
record: Optional[Dict[str, object]] = None
|
|
20
|
+
|
|
21
|
+
similarity: Optional[float] = None
|
|
22
|
+
"""Similarity score (0-1)"""
|
|
23
|
+
|
|
24
|
+
table: Optional[str] = None
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class DBSemanticSearchResponse(BaseModel):
|
|
28
|
+
execution_time: Optional[float] = FieldInfo(alias="executionTime", default=None)
|
|
29
|
+
"""Search execution time in milliseconds"""
|
|
30
|
+
|
|
31
|
+
query_embedding_preview: Optional[List[float]] = None
|
|
32
|
+
"""First 5 dimensions of the query embedding"""
|
|
33
|
+
|
|
34
|
+
results: Optional[List[Result]] = None
|
|
35
|
+
|
|
36
|
+
success: Optional[bool] = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: worqhat
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.10.0
|
|
4
4
|
Summary: The official Python library for the worqhat API
|
|
5
5
|
Project-URL: Homepage, https://github.com/WorqHat/worqhat-python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/WorqHat/worqhat-python-sdk
|