refactor: mv prompt_generator_app to third_party_examples

This commit is contained in:
Jerry Z H
2025-10-30 21:04:41 +08:00
parent df9de666b8
commit 5badb04da1
40 changed files with 35 additions and 30 deletions

View File

@@ -0,0 +1,7 @@
# !/usr/bin/env python3
# -*- coding:utf-8 -*-
# @Time : 2025/10/30 20:59
# @Author : jerry.zzw
# @Email : jerry.zzw@antgroup.com
# @FileName: __init__.py.py

View File

@@ -0,0 +1,7 @@
# !/usr/bin/env python3
# -*- coding:utf-8 -*-
# @Time : 2025/10/30 20:59
# @Author : jerry.zzw
# @Email : jerry.zzw@antgroup.com
# @FileName: __init__.py.py

View File

@@ -7,7 +7,7 @@
# @FileName: prompt_service.py
"""Prompt Generation Service.
Provides core prompt generation service functionality for prompt_generator_app.
Provides core prompt generation service functionality for app.
This service layer encapsulates the core logic for prompt generation, optimization,
and configuration management.
"""
@@ -22,7 +22,7 @@ project_root = Path(__file__).parent.parent.parent.parent.parent.parent
if str(project_root) not in sys.path:
sys.path.insert(0, str(project_root))
from agentuniverse.prompt.prompt_generator_helper import (
from examples.third_party_examples.apps.prompt_generator_app.prompt_generator_helper import (
PromptTemplateHelper,
generate_prompt_config,
optimize_existing_prompt

View File

@@ -7,20 +7,19 @@
# @FileName: template_service.py
"""Prompt Template Service.
Provides template management and generation functionality for prompt_generator_app.
Provides template management and generation functionality for app.
This service layer focuses on template storage, retrieval, and management.
"""
import os
import sys
from pathlib import Path
from typing import Dict, List, Optional, Any
from typing import Dict, List, Any
# Add project root directory to Python path
project_root = Path(__file__).parent.parent.parent.parent.parent.parent
if str(project_root) not in sys.path:
sys.path.insert(0, str(project_root))
from agentuniverse.prompt.prompt_generator_helper import PromptTemplateHelper
from examples.third_party_examples.apps.prompt_generator_app.prompt_generator_helper import PromptTemplateHelper
class PromptTemplateService:

View File

@@ -10,7 +10,6 @@
This demo script shows how to use the prompt generator to create different types of agent prompts.
Suitable for learning and understanding how to use the prompt generator.
"""
import os
import sys
from pathlib import Path
@@ -19,7 +18,7 @@ project_root = Path(__file__).parent.parent.parent.parent.parent.parent
if str(project_root) not in sys.path:
sys.path.insert(0, str(project_root))
from agentuniverse.prompt.prompt_generator_helper import (
from examples.third_party_examples.apps.prompt_generator_app.prompt_generator_helper import (
PromptTemplateHelper,
generate_prompt_config
)

View File

@@ -7,7 +7,6 @@
# @FileName: prompt_optimizer_demo.py
import sys
import os
from pathlib import Path
# Add project root to Python path
@@ -15,7 +14,7 @@ project_root = Path(__file__).parent.parent.parent.parent.parent
if str(project_root) not in sys.path:
sys.path.insert(0, str(project_root))
from agentuniverse.prompt.prompt_generator_helper import optimize_existing_prompt
from examples.third_party_examples.apps.prompt_generator_app.prompt_generator_helper import optimize_existing_prompt
def demo_basic_prompt_optimization():

View File

@@ -21,11 +21,10 @@ project_root = Path(__file__).parent.parent.parent.parent.parent.parent
if str(project_root) not in sys.path:
sys.path.insert(0, str(project_root))
from agentuniverse.prompt.prompt_generator_helper import (
from examples.third_party_examples.apps.prompt_generator_app.prompt_generator_helper import (
generate_prompt_config,
optimize_existing_prompt,
PromptTemplateHelper,
PromptGenerationError,
UnsupportedAgentTypeError
)

View File

@@ -8,7 +8,6 @@
import unittest
import sys
import os
from pathlib import Path
# Add project root to Python path
@@ -16,11 +15,8 @@ project_root = Path(__file__).parent.parent.parent.parent.parent
if str(project_root) not in sys.path:
sys.path.insert(0, str(project_root))
from agentuniverse.prompt.prompt_generator_helper import (
optimize_existing_prompt,
_analyze_existing_prompt,
_generate_improvement_suggestions,
_apply_optimizations
from examples.third_party_examples.apps.prompt_generator_app.prompt_generator_helper import (
optimize_existing_prompt
)

View File

@@ -7,7 +7,7 @@
# @FileName: prompt_util.py
"""Prompt Utility Functions.
Provides practical utility functions for prompt processing in prompt_generator_app.
Provides practical utility functions for prompt processing in app.
This utility module focuses on prompt content analysis, validation, and transformation.
"""
import re

View File

@@ -7,7 +7,7 @@
# @FileName: yaml_util.py
"""YAML Utility Functions.
Provides YAML file reading, writing, and validation functionality for prompt_generator_app.
Provides YAML file reading, writing, and validation functionality for app.
This utility module focuses on YAML data processing and validation.
"""
import os

View File

@@ -0,0 +1,7 @@
# !/usr/bin/env python3
# -*- coding:utf-8 -*-
# @Time : 2025/10/30 20:59
# @Author : jerry.zzw
# @Email : jerry.zzw@antgroup.com
# @FileName: __init__.py.py

View File

@@ -14,7 +14,6 @@ provides flexible configuration options.
"""
import argparse
import os
import sys
from pathlib import Path
@@ -23,7 +22,7 @@ current_dir = Path(__file__).parent
project_root = current_dir.parent
sys.path.insert(0, str(project_root))
from agentuniverse.prompt.prompt_generator_helper import (
from examples.third_party_examples.apps.prompt_generator_app.prompt_generator_helper import (
PromptTemplateHelper,
generate_prompt_config
)

View File

@@ -17,7 +17,7 @@ import os
import tempfile
import unittest
from agentuniverse.prompt.prompt_generator_helper import (
from examples.third_party_examples.apps.prompt_generator_app.prompt_generator_helper import (
PromptTemplateHelper,
generate_prompt_config,
optimize_existing_prompt

View File

@@ -1,7 +0,0 @@
# !/usr/bin/env python3
# -*- coding:utf-8 -*-
# @Time : 2025/09/16 23:00
# @Author : Libres-coder
# @Email : liudi1366@gmail.com
# @FileName: __init__.py