worqhat 3.10.0__py3-none-any.whl → 4.2.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.
Files changed (92) hide show
  1. worqhat/__init__.py +8 -89
  2. worqhat/client.py +62 -0
  3. worqhat/exceptions.py +43 -0
  4. worqhat/http_client.py +171 -0
  5. worqhat/py.typed +1 -0
  6. worqhat/resources/__init__.py +5 -59
  7. worqhat/resources/database.py +293 -0
  8. worqhat/resources/flows.py +61 -409
  9. worqhat/resources/storage.py +41 -431
  10. worqhat-4.2.0.dist-info/METADATA +538 -0
  11. worqhat-4.2.0.dist-info/RECORD +13 -0
  12. {worqhat-3.10.0.dist-info → worqhat-4.2.0.dist-info}/WHEEL +2 -1
  13. worqhat-4.2.0.dist-info/top_level.txt +1 -0
  14. worqhat/_base_client.py +0 -1995
  15. worqhat/_client.py +0 -484
  16. worqhat/_compat.py +0 -219
  17. worqhat/_constants.py +0 -14
  18. worqhat/_exceptions.py +0 -108
  19. worqhat/_files.py +0 -123
  20. worqhat/_models.py +0 -835
  21. worqhat/_qs.py +0 -150
  22. worqhat/_resource.py +0 -43
  23. worqhat/_response.py +0 -830
  24. worqhat/_streaming.py +0 -333
  25. worqhat/_types.py +0 -260
  26. worqhat/_utils/__init__.py +0 -64
  27. worqhat/_utils/_compat.py +0 -45
  28. worqhat/_utils/_datetime_parse.py +0 -136
  29. worqhat/_utils/_logs.py +0 -25
  30. worqhat/_utils/_proxy.py +0 -65
  31. worqhat/_utils/_reflection.py +0 -42
  32. worqhat/_utils/_resources_proxy.py +0 -24
  33. worqhat/_utils/_streams.py +0 -12
  34. worqhat/_utils/_sync.py +0 -86
  35. worqhat/_utils/_transform.py +0 -457
  36. worqhat/_utils/_typing.py +0 -156
  37. worqhat/_utils/_utils.py +0 -421
  38. worqhat/_version.py +0 -4
  39. worqhat/lib/.keep +0 -4
  40. worqhat/resources/db/__init__.py +0 -33
  41. worqhat/resources/db/db.py +0 -1650
  42. worqhat/resources/db/tables.py +0 -389
  43. worqhat/resources/health.py +0 -143
  44. worqhat/types/__init__.py +0 -44
  45. worqhat/types/db/__init__.py +0 -10
  46. worqhat/types/db/table_get_row_count_params.py +0 -12
  47. worqhat/types/db/table_get_row_count_response.py +0 -15
  48. worqhat/types/db/table_list_params.py +0 -15
  49. worqhat/types/db/table_list_response.py +0 -26
  50. worqhat/types/db/table_retrieve_schema_params.py +0 -12
  51. worqhat/types/db/table_retrieve_schema_response.py +0 -29
  52. worqhat/types/db_cluster_params.py +0 -27
  53. worqhat/types/db_cluster_response.py +0 -44
  54. worqhat/types/db_delete_records_params.py +0 -19
  55. worqhat/types/db_delete_records_response.py +0 -18
  56. worqhat/types/db_detect_anomalies_params.py +0 -24
  57. worqhat/types/db_detect_anomalies_response.py +0 -50
  58. worqhat/types/db_execute_batch_params.py +0 -36
  59. worqhat/types/db_execute_batch_response.py +0 -27
  60. worqhat/types/db_execute_query_params.py +0 -24
  61. worqhat/types/db_execute_query_response.py +0 -21
  62. worqhat/types/db_find_similar_params.py +0 -31
  63. worqhat/types/db_find_similar_response.py +0 -30
  64. worqhat/types/db_hybrid_search_params.py +0 -32
  65. worqhat/types/db_hybrid_search_response.py +0 -48
  66. worqhat/types/db_insert_record_params.py +0 -19
  67. worqhat/types/db_insert_record_response.py +0 -15
  68. worqhat/types/db_process_nl_query_params.py +0 -19
  69. worqhat/types/db_process_nl_query_response.py +0 -18
  70. worqhat/types/db_recommend_params.py +0 -33
  71. worqhat/types/db_recommend_response.py +0 -36
  72. worqhat/types/db_semantic_search_params.py +0 -33
  73. worqhat/types/db_semantic_search_response.py +0 -36
  74. worqhat/types/db_update_records_params.py +0 -22
  75. worqhat/types/db_update_records_response.py +0 -18
  76. worqhat/types/flow_get_metrics_params.py +0 -25
  77. worqhat/types/flow_get_metrics_response.py +0 -55
  78. worqhat/types/flow_trigger_with_file_params.py +0 -17
  79. worqhat/types/flow_trigger_with_file_response.py +0 -18
  80. worqhat/types/flow_trigger_with_payload_params.py +0 -13
  81. worqhat/types/flow_trigger_with_payload_response.py +0 -20
  82. worqhat/types/get_server_info_response.py +0 -15
  83. worqhat/types/health_check_response.py +0 -33
  84. worqhat/types/storage_delete_file_by_id_response.py +0 -18
  85. worqhat/types/storage_retrieve_file_by_id_response.py +0 -33
  86. worqhat/types/storage_retrieve_file_by_path_params.py +0 -12
  87. worqhat/types/storage_retrieve_file_by_path_response.py +0 -33
  88. worqhat/types/storage_upload_file_params.py +0 -17
  89. worqhat/types/storage_upload_file_response.py +0 -33
  90. worqhat-3.10.0.dist-info/METADATA +0 -432
  91. worqhat-3.10.0.dist-info/RECORD +0 -85
  92. worqhat-3.10.0.dist-info/licenses/LICENSE +0 -201
@@ -1,29 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from typing import List, Optional
4
-
5
- from pydantic import Field as FieldInfo
6
-
7
- from ..._models import BaseModel
8
-
9
- __all__ = ["TableRetrieveSchemaResponse", "Column"]
10
-
11
-
12
- class Column(BaseModel):
13
- default: Optional[str] = None
14
-
15
- is_primary_key: Optional[bool] = FieldInfo(alias="isPrimaryKey", default=None)
16
-
17
- name: Optional[str] = None
18
-
19
- nullable: Optional[bool] = None
20
-
21
- type: Optional[str] = None
22
-
23
-
24
- class TableRetrieveSchemaResponse(BaseModel):
25
- columns: Optional[List[Column]] = None
26
-
27
- success: Optional[bool] = None
28
-
29
- table: Optional[str] = None
@@ -1,27 +0,0 @@
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)"""
@@ -1,44 +0,0 @@
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
@@ -1,19 +0,0 @@
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
- __all__ = ["DBDeleteRecordsParams"]
9
-
10
-
11
- class DBDeleteRecordsParams(TypedDict, total=False):
12
- table: Required[str]
13
- """Table name to delete from"""
14
-
15
- where: Required[Dict[str, object]]
16
- """Where conditions"""
17
-
18
- environment: Literal["development", "staging", "production"]
19
- """Environment to delete from (development, staging, production)"""
@@ -1,18 +0,0 @@
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 .._models import BaseModel
6
-
7
- __all__ = ["DBDeleteRecordsResponse"]
8
-
9
-
10
- class DBDeleteRecordsResponse(BaseModel):
11
- count: Optional[int] = None
12
- """Number of records deleted"""
13
-
14
- data: Optional[List[Dict[str, object]]] = None
15
-
16
- message: Optional[str] = None
17
-
18
- success: Optional[bool] = None
@@ -1,24 +0,0 @@
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"""
@@ -1,50 +0,0 @@
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"""
@@ -1,36 +0,0 @@
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, Iterable
6
- from typing_extensions import Literal, Required, TypedDict
7
-
8
- __all__ = ["DBExecuteBatchParams", "Operation"]
9
-
10
-
11
- class DBExecuteBatchParams(TypedDict, total=False):
12
- operations: Required[Iterable[Operation]]
13
- """Array of database operations to execute"""
14
-
15
- environment: Literal["development", "staging", "production"]
16
- """Environment to execute operations in"""
17
-
18
- transactional: bool
19
- """Whether to execute all operations in a single transaction"""
20
-
21
-
22
- class Operation(TypedDict, total=False):
23
- type: Required[Literal["query", "insert", "update", "delete"]]
24
- """Type of operation"""
25
-
26
- data: Dict[str, object]
27
- """Data to insert or update"""
28
-
29
- query: str
30
- """SQL query (required for query type)"""
31
-
32
- table: str
33
- """Table name (required for insert, update, delete)"""
34
-
35
- where: Dict[str, object]
36
- """Where conditions for update or delete"""
@@ -1,27 +0,0 @@
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__ = ["DBExecuteBatchResponse", "Result"]
10
-
11
-
12
- class Result(BaseModel):
13
- data: Optional[Dict[str, object]] = None
14
-
15
- operation: Optional[str] = None
16
-
17
- success: Optional[bool] = None
18
-
19
-
20
- class DBExecuteBatchResponse(BaseModel):
21
- executed_count: Optional[int] = FieldInfo(alias="executedCount", default=None)
22
- """Number of operations executed"""
23
-
24
- results: Optional[List[Result]] = None
25
- """Results from each operation"""
26
-
27
- success: Optional[bool] = None
@@ -1,24 +0,0 @@
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, Union
6
- from typing_extensions import Literal, Required, TypedDict
7
-
8
- from .._types import SequenceNotStr
9
-
10
- __all__ = ["DBExecuteQueryParams"]
11
-
12
-
13
- class DBExecuteQueryParams(TypedDict, total=False):
14
- query: Required[str]
15
- """SQL query to execute.
16
-
17
- Supports both named parameters ({param}) and positional parameters ($1, $2)
18
- """
19
-
20
- environment: Literal["development", "staging", "production"]
21
- """Environment to query (development, staging, production)"""
22
-
23
- params: Union[Dict[str, object], SequenceNotStr[Union[str, float, bool]]]
24
- """Named parameters for queries with {param} syntax"""
@@ -1,21 +0,0 @@
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__ = ["DBExecuteQueryResponse"]
10
-
11
-
12
- class DBExecuteQueryResponse(BaseModel):
13
- data: Optional[List[Dict[str, object]]] = None
14
-
15
- execution_time: Optional[int] = FieldInfo(alias="executionTime", default=None)
16
- """Query execution time in milliseconds"""
17
-
18
- query: Optional[str] = None
19
- """The executed SQL query"""
20
-
21
- success: Optional[bool] = None
@@ -1,31 +0,0 @@
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"""
@@ -1,30 +0,0 @@
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
@@ -1,32 +0,0 @@
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"""
@@ -1,48 +0,0 @@
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
@@ -1,19 +0,0 @@
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
- __all__ = ["DBInsertRecordParams"]
9
-
10
-
11
- class DBInsertRecordParams(TypedDict, total=False):
12
- data: Required[Dict[str, object]]
13
- """Data to insert"""
14
-
15
- table: Required[str]
16
- """Table name to insert into"""
17
-
18
- environment: Literal["development", "staging", "production"]
19
- """Environment to insert into (development, staging, production)"""
@@ -1,15 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from typing import Dict, Optional
4
-
5
- from .._models import BaseModel
6
-
7
- __all__ = ["DBInsertRecordResponse"]
8
-
9
-
10
- class DBInsertRecordResponse(BaseModel):
11
- data: Optional[Dict[str, object]] = None
12
-
13
- message: Optional[str] = None
14
-
15
- success: Optional[bool] = None
@@ -1,19 +0,0 @@
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
- __all__ = ["DBProcessNlQueryParams"]
9
-
10
-
11
- class DBProcessNlQueryParams(TypedDict, total=False):
12
- question: Required[str]
13
- """Natural language question"""
14
-
15
- context: Dict[str, object]
16
- """Optional context for the query"""
17
-
18
- environment: Literal["development", "staging", "production"]
19
- """Environment to query (development, staging, production)"""
@@ -1,18 +0,0 @@
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 .._models import BaseModel
6
-
7
- __all__ = ["DBProcessNlQueryResponse"]
8
-
9
-
10
- class DBProcessNlQueryResponse(BaseModel):
11
- data: Optional[List[Dict[str, object]]] = None
12
-
13
- message: Optional[str] = None
14
-
15
- sql: Optional[str] = None
16
- """The generated SQL query"""
17
-
18
- success: Optional[bool] = None
@@ -1,33 +0,0 @@
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"""
@@ -1,36 +0,0 @@
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
@@ -1,33 +0,0 @@
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"""