refactor(docker): improve server architecture and configuration

Complete overhaul of Docker deployment setup with improved architecture:
- Add Redis integration for task management
- Implement rate limiting and security middleware
- Add Prometheus metrics and health checks
- Improve error handling and logging
- Add support for streaming responses
- Implement proper configuration management
- Add platform-specific optimizations for ARM64/AMD64

BREAKING CHANGE: Docker deployment now requires Redis and new config.yml structure
This commit is contained in:
UncleCode
2025-02-02 20:19:51 +08:00
parent 7b1ef07c41
commit 33a21d6a7a
16 changed files with 1918 additions and 344 deletions

View File

@@ -46,6 +46,7 @@ async def test_llm_filter():
provider="openai/gpt-4o",
api_token=os.getenv('OPENAI_API_KEY'),
chunk_token_threshold=2 ** 12 * 2, # 2048 * 2
ignore_cache = True,
instruction="""
Extract the main educational content while preserving its original wording and substance completely. Your task is to:
@@ -68,7 +69,7 @@ async def test_llm_filter():
)
# Apply filtering
filtered_content = filter.filter_content(html, ignore_cache = True)
filtered_content = filter.filter_content(html)
# Show results
print("\nFiltered Content Length:", len(filtered_content))