Skip to content

Commit

Permalink
change KnowledgeQueryResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
0sengseng0 committed Feb 26, 2024
1 parent 2ecf38b commit 3ee87f6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dbgpt/app/knowledge/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
EntityExtractRequest,
KnowledgeDocumentRequest,
KnowledgeQueryRequest,
KnowledgeQueryResponse,
KnowledgeSpaceRequest,
KnowledgeSyncRequest,
SpaceArgumentRequest,
)
from dbgpt.app.knowledge.request.response import KnowledgeQueryResponse
from dbgpt.app.knowledge.service import KnowledgeService
from dbgpt.app.openapi.api_v1.api_v1 import no_stream_generator, stream_generator
from dbgpt.app.openapi.api_view_model import Result
Expand Down
10 changes: 0 additions & 10 deletions dbgpt/app/knowledge/request/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,6 @@ class ChunkQueryRequest(BaseModel):
page_size: int = 20


class KnowledgeQueryResponse:
"""source: knowledge reference source"""

source: str
"""score: knowledge vector query similarity score"""
score: float = 0.0
"""text: raw text info"""
text: str


class SpaceArgumentRequest(BaseModel):
"""argument: argument"""

Expand Down
10 changes: 10 additions & 0 deletions dbgpt/app/knowledge/request/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,13 @@ class SpaceQueryResponse(BaseModel):
gmt_modified: str = None
"""doc_count: doc_count"""
docs: int = None


class KnowledgeQueryResponse(BaseModel):
"""source: knowledge reference source"""

source: str
"""score: knowledge vector query similarity score"""
score: float = 0.0
"""text: raw text info"""
text: str

0 comments on commit 3ee87f6

Please sign in to comment.