pro-craft 0.1.19__py3-none-any.whl → 0.1.20__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 +30 -1
- pro_craft/server/router/prompt.py +1 -1
- {pro_craft-0.1.19.dist-info → pro_craft-0.1.20.dist-info}/METADATA +1 -1
- {pro_craft-0.1.19.dist-info → pro_craft-0.1.20.dist-info}/RECORD +6 -6
- {pro_craft-0.1.19.dist-info → pro_craft-0.1.20.dist-info}/WHEEL +0 -0
- {pro_craft-0.1.19.dist-info → pro_craft-0.1.20.dist-info}/top_level.txt +0 -0
pro_craft/prompt_craft/async_.py
CHANGED
|
@@ -14,7 +14,7 @@ from sqlalchemy import select, delete # 导入 select, delete 用于异步操作
|
|
|
14
14
|
import inspect
|
|
15
15
|
from datetime import datetime
|
|
16
16
|
from pro_craft.utils import extract_
|
|
17
|
-
|
|
17
|
+
import asyncio
|
|
18
18
|
import re
|
|
19
19
|
|
|
20
20
|
from sqlalchemy import select, desc
|
|
@@ -621,6 +621,35 @@ class AsyncIntel():
|
|
|
621
621
|
|
|
622
622
|
return ai_result
|
|
623
623
|
|
|
624
|
+
async def intellect_remove_formats(self,
|
|
625
|
+
input_datas: list[dict | str],
|
|
626
|
+
OutputFormat: object,
|
|
627
|
+
prompt_id: str,
|
|
628
|
+
ExtraFormats: list[object] = [],
|
|
629
|
+
version: str = None,
|
|
630
|
+
inference_save_case = True,
|
|
631
|
+
):
|
|
632
|
+
|
|
633
|
+
async with create_async_session(self.engine) as session:
|
|
634
|
+
prompt_result = await self.get_prompts_from_sql(prompt_id=prompt_id,
|
|
635
|
+
session=session)
|
|
636
|
+
if prompt_result.action_type != "inference":
|
|
637
|
+
input_datas = input_datas[:1]
|
|
638
|
+
tasks = []
|
|
639
|
+
for input_data in input_datas:
|
|
640
|
+
tasks.append(
|
|
641
|
+
self.intellect_remove_format(
|
|
642
|
+
input_data = input_data,
|
|
643
|
+
prompt_id = prompt_id,
|
|
644
|
+
OutputFormat = OutputFormat,
|
|
645
|
+
ExtraFormats = ExtraFormats,
|
|
646
|
+
version = version,
|
|
647
|
+
inference_save_case = inference_save_case,
|
|
648
|
+
)
|
|
649
|
+
)
|
|
650
|
+
results = await asyncio.gather(*tasks, return_exceptions=False)
|
|
651
|
+
return results
|
|
652
|
+
|
|
624
653
|
|
|
625
654
|
def intellect_remove_warp(self,prompt_id: str):
|
|
626
655
|
def outer_packing(func):
|
|
@@ -6,15 +6,15 @@ 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=QvomyFUm2Hq0ZhRdOVaD0EsJTwm3GIANgG4IptLVQuY,29040
|
|
10
10
|
pro_craft/prompt_craft/evals.py,sha256=XzaaQgA-Vgo8MNPYTdN0hyFJNmgTvw2jroWmeA02pBs,1847
|
|
11
11
|
pro_craft/prompt_craft/new.py,sha256=cHugfhLNUMQk_l8JQBg5ZQXPYXqspexnCOgp3YUzoD0,25894
|
|
12
12
|
pro_craft/prompt_craft/sync.py,sha256=-rY1KxAP5FhxI6Vmm2hHoLvYMmtL7rbLcFQMqD9g8ZU,25841
|
|
13
13
|
pro_craft/server/mcp/__init__.py,sha256=4dbl-lFcm0r2tkOP04OxqiZG2jR-rqF181qi2AfU6UA,123
|
|
14
14
|
pro_craft/server/mcp/prompt.py,sha256=OZrsyUfSQMOY_KX7dWthW209adz5JfELsQ0ODfuQR44,1245
|
|
15
15
|
pro_craft/server/router/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
pro_craft/server/router/prompt.py,sha256=
|
|
17
|
-
pro_craft-0.1.
|
|
18
|
-
pro_craft-0.1.
|
|
19
|
-
pro_craft-0.1.
|
|
20
|
-
pro_craft-0.1.
|
|
16
|
+
pro_craft/server/router/prompt.py,sha256=ecf8kpVqPp7q_VTcUNej3MAzpO4oywgY7TAV7R6qaBw,2745
|
|
17
|
+
pro_craft-0.1.20.dist-info/METADATA,sha256=ov7D7Q4ggdzxCAY26ho_-fCF4U55t4GPaTBSkQ53gCE,1800
|
|
18
|
+
pro_craft-0.1.20.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
pro_craft-0.1.20.dist-info/top_level.txt,sha256=yqYDHArnYMWpeCxkmGRwlL6sJtxiOUnYylLDx9EOgFg,10
|
|
20
|
+
pro_craft-0.1.20.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|