Add conversation history support to chat API

- Added HISTORY_TURNS env variable
- Updated chat request data creation
- Modified server to handle history
- Added history to test cases
This commit is contained in:
yangdx
2025-01-25 22:14:40 +08:00
parent 06673b6fb2
commit fb9df50ada
3 changed files with 74 additions and 12 deletions

View File

@@ -43,6 +43,7 @@ MAX_ASYNC=4
MAX_TOKENS=32768
EMBEDDING_DIM=1024
MAX_EMBED_TOKENS=8192
#HISTORY_TURNS=3
# Security (empty for no key)
LIGHTRAG_API_KEY=your-secure-api-key-here