fix merge
Browse files
lightrag/api/lightrag_server.py
CHANGED
@@ -16,6 +16,7 @@ import argparse
|
|
16 |
from typing import List, Any, Literal, Optional, Dict
|
17 |
from pydantic import BaseModel, Field, field_validator
|
18 |
from lightrag import LightRAG, QueryParam
|
|
|
19 |
from lightrag.types import GPTKeywordExtractionFormat
|
20 |
from lightrag.api import __api_version__
|
21 |
from lightrag.utils import EmbeddingFunc
|
@@ -702,7 +703,7 @@ class QueryRequest(BaseModel):
|
|
702 |
)
|
703 |
|
704 |
history_turns: Optional[int] = Field(
|
705 |
-
ge=0
|
706 |
default=None,
|
707 |
description="Number of complete conversation turns (user-assistant pairs) to consider in the response context.",
|
708 |
)
|
@@ -802,7 +803,6 @@ class DocsStatusesResponse(BaseModel):
|
|
802 |
statuses: Dict[DocStatus, List[DocStatusResponse]] = {}
|
803 |
|
804 |
|
805 |
-
|
806 |
def get_api_key_dependency(api_key: Optional[str]):
|
807 |
if not api_key:
|
808 |
# If no API key is configured, return a dummy dependency that always succeeds
|
|
|
16 |
from typing import List, Any, Literal, Optional, Dict
|
17 |
from pydantic import BaseModel, Field, field_validator
|
18 |
from lightrag import LightRAG, QueryParam
|
19 |
+
from lightrag.base import DocProcessingStatus, DocStatus
|
20 |
from lightrag.types import GPTKeywordExtractionFormat
|
21 |
from lightrag.api import __api_version__
|
22 |
from lightrag.utils import EmbeddingFunc
|
|
|
703 |
)
|
704 |
|
705 |
history_turns: Optional[int] = Field(
|
706 |
+
ge=0,
|
707 |
default=None,
|
708 |
description="Number of complete conversation turns (user-assistant pairs) to consider in the response context.",
|
709 |
)
|
|
|
803 |
statuses: Dict[DocStatus, List[DocStatusResponse]] = {}
|
804 |
|
805 |
|
|
|
806 |
def get_api_key_dependency(api_key: Optional[str]):
|
807 |
if not api_key:
|
808 |
# If no API key is configured, return a dummy dependency that always succeeds
|