pro-craft 0.1.26__py3-none-any.whl → 0.1.28__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.
Potentially problematic release.
This version of pro-craft might be problematic. Click here for more details.
- pro_craft/prompt_craft/async_.py +18 -5
- {pro_craft-0.1.26.dist-info → pro_craft-0.1.28.dist-info}/METADATA +1 -1
- {pro_craft-0.1.26.dist-info → pro_craft-0.1.28.dist-info}/RECORD +5 -5
- {pro_craft-0.1.26.dist-info → pro_craft-0.1.28.dist-info}/WHEEL +0 -0
- {pro_craft-0.1.26.dist-info → pro_craft-0.1.28.dist-info}/top_level.txt +0 -0
pro_craft/prompt_craft/async_.py
CHANGED
|
@@ -159,7 +159,6 @@ class AsyncIntel():
|
|
|
159
159
|
pool_pre_ping=True, # 使用前检查连接活性
|
|
160
160
|
pool_timeout=30 # 等待连接池中连接的最长时间(秒)
|
|
161
161
|
)
|
|
162
|
-
|
|
163
162
|
|
|
164
163
|
if model_name in ["gemini-2.5-flash-preview-05-20-nothinking",]:
|
|
165
164
|
self.llm = BianXieAdapter(model_name = model_name)
|
|
@@ -169,8 +168,24 @@ class AsyncIntel():
|
|
|
169
168
|
print('Use BianXieAdapter')
|
|
170
169
|
self.llm = BianXieAdapter()
|
|
171
170
|
|
|
172
|
-
async def
|
|
171
|
+
async def create_specific_database(self):
|
|
172
|
+
tables_to_create_names = ["ai_prompts","ai_usecase"]
|
|
173
173
|
async with self.engine.begin() as conn:
|
|
174
|
+
# 从 metadata 中获取对应的 Table 对象
|
|
175
|
+
specific_database_objects = []
|
|
176
|
+
for table_name in tables_to_create_names:
|
|
177
|
+
if table_name in PromptBase.metadata.tables:
|
|
178
|
+
specific_database_objects.append(PromptBase.metadata.tables[table_name])
|
|
179
|
+
else:
|
|
180
|
+
print(f"Warning: Table '{table_name}' not found in metadata.")
|
|
181
|
+
|
|
182
|
+
if specific_database_objects:
|
|
183
|
+
await conn.run_sync(PromptBase.metadata.create_all, tables=specific_database_objects)
|
|
184
|
+
else:
|
|
185
|
+
print("No specific tables to create.")
|
|
186
|
+
|
|
187
|
+
async def create_database(self,engine):
|
|
188
|
+
async with engine.begin() as conn:
|
|
174
189
|
await conn.run_sync(PromptBase.metadata.create_all)
|
|
175
190
|
|
|
176
191
|
async def _get_latest_prompt_version(self,target_prompt_id,session):
|
|
@@ -218,9 +233,7 @@ class AsyncIntel():
|
|
|
218
233
|
|
|
219
234
|
async def sync_prompt_data_to_database(self,database_url:str):
|
|
220
235
|
target_engine = create_async_engine(database_url, echo=False)
|
|
221
|
-
|
|
222
|
-
await conn.run_sync(PromptBase.metadata.create_all)
|
|
223
|
-
|
|
236
|
+
await self.create_database(target_engine)
|
|
224
237
|
async with create_async_session(self.engine) as source_session:
|
|
225
238
|
async with create_async_session(target_engine) as target_session:
|
|
226
239
|
|
|
@@ -6,14 +6,14 @@ pro_craft/utils.py,sha256=R1DFkS4dsm5dIhg8lLTgBBvItvIYyyojROdh-ykqiYk,5250
|
|
|
6
6
|
pro_craft/code_helper/coder.py,sha256=L6pRQr0pYRIHrMFZ4-pO_tZf1koxgGgF3L7Vl-GIyjM,24687
|
|
7
7
|
pro_craft/code_helper/designer.py,sha256=3gyCqrjcw61sHzDjUPKhL1LOAE8xWLLbNT8NlK2mFLc,4739
|
|
8
8
|
pro_craft/prompt_craft/__init__.py,sha256=83ruWO1Oci-DWvdVhPqcQrgdZTNfbmK72VQCkWASk7A,80
|
|
9
|
-
pro_craft/prompt_craft/async_.py,sha256=
|
|
9
|
+
pro_craft/prompt_craft/async_.py,sha256=AAN-ikregIYz5ThHmvCuRha8k4W_mAvcCO3ZM-zSg-w,43791
|
|
10
10
|
pro_craft/prompt_craft/new.py,sha256=ULjGGl95vmHrOs7XECJGlaqj1NE9BypE5WnFYhGugRY,25903
|
|
11
11
|
pro_craft/prompt_craft/sync.py,sha256=w-zXC9_yVxgvnotimcs2POEXaHWD6ibspdPwWL9zqXk,26178
|
|
12
12
|
pro_craft/server/mcp/__init__.py,sha256=4dbl-lFcm0r2tkOP04OxqiZG2jR-rqF181qi2AfU6UA,123
|
|
13
13
|
pro_craft/server/mcp/prompt.py,sha256=OZrsyUfSQMOY_KX7dWthW209adz5JfELsQ0ODfuQR44,1245
|
|
14
14
|
pro_craft/server/router/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
pro_craft/server/router/prompt.py,sha256=Wa4FfYRL6oeyA3F-79pmPeIH0Vo8wSEv7RH1lP6jXck,2907
|
|
16
|
-
pro_craft-0.1.
|
|
17
|
-
pro_craft-0.1.
|
|
18
|
-
pro_craft-0.1.
|
|
19
|
-
pro_craft-0.1.
|
|
16
|
+
pro_craft-0.1.28.dist-info/METADATA,sha256=xcJyGVIPA2e7CU4sOcM2PQIpsc4esvg4GeSDxj-eVvY,1689
|
|
17
|
+
pro_craft-0.1.28.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
18
|
+
pro_craft-0.1.28.dist-info/top_level.txt,sha256=yqYDHArnYMWpeCxkmGRwlL6sJtxiOUnYylLDx9EOgFg,10
|
|
19
|
+
pro_craft-0.1.28.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|