Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
db_gpt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linyangyang
db_gpt
Commits
bb47c76f
Commit
bb47c76f
authored
Oct 11, 2024
by
于飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
是否是精确回答|例如:金旺的操作手册-->就不需要大模型回答了
parent
f37418c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
api_v1.py
dbgpt/app/openapi/api_v1/api_v1.py
+12
-0
api_v2.py
dbgpt/app/openapi/api_v2.py
+12
-0
No files found.
dbgpt/app/openapi/api_v1/api_v1.py
View file @
bb47c76f
...
...
@@ -387,6 +387,18 @@ async def chat_completions(
media_type
=
"text/plain"
,
)
#判断select_param是否是精确回答|例如:金旺的操作手册-->就不需要大模型回答了。
"""
if dialogue.select_param != "非遗项目":
print('这个知识库需要精确回答')
result = f" " #返回空的回答内容
return StreamingResponse(
stream_generator_sensitive(dialogue.incremental, result),
headers=headers,
media_type="text/plain",
)
"""
domain_type
=
_parse_domain_type
(
dialogue
)
if
dialogue
.
chat_mode
==
ChatScene
.
ChatAgent
.
value
():
return
StreamingResponse
(
...
...
dbgpt/app/openapi/api_v2.py
View file @
bb47c76f
...
...
@@ -115,6 +115,18 @@ async def chat_completions(
media_type
=
"text/plain"
,
)
# 判断select_param是否是精确回答|例如:金旺的操作手册-->就不需要大模型回答了。
"""
if request.knowledge_space != "非遗项目":
print('这个知识库需要精确回答')
result = f" " #返回空的回答内容
return StreamingResponse(
stream_generator_sensitive(request.incremental, result),
headers=headers,
media_type="text/plain",
)
"""
# check chat request
check_chat_request
(
request
)
if
request
.
conv_uid
is
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment