prompt_assistant
is a Python library that helps create structured prompts for AI interactions. It provides a systematic framework for generating high-quality prompts across various domains like software development, product design, and language tasks.
- Structured Prompt Framework: Define prompts with clear task, context, input/output specifications
- Multiple Assistant Types: Pre-built assistants for different domains:
- Language Expert Assistant
- Product Designer Assistant
- Python Architect Assistant
- Python Coder Assistant
- Software Architect Assistant
- Software Engineer Assistant
- Flexible & Extensible: Easy to customize and add new assistant types
- JSON Compatible: All prompts can be serialized to/from JSON
pip install prompt_assistant
Requires Python 3.10+
from prompt_assistant import PyCoderAssistant
# Create a Python coding assistant
assistant = PyCoderAssistant()
# Generate a prompt for writing a function
prompt = assistant.create_prompt(
"Write a function to calculate fibonacci numbers"
)
# Get the structured prompt as JSON
prompt_json = prompt.to_json()
Each assistant type provides specialized prompting capabilities:
- Language Expert: Translation and language-related tasks
- Product Designer: UI/UX and product design specifications
- Python Architect: High-level Python architecture design
- Python Coder: Python implementation details
- Software Architect: System architecture design
- Software Engineer: General software engineering tasks
# Using Language Expert Assistant
from prompt_assistant import LanguageExpertAssistant
expert = LanguageExpertAssistant()
prompt = expert.create_prompt("Translate: Hello World")
print(prompt.to_json())
# Using Product Designer Assistant
from prompt_assistant import ProductDesignerAssistant
designer = ProductDesignerAssistant()
prompt = designer.create_prompt("Design a user-friendly login interface")
print(prompt.to_json())
MIT License
- Ron Liu - Initial work - GitHub
- Email: [email protected]
For questions or suggestions, please feel free to:
- Open an issue on GitHub
- Contact author directly via email
- Submit a pull request
prompt_assistant
是一个用于创建结构化AI提示词的Python库。它为不同领域(如软件开发、产品设计和语言任务)提供了系统化的提示词生成框架。
- 结构化提示框架: 通过明确的任务、上下文、输入/输出规范来定义提示词
- 多种助手类型: 预置多种专业领域助手:
- 语言专家助手
- 产品设计师助手
- Python架构师助手
- Python开发助手
- 软件架构师助手
- 软件工程师助手
- 灵活且可扩展: 易于自定义和添加新的助手类型
- JSON兼容: 所有提示词可以与JSON格式互转
pip install prompt_assistant
需要Python 3.10+版本
from prompt_assistant import PyCoderAssistant
# 创建Python编程助手
assistant = PyCoderAssistant()
# 生成编写函数的提示词
prompt = assistant.create_prompt(
"编写一个计算斐波那契数列的函数"
)
# 获取JSON格式的结构化提示词
prompt_json = prompt.to_json()
每种助手类型提供专门的提示词能力:
- 语言专家: 翻译和语言相关任务
- 产品设计师: UI/UX和产品设计规范
- Python架构师: Python高层架构设计
- Python开发者: Python实现细节
- 软件架构师: 系统架构设计
- 软件工程师: 通用软件工程任务
# 使用语言专家助手
from prompt_assistant import LanguageExpertAssistant
expert = LanguageExpertAssistant()
prompt = expert.create_prompt("翻译: Hello World")
print(prompt.to_json())
# 使用产品设计师助手
from prompt_assistant import ProductDesignerAssistant
designer = ProductDesignerAssistant()
prompt = designer.create_prompt("设计一个用户友好的登录界面")
print(prompt.to_json())
MIT License
- Ron Liu - Initial work - GitHub
- Email: [email protected]
如有问题或建议,欢迎:
- 在GitHub上提Issue
- 通过邮件直接联系作者
- 提交Pull Request