From e004703380104bcde27feee7d1ca1d60ee6911ee Mon Sep 17 00:00:00 2001 From: Vackam <53655740+Vackam@users.noreply.github.com> Date: Fri, 19 Jul 2024 01:07:14 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=ED=94=84=EB=A1=AC=ED=94=84=ED=8A=B8=20?= =?UTF-8?q?=EA=B0=84=EB=8B=A8=ED=9E=88=20=EC=88=98=EC=A0=95=20(#119)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 기사 재생성 LLM 요청 프로토타입 #25 (#36) * 환경변수 파일 ignore 추가 * python-dotenv 의존성 추가 - .env 파일 * get_platform_client 생성 * 네이밍 수정 * 쉬운 기사 변환 프로토타입 생성 * 프롬프트 버저닝 및 txt파일로 분리 * ai 요청 결과를 json으로 파싱 * 링크를 넣으면 크롤링 해서 새로운 쉬운 기사로 생성하여 DB에 저장 * 수정 --------- Co-authored-by: 정지민 <108014449+stopmin@users.noreply.github.com> Co-authored-by: Vackam --- .../prompt/graphic_article/2024-07-10.txt | 52 +++++-------------- 1 file changed, 14 insertions(+), 38 deletions(-) diff --git a/app/model/prompt/graphic_article/2024-07-10.txt b/app/model/prompt/graphic_article/2024-07-10.txt index 211c939..22598e0 100644 --- a/app/model/prompt/graphic_article/2024-07-10.txt +++ b/app/model/prompt/graphic_article/2024-07-10.txt @@ -1,45 +1,21 @@ -You are provided with a summary of a dataset and the title of a news article. Suggest a suitable graph type for visualizing the data using plotly, including necessary preprocessing steps and additional keyword arguments. Also, create the body text of the article based on the visualization. Use only the column names provided in the summary for x_value and y_value. Follow the specified graph types and preprocessing steps only. +You are provided with a summary of a dataset and the title of a easy news article. Suggest a suitable graph type for visualizing the data using plotly, including necessary preprocessing steps and additional keyword arguments. +Also, create the body text of the article based on the visualization. +Use only the column names provided in the summary for x_value and y_value. Follow the specified graph types and preprocessing steps only. Valid graph types: bar, line, pie, histogram, scatter, choropleth, funnel Valid preprocessing steps: melt, pivot, groupby, filter, drop, replace, merge, sort +"Also, create the body text of the article based on the visualization, which must be over five lines, each separated by '\n', include an 이모티콘 on each line, and be written in a friendly '해요' style." -You should respond in JSON format. +Responses should be in JSON format. Response format: { - "graph_type": "valid_graph_type", - "x_value": "x_value_name", - "y_value": "y_value_name", - "preprocessing_steps": [ - { - "type": "valid_preprocessing_type", - "params": {"key": "value", ...} - }, - ... - ] or null, - "kwargs": { - "key": "value", - ... - } or null, - "article": { - "body": "Detailed article body based on the data visualization, it must be Korean" - } -} - -Example: -{ - "graph_type": "bar", - "x_value": "category", - "y_value": "count", - "preprocessing_steps": [ - { - "type": "groupby", - "params": {"by": ["category"], "agg_func": {"count": "sum"}} - } - ], - "kwargs": { - "color": "blue" - }, - "article": { - "body": "의대생 중 95%나 되는 인원이 시험을 치지 않겠다고 선언했어요!" - } + "graph_type": "valid_graph_type", + "x_value": "x_value_name", + "y_value": "y_value_name", + "preprocessing_steps": + [ { "type": "valid_preprocessing_type", "params": {"key": "value", ...} }, ... ] or null, + "kwargs": { "key": "value", ... } or null, + "article": { + "body": 매일의 판매액을 한눈에 볼 수 있게 했어요 📈\n매출 데이터는 날짜별로 그룹화했어요 🗓️\n날짜 순서대로 정렬했어요 📅\n그래프에서 각 날짜의 판매액을 확인할 수 있어요 🛒\n이제 일별 매출 트렌드를 알 수 있어요 😊 + } } From a0b1e11de09b31dc41cf20fc8a72f7cc3115151c Mon Sep 17 00:00:00 2001 From: stopmin Date: Fri, 19 Jul 2024 01:44:44 +0900 Subject: [PATCH 2/2] =?UTF-8?q?ecs=20=EC=9C=84=EC=B9=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-ecs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-ecs.yml b/.github/workflows/deploy-ecs.yml index 7bc7901..2dfd9ab 100644 --- a/.github/workflows/deploy-ecs.yml +++ b/.github/workflows/deploy-ecs.yml @@ -12,7 +12,7 @@ env: AWS_REGION: ap-northeast-2 # AWS region 설정 ECR_REPOSITORY: gyeongdan-fastapi # Amazon ECR repository 이름 ECS_SERVICE: GyeongdanFastAPI # Amazon ECS 서비스 이름 - ECS_CLUSTER: Gyeongdan # Amazon ECS 클러스터 이름 + ECS_CLUSTER: Gyeongdan-v2 # Amazon ECS 클러스터 이름 ECS_TASK_DEFINITION: tf-staging.json # Amazon ECS task definition 파일 경로 CONTAINER_NAME: FastAPI # 컨테이너 이름 PROGRESS_SLACK_CHANNEL: C07BRCDNBMF # Slack 채널 ID