pro-craft 0.1.22__tar.gz → 0.1.23__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.22 → pro_craft-0.1.23}/PKG-INFO +1 -1
- {pro_craft-0.1.22 → pro_craft-0.1.23}/pyproject.toml +1 -1
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft/prompt_craft/async_.py +20 -14
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft.egg-info/PKG-INFO +1 -1
- {pro_craft-0.1.22 → pro_craft-0.1.23}/README.md +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/setup.cfg +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft/__init__.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft/code_helper/coder.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft/code_helper/designer.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft/database.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft/file_manager.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft/log.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft/prompt_craft/__init__.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft/prompt_craft/evals.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft/prompt_craft/new.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft/prompt_craft/sync.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft/server/mcp/__init__.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft/server/mcp/prompt.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft/server/router/__init__.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft/server/router/prompt.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft/utils.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft.egg-info/SOURCES.txt +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft.egg-info/dependency_links.txt +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft.egg-info/requires.txt +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/src/pro_craft.egg-info/top_level.txt +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/tests/test22.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/tests/test_coder.py +0 -0
- {pro_craft-0.1.22 → pro_craft-0.1.23}/tests/test_designer.py +0 -0
|
@@ -23,6 +23,9 @@ from json.decoder import JSONDecodeError
|
|
|
23
23
|
class IntellectRemoveFormatError(Exception):
|
|
24
24
|
pass
|
|
25
25
|
|
|
26
|
+
class IntellectRemoveError(Exception):
|
|
27
|
+
pass
|
|
28
|
+
|
|
26
29
|
|
|
27
30
|
def slog(s, target: str = "target",logger = None):
|
|
28
31
|
COLOR_GREEN = "\033[92m"
|
|
@@ -310,8 +313,8 @@ class AsyncIntel():
|
|
|
310
313
|
async with create_async_session(self.engine) as session:
|
|
311
314
|
|
|
312
315
|
latest_prompt = await self.get_prompts_from_sql(prompt_id=prompt_id,session=session)
|
|
313
|
-
|
|
314
|
-
|
|
316
|
+
if latest_prompt:
|
|
317
|
+
await self.save_prompt_increment_version(prompt_id=latest_prompt.prompt_id,
|
|
315
318
|
new_prompt = latest_prompt.prompt,
|
|
316
319
|
use_case = latest_prompt.use_case,
|
|
317
320
|
action_type=action_type,
|
|
@@ -319,8 +322,21 @@ class AsyncIntel():
|
|
|
319
322
|
score=latest_prompt.score,
|
|
320
323
|
session=session
|
|
321
324
|
)
|
|
325
|
+
return "success"
|
|
326
|
+
else:
|
|
327
|
+
await self.save_prompt_increment_version(prompt_id=prompt_id,
|
|
328
|
+
new_prompt = demand,
|
|
329
|
+
use_case = "init",
|
|
330
|
+
action_type="inference",
|
|
331
|
+
demand=demand,
|
|
332
|
+
score=60,
|
|
333
|
+
session=session
|
|
334
|
+
)
|
|
335
|
+
return "init"
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
322
339
|
|
|
323
|
-
return "success"
|
|
324
340
|
|
|
325
341
|
|
|
326
342
|
|
|
@@ -339,18 +355,8 @@ class AsyncIntel():
|
|
|
339
355
|
# 查数据库, 获取最新提示词对象
|
|
340
356
|
async with create_async_session(self.engine) as session:
|
|
341
357
|
result_obj = await self.get_prompts_from_sql(prompt_id=prompt_id,session=session)
|
|
342
|
-
|
|
343
|
-
|
|
344
358
|
if result_obj is None:
|
|
345
|
-
|
|
346
|
-
prompt_id = prompt_id,
|
|
347
|
-
new_prompt = "做一些处理",
|
|
348
|
-
use_case = input_,
|
|
349
|
-
score = 60,
|
|
350
|
-
session = session
|
|
351
|
-
)
|
|
352
|
-
ai_result = "初始化完成"
|
|
353
|
-
return ai_result
|
|
359
|
+
raise IntellectRemoveError("不存在的prompt_id")
|
|
354
360
|
|
|
355
361
|
prompt = result_obj.prompt
|
|
356
362
|
if result_obj.action_type == "inference":
|
|
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
|
|
File without changes
|
|
File without changes
|