stutiagrawal commited on
Commit
1def064
·
1 Parent(s): bbb543e

add middleware

Browse files
Files changed (4) hide show
  1. README.md +1 -0
  2. app/agents/ibm_client.py +1 -1
  3. app/main.py +12 -0
  4. data/.DS_Store +0 -0
README.md CHANGED
@@ -8,6 +8,7 @@
8
  5) **Summarizer (watsonx.ai LLM)** → executive summary + action items
9
 
10
  ## ✨ Why it matters
 
11
  High-stakes calls contain promises and metrics (SLA, compliance, finance). ClaimCheck.AI verifies statements against your **trusted KB** so decisions are grounded in facts—not memory.
12
  git branch -M main
13
  ---
 
8
  5) **Summarizer (watsonx.ai LLM)** → executive summary + action items
9
 
10
  ## ✨ Why it matters
11
+
12
  High-stakes calls contain promises and metrics (SLA, compliance, finance). ClaimCheck.AI verifies statements against your **trusted KB** so decisions are grounded in facts—not memory.
13
  git branch -M main
14
  ---
app/agents/ibm_client.py CHANGED
@@ -105,4 +105,4 @@ def _extract_json_block(text: str) -> Dict[str, Any]:
105
  def run_claim_extractor(transcript: str) -> Dict[str, Any]:
106
  payload = _build_payload(transcript)
107
  out_text = _post_generation(payload)
108
- return _extract_json_block(out_text) # -> {"claims":[...]}
 
105
  def run_claim_extractor(transcript: str) -> Dict[str, Any]:
106
  payload = _build_payload(transcript)
107
  out_text = _post_generation(payload)
108
+ return _extract_json_block(out_text)
app/main.py CHANGED
@@ -3,11 +3,23 @@ import os
3
  from fastapi import FastAPI
4
  from fastapi import Body
5
  from fastapi import UploadFile, File
 
6
  from app.core.orchestrator import process_call
7
  from app.core.ibm_sanity import sanity_embeddings, sanity_generation
8
 
9
  app = FastAPI(title="ClaimCheck")
10
 
 
 
 
 
 
 
 
 
 
 
 
11
  @app.get("/health")
12
  def health():
13
  return {"status": "ok", "service": "ClaimCheck"}
 
3
  from fastapi import FastAPI
4
  from fastapi import Body
5
  from fastapi import UploadFile, File
6
+ from fastapi.middleware.cors import CORSMiddleware
7
  from app.core.orchestrator import process_call
8
  from app.core.ibm_sanity import sanity_embeddings, sanity_generation
9
 
10
  app = FastAPI(title="ClaimCheck")
11
 
12
+ app.add_middleware(
13
+ CORSMiddleware,
14
+ allow_origins=[
15
+ "http://localhost:5173",
16
+ "http://127.0.0.1:5173",
17
+ ],
18
+ allow_credentials=True,
19
+ allow_methods=["*"],
20
+ allow_headers=["*"],
21
+ )
22
+
23
  @app.get("/health")
24
  def health():
25
  return {"status": "ok", "service": "ClaimCheck"}
data/.DS_Store ADDED
Binary file (6.15 kB). View file