pro-craft 0.1.19__tar.gz → 0.1.21__tar.gz
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-0.1.19 → pro_craft-0.1.21}/PKG-INFO +1 -4
- {pro_craft-0.1.19 → pro_craft-0.1.21}/pyproject.toml +2 -2
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft/prompt_craft/async_.py +39 -5
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft/server/router/prompt.py +1 -1
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft.egg-info/PKG-INFO +1 -4
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft.egg-info/requires.txt +0 -3
- {pro_craft-0.1.19 → pro_craft-0.1.21}/README.md +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/setup.cfg +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft/__init__.py +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft/code_helper/coder.py +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft/code_helper/designer.py +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft/database.py +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft/file_manager.py +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft/log.py +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft/prompt_craft/__init__.py +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft/prompt_craft/evals.py +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft/prompt_craft/new.py +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft/prompt_craft/sync.py +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft/server/mcp/__init__.py +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft/server/mcp/prompt.py +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft/server/router/__init__.py +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft/utils.py +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft.egg-info/SOURCES.txt +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft.egg-info/dependency_links.txt +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/src/pro_craft.egg-info/top_level.txt +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/tests/test22.py +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/tests/test_coder.py +0 -0
- {pro_craft-0.1.19 → pro_craft-0.1.21}/tests/test_designer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pro-craft
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.21
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.12
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -9,9 +9,6 @@ Requires-Dist: anyio>=4.11.0
|
|
|
9
9
|
Requires-Dist: db-help>=0.2.2
|
|
10
10
|
Requires-Dist: fastapi>=0.119.0
|
|
11
11
|
Requires-Dist: llmada>=1.1.11
|
|
12
|
-
Requires-Dist: pytest>=8.4.2
|
|
13
|
-
Requires-Dist: pytest-asyncio>=1.2.0
|
|
14
|
-
Requires-Dist: pytest-tornasync>=0.6.0.post2
|
|
15
12
|
Requires-Dist: pyyaml>=6.0.3
|
|
16
13
|
Requires-Dist: toml>=0.10.2
|
|
17
14
|
Requires-Dist: utils-tool==0.1.3
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pro-craft"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.21"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.12"
|
|
7
|
-
dependencies = [ "aiomysql>=0.2.0", "anyio>=4.11.0", "db-help>=0.2.2", "fastapi>=0.119.0", "llmada>=1.1.11", "
|
|
7
|
+
dependencies = [ "aiomysql>=0.2.0", "anyio>=4.11.0", "db-help>=0.2.2", "fastapi>=0.119.0", "llmada>=1.1.11", "pyyaml>=6.0.3", "toml>=0.10.2", "utils-tool==0.1.3", "uvicorn>=0.38.0",]
|
|
8
8
|
|
|
9
9
|
[tool.setuptools.package-data]
|
|
10
10
|
pro_craft = [ "config.yaml",]
|
|
@@ -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
|
|
@@ -282,13 +282,14 @@ class AsyncIntel():
|
|
|
282
282
|
{opinion}
|
|
283
283
|
"""
|
|
284
284
|
|
|
285
|
-
|
|
285
|
+
prompt_ = await self.get_prompts_from_sql(prompt_id = prompt_id,version = version,
|
|
286
|
+
session=session)
|
|
286
287
|
if demand:
|
|
287
288
|
new_prompt = await self.llm.aproduct(
|
|
288
|
-
change_by_opinion_prompt.format(old_system_prompt=prompt, opinion=demand)
|
|
289
|
+
change_by_opinion_prompt.format(old_system_prompt=prompt_.prompt, opinion=demand)
|
|
289
290
|
)
|
|
290
291
|
else:
|
|
291
|
-
new_prompt =
|
|
292
|
+
new_prompt = prompt_
|
|
292
293
|
await self.save_prompt_increment_version(prompt_id = prompt_id,
|
|
293
294
|
new_prompt = new_prompt,
|
|
294
295
|
use_case = " finetune ",
|
|
@@ -582,6 +583,7 @@ class AsyncIntel():
|
|
|
582
583
|
ExtraFormats: list[object] = [],
|
|
583
584
|
version: str = None,
|
|
584
585
|
inference_save_case = True,
|
|
586
|
+
push_patch = False,
|
|
585
587
|
):
|
|
586
588
|
|
|
587
589
|
base_format_prompt = """
|
|
@@ -598,7 +600,8 @@ class AsyncIntel():
|
|
|
598
600
|
output_format=output_format,
|
|
599
601
|
prompt_id=prompt_id,
|
|
600
602
|
version=version,
|
|
601
|
-
inference_save_case=inference_save_case
|
|
603
|
+
inference_save_case=inference_save_case,
|
|
604
|
+
push_patch = push_patch,
|
|
602
605
|
)
|
|
603
606
|
|
|
604
607
|
try:
|
|
@@ -621,6 +624,37 @@ class AsyncIntel():
|
|
|
621
624
|
|
|
622
625
|
return ai_result
|
|
623
626
|
|
|
627
|
+
async def intellect_remove_formats(self,
|
|
628
|
+
input_datas: list[dict | str],
|
|
629
|
+
OutputFormat: object,
|
|
630
|
+
prompt_id: str,
|
|
631
|
+
ExtraFormats: list[object] = [],
|
|
632
|
+
version: str = None,
|
|
633
|
+
inference_save_case = True,
|
|
634
|
+
push_patch = False,
|
|
635
|
+
):
|
|
636
|
+
|
|
637
|
+
async with create_async_session(self.engine) as session:
|
|
638
|
+
prompt_result = await self.get_prompts_from_sql(prompt_id=prompt_id,
|
|
639
|
+
session=session)
|
|
640
|
+
if prompt_result.action_type != "inference":
|
|
641
|
+
input_datas = input_datas[:1]
|
|
642
|
+
tasks = []
|
|
643
|
+
for input_data in input_datas:
|
|
644
|
+
tasks.append(
|
|
645
|
+
self.intellect_remove_format(
|
|
646
|
+
input_data = input_data,
|
|
647
|
+
prompt_id = prompt_id,
|
|
648
|
+
OutputFormat = OutputFormat,
|
|
649
|
+
ExtraFormats = ExtraFormats,
|
|
650
|
+
version = version,
|
|
651
|
+
inference_save_case = inference_save_case,
|
|
652
|
+
push_patch = push_patch
|
|
653
|
+
)
|
|
654
|
+
)
|
|
655
|
+
results = await asyncio.gather(*tasks, return_exceptions=False)
|
|
656
|
+
return results
|
|
657
|
+
|
|
624
658
|
|
|
625
659
|
def intellect_remove_warp(self,prompt_id: str):
|
|
626
660
|
def outer_packing(func):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pro-craft
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.21
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.12
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -9,9 +9,6 @@ Requires-Dist: anyio>=4.11.0
|
|
|
9
9
|
Requires-Dist: db-help>=0.2.2
|
|
10
10
|
Requires-Dist: fastapi>=0.119.0
|
|
11
11
|
Requires-Dist: llmada>=1.1.11
|
|
12
|
-
Requires-Dist: pytest>=8.4.2
|
|
13
|
-
Requires-Dist: pytest-asyncio>=1.2.0
|
|
14
|
-
Requires-Dist: pytest-tornasync>=0.6.0.post2
|
|
15
12
|
Requires-Dist: pyyaml>=6.0.3
|
|
16
13
|
Requires-Dist: toml>=0.10.2
|
|
17
14
|
Requires-Dist: utils-tool==0.1.3
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|