Skip to content

Conversation

@nonegom
Copy link
Contributor

@nonegom nonegom commented Apr 20, 2025

#️⃣ Issue Number

📝 요약(Summary)

  • 프롬프트를 md 파일로 사용할 수 있게 기존 default 프롬프트를 변경했습니다.
  • 실제 동작 확인했습니다.

💬 To Reviewers (선택)

  • 마크다운으로 관리 시, 코드 가독성 및 관리 가능성이 올라갈 것으로 기대됩니다.

PR Checklist

  • 테스트 수행 완료

reference) How to Code Review

  • 따봉(👍): 리뷰어가 리뷰이의 코드에서 칭찬의 의견을 남기고 싶을 때 사용합니다.
  • 느낌표(❗): 리뷰어가 리뷰이에게 필수적으로 코드 수정을 요청할 때 사용합니다.
  • 물음표 (❓): 리뷰어가 리뷰이에게 의견을 물어보고 싶을 때 사용합니다.
  • 알약 (💊): 리뷰어가 리뷰이의 코드에서 개선된 방법을 제안하지만 그것의 반영이 필수까지는 아닐 때 사용합니다.


def get_prompt_template(prompt_name: str) -> str:
try:
with open(os.path.join(os.path.dirname(__file__), f"{prompt_name}.md"), "r", encoding="utf-8") as f:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❗제 환경에서는 에러가 나네요...ㅜㅜ

    raise FileNotFoundError(f"경고: '{prompt_name}.md' 파일을 찾을 수 없습니다.")

디버깅
ls -ltra /home/pseudo.dwlee038/miniconda3/lib/python3.12/site-packages/prompt/

-rw-rw-r--   1 pseudo.dwlee038 pseudo.dwlee038   790 Apr 21 10:31 template_loader.py
-rw-rw-r--   1 pseudo.dwlee038 pseudo.dwlee038     0 Apr 21 10:31 __init__.py
drwxrwxr-x   2 pseudo.dwlee038 pseudo.dwlee038  4096 Apr 21 10:31 __pycache__
drwxrwxr-x   3 pseudo.dwlee038 pseudo.dwlee038  4096 Apr 21 10:31 .
drwxrwxr-x 437 pseudo.dwlee038 pseudo.dwlee038 20480 Apr 21 10:31 ..
  • 왜 md파일은 안생기는걸까요!?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 해당 코드를 받으신 이후 pip install . 을 해보셨을까요?
아니면, pip install -e .을 해서 새로 build가 필요할 것 같습니다.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 pip install -e . 로 진행하니 됩니다!

@DShomin
Copy link
Contributor

DShomin commented Apr 21, 2025

👍
💊prompt 사용법을 README에 추가하거나 별도의 READMD로 만드는 것도 좋을 것 같아요 👍
해당 내용은 제가 사용해보고 만들어 보도록 하겠습니다 😄

@ehddnr301 ehddnr301 merged commit c906aaa into master Apr 24, 2025
1 check passed
@nonegom nonegom deleted the feature/11-prompt-config branch May 6, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants