Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change KnowledgeQueryResponse #1202

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading