File tree Expand file tree Collapse file tree 11 files changed +230
-0
lines changed
Expand file tree Collapse file tree 11 files changed +230
-0
lines changed Original file line number Diff line number Diff line change 1+ PORT = 5021
2+ HOST = 127.0.0.1
3+ OPENAI_API_KEY = your_openai_key_here
Original file line number Diff line number Diff line change 1+ .env
2+ __pycache__ /
3+ * .py [cod ]
4+ * $py.class
5+ * .so
6+ .Python
7+ venv /
8+ env /
9+ ENV /
10+ .venv
11+ * .log
12+ .DS_Store
Original file line number Diff line number Diff line change 1+ # Forensic CPA AI
2+
3+ A FastAPI-based forensic accounting and fraud detection service.
4+
5+ ## Setup
6+
7+ 1 . Install dependencies:
8+ ``` bash
9+ pip install -r requirements.txt
10+ ```
11+
12+ 2 . Copy ` .env.example ` to ` .env ` and configure:
13+ ``` bash
14+ cp .env.example .env
15+ ```
16+
17+ 3 . Run the service:
18+ ``` bash
19+ uvicorn app.main:app --host 127.0.0.1 --port 5021 --reload
20+ ```
21+
22+ ## API Endpoints
23+
24+ - ` GET / ` - Service info
25+ - ` GET /health ` - Health check
26+ - ` GET /api/analyze ` - Perform forensic analysis
Original file line number Diff line number Diff line change 1+ from fastapi import FastAPI
2+ from fastapi .middleware .cors import CORSMiddleware
3+
4+ app = FastAPI (title = "Forensic CPA AI" )
5+
6+ # Enable CORS
7+ app .add_middleware (
8+ CORSMiddleware ,
9+ allow_origins = ["*" ],
10+ allow_credentials = True ,
11+ allow_methods = ["*" ],
12+ allow_headers = ["*" ],
13+ )
14+
15+
16+ @app .get ("/" )
17+ async def root ():
18+ return {"message" : "Forensic CPA AI API" , "status" : "running" }
19+
20+
21+ @app .get ("/health" )
22+ async def health ():
23+ return {"status" : "healthy" }
24+
25+
26+ @app .get ("/api/analyze" )
27+ async def analyze ():
28+ return {
29+ "analysis" : "Sample forensic analysis endpoint" ,
30+ "capabilities" : [
31+ "Financial fraud detection" ,
32+ "Transaction anomaly detection" ,
33+ "Compliance monitoring"
34+ ]
35+ }
Original file line number Diff line number Diff line change 1+ fastapi == 0.104.1
2+ uvicorn [standard ]== 0.24.0
Original file line number Diff line number Diff line change 1+ PORT = 5020
2+ HOST = 127.0.0.1
3+ OPENAI_API_KEY = your_openai_key_here
Original file line number Diff line number Diff line change 1+ .env
2+ __pycache__ /
3+ * .py [cod ]
4+ * $py.class
5+ * .so
6+ .Python
7+ venv /
8+ env /
9+ ENV /
10+ .venv
11+ * .log
12+ .DS_Store
Original file line number Diff line number Diff line change 1+ # AI Financial Advisor
2+
3+ A FastAPI-based AI financial advisor service.
4+
5+ ## Setup
6+
7+ 1 . Install dependencies:
8+ ``` bash
9+ pip install -r requirements.txt
10+ ```
11+
12+ 2 . Copy ` .env.example ` to ` .env ` and configure:
13+ ``` bash
14+ cp .env.example .env
15+ ```
16+
17+ 3 . Run the service:
18+ ``` bash
19+ uvicorn app.main:app --host 127.0.0.1 --port 5020 --reload
20+ ```
21+
22+ ## API Endpoints
23+
24+ - ` GET / ` - Service info
25+ - ` GET /health ` - Health check
26+ - ` GET /api/advice ` - Get financial advice
Original file line number Diff line number Diff line change 1+ from fastapi import FastAPI
2+ from fastapi .middleware .cors import CORSMiddleware
3+
4+ app = FastAPI (title = "AI Financial Advisor" )
5+
6+ # Enable CORS
7+ app .add_middleware (
8+ CORSMiddleware ,
9+ allow_origins = ["*" ],
10+ allow_credentials = True ,
11+ allow_methods = ["*" ],
12+ allow_headers = ["*" ],
13+ )
14+
15+
16+ @app .get ("/" )
17+ async def root ():
18+ return {"message" : "AI Financial Advisor API" , "status" : "running" }
19+
20+
21+ @app .get ("/health" )
22+ async def health ():
23+ return {"status" : "healthy" }
24+
25+
26+ @app .get ("/api/advice" )
27+ async def get_advice ():
28+ return {
29+ "advice" : "Sample financial advice endpoint" ,
30+ "tips" : [
31+ "Diversify your portfolio" ,
32+ "Save for emergencies" ,
33+ "Invest for the long term"
34+ ]
35+ }
Original file line number Diff line number Diff line change 1+ fastapi == 0.104.1
2+ uvicorn [standard ]== 0.24.0
You can’t perform that action at this time.
0 commit comments