Skip to main content

Universal prompt builder module for creating dynamic prompts

Project description

Universal Prompt Builder

동적 프롬프트 생성을 위한 범용 프롬프트 빌더 모듈입니다.

특징

  • 🔧 템플릿 기반: Jinja2를 사용한 유연한 템플릿 시스템
  • 📝 동적 생성: 컨텍스트에 따른 동적 프롬프트 생성
  • 🎯 타입 안전: Pydantic을 통한 강력한 타입 검증
  • 🔄 재사용 가능: 모듈화된 프롬프트 컴포넌트

설치

pip install yeonjae-universal-prompt-builder

사용법

from yeonjae_universal_prompt_builder import PromptBuilder, PromptTemplate

# 기본 사용법
builder = PromptBuilder()
template = PromptTemplate(
    name="greeting",
    template="Hello, {{ name }}! Welcome to {{ place }}.",
    variables=["name", "place"]
)

prompt = builder.build(template, {"name": "Alice", "place": "PyPI"})
print(prompt)  # "Hello, Alice! Welcome to PyPI."

라이센스

MIT License

버전 히스토리

  • 1.0.2: 초기 배포 버전
  • 1.0.1: 개발 버전
  • 1.0.0: 프로토타입

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yeonjae_universal_prompt_builder-1.0.5.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file yeonjae_universal_prompt_builder-1.0.5.tar.gz.

File metadata

File hashes

Hashes for yeonjae_universal_prompt_builder-1.0.5.tar.gz
Algorithm Hash digest
SHA256 ed7a787a3d02064caa5fcddea41b0c357c029848313b7a0f59b89f1446ac9cd5
MD5 8c6a15ecbd7420b638687c0719727974
BLAKE2b-256 acd81d6c4800421a9b28475e8f9f94967e446d4d7bc5ae8d7a78a270df33f184

See more details on using hashes here.

File details

Details for the file yeonjae_universal_prompt_builder-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for yeonjae_universal_prompt_builder-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 51e49ed3a39c7f4dfa360f22a78f4a3d9b7b8790fef6e668ee41fb2bd3f83758
MD5 599b4d5bfd44e57dba7b613692ac895b
BLAKE2b-256 dadc5f93d368377e4a3f9a7f2f33fd86607e82321b8e2c9e7e1cca7afcbc9b4a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page