Eng-Musa commited on
Commit
6def678
·
1 Parent(s): 69ae982

code clean up

Browse files
__pycache__/main.cpython-312.pyc CHANGED
Binary files a/__pycache__/main.cpython-312.pyc and b/__pycache__/main.cpython-312.pyc differ
 
clients/__pycache__/groq_client.cpython-312.pyc CHANGED
Binary files a/clients/__pycache__/groq_client.cpython-312.pyc and b/clients/__pycache__/groq_client.cpython-312.pyc differ
 
clients/groq_client.py CHANGED
@@ -1,5 +1,3 @@
1
- # clients/groq_client.py
2
-
3
  import os
4
  import json
5
  from uuid import uuid4
@@ -22,7 +20,7 @@ load_dotenv(dotenv_path=".secrets.env", override=True)
22
 
23
  # Config
24
  GROQ_API_KEY = os.getenv("GROQ_API_KEY")
25
- DATA_PATH = "data.json" # relative to root, so this works if run from root
26
  CHROMA_PATH = "chroma_db"
27
 
28
  TEMPERATURE = float(os.getenv("G_TEMPERATURE", 0.7))
 
 
 
1
  import os
2
  import json
3
  from uuid import uuid4
 
20
 
21
  # Config
22
  GROQ_API_KEY = os.getenv("GROQ_API_KEY")
23
+ DATA_PATH = "data.json"
24
  CHROMA_PATH = "chroma_db"
25
 
26
  TEMPERATURE = float(os.getenv("G_TEMPERATURE", 0.7))
main.py CHANGED
@@ -7,7 +7,7 @@ from clients.groq_client import GroqClient
7
  app = FastAPI()
8
 
9
 
10
- # ✅ Allowed origins
11
  origins = [
12
  "http://localhost:4200",
13
  "https://mosesmangabo.vercel.app",
@@ -19,7 +19,7 @@ app.add_middleware(
19
  CORSMiddleware,
20
  allow_origins=origins,
21
  allow_credentials=True,
22
- allow_methods=["*"], # allow all HTTP methods (GET, POST, etc.)
23
  allow_headers=["*"], # allow all headers
24
  )
25
 
 
7
  app = FastAPI()
8
 
9
 
10
+ # Allowed origins
11
  origins = [
12
  "http://localhost:4200",
13
  "https://mosesmangabo.vercel.app",
 
19
  CORSMiddleware,
20
  allow_origins=origins,
21
  allow_credentials=True,
22
+ allow_methods=["*"], # allow all HTTP methods (GET, POST, ...)
23
  allow_headers=["*"], # allow all headers
24
  )
25