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:
@@ -47,11 +47,11 @@ data:
|
||||
port: 80
|
||||
weight: 100
|
||||
routes:
|
||||
- name: nginx-api-route
|
||||
- name: nginx-api-llm-route
|
||||
uris:
|
||||
- /api
|
||||
- /api/*
|
||||
priority: 10
|
||||
- /api/llm
|
||||
- /api/llm/*
|
||||
priority: 20
|
||||
plugins:
|
||||
{{- if .Values.api7.tls.enabled }}
|
||||
redirect:
|
||||
@@ -65,6 +65,25 @@ data:
|
||||
limit_strategy: {{ .Values.api7.plugins.aiRateLimit.limitStrategy | quote }}
|
||||
{{- end }}
|
||||
|
||||
- name: nginx-api-route
|
||||
uris:
|
||||
- /api
|
||||
- /api/*
|
||||
priority: 10
|
||||
plugins:
|
||||
{{- if .Values.api7.tls.enabled }}
|
||||
redirect:
|
||||
http_to_https: true
|
||||
{{- end }}
|
||||
{{- if .Values.api7.plugins.rateLimit.enabled }}
|
||||
limit-count:
|
||||
count: {{ .Values.api7.plugins.rateLimit.count }}
|
||||
time_window: {{ .Values.api7.plugins.rateLimit.timeWindow }}
|
||||
rejected_code: {{ .Values.api7.plugins.rateLimit.rejectedCode }}
|
||||
key_type: {{ .Values.api7.plugins.rateLimit.keyType | quote }}
|
||||
key: {{ .Values.api7.plugins.rateLimit.key | quote }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.api7.plugins.auth.enabled }}
|
||||
consumers:
|
||||
{{- range .Values.api7.consumers }}
|
||||
|
||||
Reference in New Issue
Block a user