Skip to content

Commit e15869b

Browse files
committed
Rename LLM API to Prompt and update routes
Move LLM API implementation and SQL helpers from app/api/llm to app/api/prompt, renaming llm.py to prompt.py and updating function names, route paths (/llm -> /prompt) and docstrings accordingly. Replace deleted app/api/llm/__init__.py with app/api/prompt/__init__.py that exposes the router, and update app/api/routes.py to import and include the new prompt router (remove old llm/gemini imports). SQL migration and helper scripts under llm/sql were relocated to prompt/sql with no functional changes.
1 parent 2b51a5c commit e15869b

15 files changed

Lines changed: 13 additions & 15 deletions

app/api/llm/__init__.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/api/prompt/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"""LLM Routes"""
2+
3+
from .prompt import router as llm_router
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
router = APIRouter()
88

9-
@router.get("/llm")
10-
def get_llm_records(
9+
@router.get("/prompt")
10+
def get_prompt_records(
1111
request: Request,
1212
page: int = Query(1, ge=1, description="Page number (1-based)"),
1313
page_size: int = Query(10, ge=1, le=100, description="Records per page"),
1414
prospect_id: int = Query(None, description="Filter by prospect_id"),
1515
api_key: str = Depends(get_api_key)
1616
) -> dict:
17-
"""GET /llm: Paginated list of LLM completions."""
17+
"""GET /prompt: Paginated list of prompt completions."""
1818
try:
1919
conn = get_db_connection_direct()
2020
cur = conn.cursor()
@@ -98,9 +98,9 @@ def get_llm_records(
9898
meta = make_meta("error", f"DB error: {str(e)}")
9999
return {"meta": meta, "data": {}}
100100

101-
@router.post("/llm")
101+
@router.post("/prompt")
102102
def llm_post(payload: dict) -> dict:
103-
"""POST /llm: send prompt to Gemini, returns completion google-genai SDK."""
103+
"""POST /prompt: send prompt to Gemini, returns completion google-genai SDK."""
104104
prompt = payload.get("prompt")
105105
prospect_id = payload.get("prospect_id")
106106
if not prompt:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)