Add LLM endpoints, web frontend, and rate limiting config
- Added OpenAI-compatible LLM endpoints to API backend - Introduced web frontend with Jinja2 templates and static assets - Implemented API proxy routes in web service - Added sample db.json data for items, users, orders, reviews, categories, llm_requests - Updated ADC and Helm configs for separate AI and standard rate limiting - Upgraded FastAPI, Uvicorn, and added httpx, Jinja2, python-multipart dependencies - Added API configuration modal and client-side JS for web app
This commit is contained in:
34
adc.yaml
34
adc.yaml
@@ -17,7 +17,7 @@ services:
|
||||
vars:
|
||||
- - uri
|
||||
- "~~"
|
||||
- "^(?!/api)"
|
||||
- "^(?!/api|/docs)"
|
||||
priority: 1
|
||||
plugins:
|
||||
redirect:
|
||||
@@ -35,11 +35,20 @@ services:
|
||||
port: 80
|
||||
weight: 100
|
||||
routes:
|
||||
- name: nginx-api-route
|
||||
- name: nginx-api-docs-route
|
||||
uris:
|
||||
- /api
|
||||
- /api/*
|
||||
priority: 10
|
||||
- /docs
|
||||
- /docs/*
|
||||
priority: 30
|
||||
plugins:
|
||||
redirect:
|
||||
http_to_https: true
|
||||
|
||||
- name: nginx-api-llm-route
|
||||
uris:
|
||||
- /api/llm
|
||||
- /api/llm/*
|
||||
priority: 20
|
||||
plugins:
|
||||
redirect:
|
||||
http_to_https: true
|
||||
@@ -48,3 +57,18 @@ services:
|
||||
time_window: 60
|
||||
rejected_code: 429
|
||||
limit_strategy: "total_tokens"
|
||||
|
||||
- name: nginx-api-route
|
||||
uris:
|
||||
- /api
|
||||
- /api/*
|
||||
priority: 10
|
||||
plugins:
|
||||
redirect:
|
||||
http_to_https: true
|
||||
limit-count:
|
||||
count: 100
|
||||
time_window: 60
|
||||
rejected_code: 429
|
||||
key_type: "var"
|
||||
key: "remote_addr"
|
||||
|
||||
Reference in New Issue
Block a user