Skip to content

Commit 0382133

Browse files
authored
Merge pull request #8 from Cotatus/feat/1-module
Refactor: MCP 제거 및 Spring API 연동으로 변경
2 parents 3a29548 + 8ef1ee3 commit 0382133

File tree

22 files changed

+299
-205
lines changed

22 files changed

+299
-205
lines changed

sentiment-monitoring/agents/sentiment_agent.py

Lines changed: 0 additions & 22 deletions
This file was deleted.

sentiment-monitoring/core/schemas.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

sentiment-monitoring/llm/sentiment_llm.py

Lines changed: 0 additions & 64 deletions
This file was deleted.

sentiment-monitoring/pipelines/anomaly_pipeline.py

Lines changed: 0 additions & 33 deletions
This file was deleted.

sentiment-monitoring/pipelines/sentiment_pipeline.py

Lines changed: 0 additions & 34 deletions
This file was deleted.

sentiment-monitoring/tools/storage_tool.py

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
from sentiment_monitoring.pipelines.sentiment_pipeline import run_sentiment_pipeline
2+
from sentiment_monitoring.core.schemas import SentimentResult
3+
from sentiment_monitoring.core.exceptions import InvalidNewsText
4+
5+
6+
class SentimentAgent:
7+
"""
8+
Sentiment Monitoring Agent
9+
외부 시스템(Spring)에서 호출되며
10+
내부 파이프라인을 실행하는 진입점 역할만 수행한다.
11+
"""
12+
13+
async def handle_news_sentiment(
14+
self,
15+
coin: str,
16+
news_text: str
17+
) -> SentimentResult:
18+
if not coin or not coin.strip():
19+
raise InvalidNewsText("coin must not be empty")
20+
21+
if not news_text or not news_text.strip():
22+
raise InvalidNewsText("news_text must not be empty")
23+
24+
return await run_sentiment_pipeline(coin, news_text)
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ class Settings(BaseSettings):
88
history_window_size: int = 10
99
# 절대 부정 임계값: 이 값 이하면 무조건 이상으로 판단
1010
absolute_negative_threshold: float = -0.6
11-
# 히스토리 최대 저장 개수
12-
max_history_size: int = 100
11+
12+
# Spring API 설정 (Docker Compose 내부 네트워크)
13+
spring_api_base_url: str = "http://cotatus-app:8080"
14+
spring_api_timeout: int = 30
1315

1416
class Config:
1517
env_prefix = "SENTIMENT_"

0 commit comments

Comments
 (0)