This commit is contained in:
parent
91dcde9272
commit
15a7c53a08
|
|
@ -2,7 +2,7 @@
|
|||
Shared dependencies for API routes
|
||||
"""
|
||||
from fastapi import Depends
|
||||
from app.services.trading_service import TradingService, trading_service
|
||||
from backend.app.services.trading_service import TradingService, trading_service
|
||||
|
||||
|
||||
def get_trading_service() -> TradingService:
|
||||
|
|
|
|||
|
|
@ -5,15 +5,16 @@ from fastapi import APIRouter, Depends, HTTPException
|
|||
from datetime import datetime
|
||||
import logging
|
||||
|
||||
from app.models.schemas import (
|
||||
from backend.app.models.schemas import (
|
||||
AnalysisRequest,
|
||||
AnalysisResponse,
|
||||
ConfigResponse,
|
||||
HealthResponse,
|
||||
Ticker,
|
||||
)
|
||||
from app.services.trading_service import TradingService
|
||||
from app.api.dependencies import get_trading_service
|
||||
from app.core.config import settings
|
||||
from backend.app.services.trading_service import TradingService
|
||||
from backend.app.api.dependencies import get_trading_service
|
||||
from backend.app.core.config import settings
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
@ -54,7 +55,7 @@ async def run_analysis(
|
|||
logger.info(f"Received analysis request for {request.ticker} on {request.analysis_date}")
|
||||
|
||||
# Run analysis with all provided parameters including API keys
|
||||
result = await trading_service.run_analysis(
|
||||
result = await service.run_analysis(
|
||||
ticker=request.ticker,
|
||||
analysis_date=request.analysis_date,
|
||||
openai_api_key=request.openai_api_key,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
"""
|
||||
CORS configuration for TradingAgents Backend API
|
||||
CORS Configuration
|
||||
"""
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from app.core.config import settings
|
||||
|
||||
from backend.app.core.config import settings
|
||||
|
||||
|
||||
def setup_cors(app):
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ import logging
|
|||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from app.core.config import settings
|
||||
from app.core.cors import setup_cors
|
||||
from app.api.routes import router
|
||||
from backend.app.core.config import settings
|
||||
from backend.app.core.cors import setup_cors
|
||||
from backend.app.api.routes import router
|
||||
|
||||
# Configure logging
|
||||
logging.basicConfig(
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ sys.path.insert(0, str(Path(__file__).parent.parent.parent.parent))
|
|||
|
||||
from tradingagents.graph.trading_graph import TradingAgentsGraph
|
||||
from tradingagents.default_config import DEFAULT_CONFIG
|
||||
from app.core.config import settings
|
||||
from backend.app.core.config import settings
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue