Skip to content

TACO-FOR-ALL/GraphNode_AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphNode AI (GrapeNode_AI)

GraphNode 프로젝트의 AI 모듈 및 백엔드 서버입니다. 대화 데이터를 분석하여 지식 그래프(Knowledge Graph)를 생성합니다.

1. 환경 설정 (Environment Setup)

Python 3.8+ 환경이 필요합니다.

# 가상환경 생성 (선택사항)
python -m venv venv
source venv/bin/activate  # Linux/Mac
# venv\Scripts\activate  # Windows

# 의존성 설치
pip install -r Ky/requirements.txt

2. 폴더 구조 (Folder Structure)

GrapeNode_AI/
├── server/             # FastAPI 백엔드 서버
│   └── main.py         # 서버 진입점 (API 정의)
├── Ky/                 # AI 파이프라인 코어 로직
│   ├── src/            # 소스 코드
│   ├── config.yaml     # 설정 파일
│   └── requirements.txt
├── input_data/         # 분석 요청된 입력 데이터 저장소
├── output/             # 분석 결과 저장소
└── ...

3. FastAPI 서버 실행 (Running the Server)

서버는 uvicorn을 사용하여 실행합니다.

# 프로젝트 루트(GrapeNode_AI)에서 실행
uvicorn server.main:app --host 0.0.0.0 --port 8000 --reload
  • --host 0.0.0.0: 외부 접속 허용 (GPU 인스턴스 등에서 필요)
  • --reload: 코드 변경 시 자동 재시작 (개발 모드)

4. API 명세 (API Documentation)

1 분석 요청 (Start Analysis)

  • URL: /analysis
  • Method: POST
  • Body: JSON 파일 내용 (Raw Binary)
    • 주의: multipart/form-data가 아닌 Raw Binary로 전송해야 합니다.
  • Response:
    {
        "task_id": "uuid-string",
        "status": "queued"
    }

2 상태 조회 (Check Status)

  • URL: /status/{task_id}
  • Method: GET
  • Response:
    {
        "task_id": "uuid-string",
        "status": "queued" | "processing" | "completed" | "failed"
    }

3 결과 조회 (Get Result)

  • URL: /result/{task_id}
  • Method: GET
  • Response: 분석 결과 JSON (Graph Data)

5. AI 모듈 독립 실행 (Standalone Execution)

서버를 통하지 않고 AI 파이프라인만 독립적으로 테스트할 수 있습니다.

# 예시 명령어
python Ky/src/run_pipeline.py --input input_data/sample.json --config Ky/config.yaml --output-dir output/sample_result

About

TACO 4th Team Project - GraphNode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages