projectdavid-common 0.17.2__py3-none-any.whl → 0.17.3__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.
@@ -1,13 +1,9 @@
1
- from enum import Enum
2
1
  from typing import Any, Dict, List, Optional
3
2
 
4
- from pydantic import BaseModel, ConfigDict, Field, HttpUrl, field_validator
3
+ from pydantic import BaseModel, ConfigDict, Field, HttpUrl
5
4
 
6
- from projectdavid_common.constants.tools import PLATFORM_TOOLS
7
5
  from projectdavid_common.schemas.vectors_schema import VectorStoreRead
8
6
 
9
- ToolName = Enum("ToolName", {name.upper(): name for name in PLATFORM_TOOLS})
10
-
11
7
 
12
8
  # ────────────────────────────────────────────────────────────────────────────
13
9
  # ASSISTANT • CREATE
@@ -26,13 +22,6 @@ class AssistantCreate(BaseModel):
26
22
  tools: Optional[List[dict]] = Field(
27
23
  None, description="OpenAI-style tool specs (name, parameters …)"
28
24
  )
29
- platform_tools: Optional[List[Dict[str, Any]]] = Field(
30
- None,
31
- description=(
32
- "Inline platform tools. "
33
- "Example: [{'type': 'file_search', 'vector_store_ids': ['vs_123']}]"
34
- ),
35
- )
36
25
  tool_resources: Optional[Dict[str, Dict[str, Any]]] = Field(
37
26
  None,
38
27
  description=(
@@ -63,19 +52,6 @@ class AssistantCreate(BaseModel):
63
52
  examples=["whsec_ReplaceWithARealSecureSecret123"],
64
53
  )
65
54
 
66
- @field_validator("platform_tools")
67
- def validate_platform_tools(cls, v):
68
- if v is None:
69
- return v
70
- for tool in v:
71
- if "type" not in tool:
72
- raise ValueError("Platform tool must have a 'type' field")
73
- if tool["type"] not in [t.value for t in ToolName]:
74
- raise ValueError(
75
- f"Invalid tool type: {tool['type']}. Allowed types are {[t.value for t in ToolName]}"
76
- )
77
- return v
78
-
79
55
  model_config = ConfigDict(
80
56
  json_schema_extra={
81
57
  "example": {
@@ -83,7 +59,6 @@ class AssistantCreate(BaseModel):
83
59
  "description": "Assistant that can search company docs",
84
60
  "model": "gpt-4o-mini",
85
61
  "instructions": "Use tools when relevant.",
86
- "platform_tools": [{"type": "file_search", "vector_store_ids": ["vs_docs"]}],
87
62
  "tool_resources": {"file_search": {"vector_store_ids": ["vs_docs"]}},
88
63
  "top_p": 0.9,
89
64
  "temperature": 0.7,
@@ -106,7 +81,6 @@ class AssistantRead(BaseModel):
106
81
  instructions: Optional[str] = None
107
82
 
108
83
  tools: Optional[List[dict]] = None
109
- platform_tools: Optional[List[Dict[str, Any]]] = None
110
84
  tool_resources: Optional[Dict[str, Dict[str, Any]]] = None
111
85
 
112
86
  meta_data: Optional[Dict[str, Any]] = None
@@ -117,19 +91,6 @@ class AssistantRead(BaseModel):
117
91
  vector_stores: List[VectorStoreRead] = Field(default_factory=list)
118
92
  webhook_url: Optional[HttpUrl] = None
119
93
 
120
- @field_validator("platform_tools")
121
- def validate_platform_tools(cls, v):
122
- if v is None:
123
- return v
124
- for tool in v:
125
- if "type" not in tool:
126
- raise ValueError("Platform tool must have a 'type' field")
127
- if tool["type"] not in [t.value for t in ToolName]:
128
- raise ValueError(
129
- f"Invalid tool type: {tool['type']}. Allowed types are {[t.value for t in ToolName]}"
130
- )
131
- return v
132
-
133
94
  model_config = ConfigDict(
134
95
  from_attributes=True,
135
96
  json_schema_extra={
@@ -140,7 +101,6 @@ class AssistantRead(BaseModel):
140
101
  "created_at": 1710000000,
141
102
  "name": "Search Assistant",
142
103
  "model": "gpt-4o-mini",
143
- "platform_tools": [{"type": "file_search", "vector_store_ids": ["vs_docs"]}],
144
104
  "tool_resources": {"file_search": {"vector_store_ids": ["vs_docs"]}},
145
105
  "top_p": 1.0,
146
106
  "temperature": 0.7,
@@ -160,7 +120,6 @@ class AssistantUpdate(BaseModel):
160
120
  instructions: Optional[str] = None
161
121
 
162
122
  tools: Optional[List[Any]] = None
163
- platform_tools: Optional[List[Dict[str, Any]]] = None
164
123
  tool_resources: Optional[Dict[str, Dict[str, Any]]] = None
165
124
 
166
125
  meta_data: Optional[Dict[str, Any]] = None
@@ -171,24 +130,10 @@ class AssistantUpdate(BaseModel):
171
130
  webhook_url: Optional[HttpUrl] = None
172
131
  webhook_secret: Optional[str] = Field(None, min_length=16)
173
132
 
174
- @field_validator("platform_tools")
175
- def validate_platform_tools(cls, v):
176
- if v is None:
177
- return v
178
- for tool in v:
179
- if "type" not in tool:
180
- raise ValueError("Platform tool must have a 'type' field")
181
- if tool["type"] not in [t.value for t in ToolName]:
182
- raise ValueError(
183
- f"Invalid tool type: {tool['type']}. Allowed types are {[t.value for t in ToolName]}"
184
- )
185
- return v
186
-
187
133
  model_config = ConfigDict(
188
134
  json_schema_extra={
189
135
  "example": {
190
136
  "name": "Updated name",
191
- "platform_tools": [{"type": "calculator"}],
192
137
  "tool_resources": {"code_interpreter": {"file_ids": ["f_new_readme"]}},
193
138
  }
194
139
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: projectdavid_common
3
- Version: 0.17.2
3
+ Version: 0.17.3
4
4
  Summary: Common shared custom packages
5
5
  Author-email: "Francis N." <francis.neequaye@projectdavid.co.uk>
6
6
  License: MIT
@@ -11,7 +11,7 @@ projectdavid_common/constants/tools.py,sha256=FOsrnmwccklDrxRP1OUr22Xx5Uswg80LFa
11
11
  projectdavid_common/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  projectdavid_common/schemas/actions_schema.py,sha256=fJPZoY9hoL0-e6Lp_NqpjVhSIr_qrNLjmQycJf5gmN0,2985
13
13
  projectdavid_common/schemas/api_key_schemas.py,sha256=PM6WOlzE-Y06v5YXLYXH5B2EmttMc8oiWbHd4Su81p4,4031
14
- projectdavid_common/schemas/assistants_schema.py,sha256=1-ciMT5dWW77cV97gbnMLG5ue0G8EA_zumIEziRxYTU,8493
14
+ projectdavid_common/schemas/assistants_schema.py,sha256=kOWnxT3yXVF1j2qU1G1tpgrxDBRYrTQ9Oeh2VDQVhZE,6229
15
15
  projectdavid_common/schemas/enums.py,sha256=pQdkz_hmfU_vcZdn4XOvcPOcQihaX_iuQIFk-yKTiaw,692
16
16
  projectdavid_common/schemas/files_schema.py,sha256=hNMqVDRc5lsdhxyPWO79QjIpE7NKmKzdQ6hJG8L6LfA,3025
17
17
  projectdavid_common/schemas/inference_schema.py,sha256=LPjKDCq7jBPbQCgwlM97rxO477v3vWwb6RYh4DW0KIs,228
@@ -26,8 +26,8 @@ projectdavid_common/schemas/vectors_schema.py,sha256=KG4HSa6yVgBLe01iSdXKoU3UxRS
26
26
  projectdavid_common/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  projectdavid_common/utilities/identifier_service.py,sha256=7hL4_i7pGs6bibCSkXQIwpMSUCFASFE0VPm6gqMv4sk,2950
28
28
  projectdavid_common/utilities/logging_service.py,sha256=ONKy3PRjIrxIrTJ_X3iv7v9HA0wyejyw4WrQYlJy7Oc,2614
29
- projectdavid_common-0.17.2.dist-info/METADATA,sha256=KifP4N7pUXuk1z3J8gbs2tl4Peo6C3IoSHp41KTWiOM,1673
30
- projectdavid_common-0.17.2.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
31
- projectdavid_common-0.17.2.dist-info/entry_points.txt,sha256=Y8HAIUW0ifCKcAzAqR21wu1ATHNFWWWiUB33UYv095o,74
32
- projectdavid_common-0.17.2.dist-info/top_level.txt,sha256=lJ-jkZ0n0jWktoMJFcw-DzLoMTY2juuw5fgMIqYu1UU,20
33
- projectdavid_common-0.17.2.dist-info/RECORD,,
29
+ projectdavid_common-0.17.3.dist-info/METADATA,sha256=v_Iqv7smnkymnUfQTgyfZYpxHZ3bFWpdAg-CreoyZWw,1673
30
+ projectdavid_common-0.17.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
+ projectdavid_common-0.17.3.dist-info/entry_points.txt,sha256=Y8HAIUW0ifCKcAzAqR21wu1ATHNFWWWiUB33UYv095o,74
32
+ projectdavid_common-0.17.3.dist-info/top_level.txt,sha256=lJ-jkZ0n0jWktoMJFcw-DzLoMTY2juuw5fgMIqYu1UU,20
33
+ projectdavid_common-0.17.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.7.1)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5