{"id":24970187,"url":"https://github.com/lsjsj92/prompt-playground-lab","last_synced_at":"2025-04-16T07:56:31.195Z","repository":{"id":275400799,"uuid":"925892142","full_name":"lsjsj92/prompt-playground-lab","owner":"lsjsj92","description":"prompt tuning, management, playground lab(w/ Python Streamlit, FastAPI)","archived":false,"fork":false,"pushed_at":"2025-03-14T00:23:23.000Z","size":248,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T05:17:46.521Z","etag":null,"topics":["fastapi","large-language-models","llm","playground","prompt","prompt-engineering","prompt-tuning","python3","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lsjsj92.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-02T01:48:03.000Z","updated_at":"2025-03-17T07:12:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"af99ff74-4a2a-4011-9c52-de46e1f7a3ec","html_url":"https://github.com/lsjsj92/prompt-playground-lab","commit_stats":null,"previous_names":["lsjsj92/prompt-playground-lab"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsjsj92%2Fprompt-playground-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsjsj92%2Fprompt-playground-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsjsj92%2Fprompt-playground-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsjsj92%2Fprompt-playground-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lsjsj92","download_url":"https://codeload.github.com/lsjsj92/prompt-playground-lab/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249215991,"owners_count":21231525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","large-language-models","llm","playground","prompt","prompt-engineering","prompt-tuning","python3","streamlit"],"created_at":"2025-02-03T15:56:32.005Z","updated_at":"2025-04-16T07:56:31.166Z","avatar_url":"https://github.com/lsjsj92.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prompt-playground-lab  \nprompt tuning, management, playground lab(w/ Python Streamlit, FastAPI)\n\n# Project Structure  \n```bash  \nprompt-tuning/   \n│── app/     \n│   ├── main.py                 # FastAPI 메인 파일\n│   ├── db.py                   # MySQL 연결 및 테이블 자동 생성  \n│   ├── models.py               # ORM 모델 정의  \n│   ├── schemas.py              # API 스키마 정의  \n│   ├── crud.py                 # CRUD 함수 정의  \n│   ├── config.py               # 환경 변수 관리  \n│   ├── core/                   # 핵심 기능 모듈    \n│   │   ├── llm_service.py      # LLM API 호출 로직  \n│   ├── routers/                # API 라우터들  \n│   │   ├── __init__.py      \n│   │   ├── prompt.py           # 프롬프트 CRUD 라우터  \n│   │   ├── llm.py              # LLM 요청을 위한 라우터               \n│   │   ├── review.py           # LLM 요청을 위한 라우터             \n│── web/                  \n│   ├── pages/                    \n│   │   ├── info.py             # 정보 페이지  \n│   │   ├── add_prompt.py       # 프롬프트 추가 페이지  \n│   │   ├── manage_prompt.py    # 프롬프트 수정/삭제 페이지  \n│   │   ├── execute_prompt.py   # LLM 실행 페이지  \n│   │   ├── review_prompt.py    # 실행 이력 및 평가 페이지  \n│   ├── main.py                 # streamlit main 파일  \n│   ├── config.py               # streamit config 정보  \n│── .env                        # 환경변수 설정 파일  \n│── insert_test_data.sql        # MySQL 예제 데이터 추가  \n│── requirements.txt            # 라이브러리 목록  \n│── .gitignore                  # gitignore  \n```\n\n# How to use?\n\n![info](asset/info.png)   \n\n1. Install MySQL or MariaDB  \n    1-1. Set user  \n    1-2. Create database named 'prompt_db'  \n2. Set python env  \n3. Install python library(w/ requirements.txt)  \n4. Write .env  \n    4-1. Change the .env.tmp file name to .env  \n    4-2. Write content in .env  \n    '''   \n    DB_USER=    \n    DB_PASS=     \n    DB_HOST=    \n    DB_PORT=      \n    DB_NAME=    \n    OPENAI_API_KEY=    \n    OPENAI_MODEL=    \n    '''  \n5. Run fastapi server (Automatically proceed with database table setting)   \n    - uvicorn app.main:app --reload   \n    ![info](asset/api.png)   \n6. (OPTION, insert test data) mysql -u root -p \u003c insert_test_data.sql  \n7. Run streamlit server  \n    - streamlit run web/main.py --server.port 8501  \n\n# More detail\n- blog description: https://lsjsj92.tistory.com/679\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsjsj92%2Fprompt-playground-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flsjsj92%2Fprompt-playground-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsjsj92%2Fprompt-playground-lab/lists"}