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
9d2e5f7d
Commit
9d2e5f7d
authored
Sep 27, 2024
by
于飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
非遗去掉relations标签
parent
78ee1f84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
13 deletions
+16
-13
chat.py
dbgpt/app/scene/chat_knowledge/v1/chat.py
+16
-13
No files found.
dbgpt/app/scene/chat_knowledge/v1/chat.py
View file @
9d2e5f7d
...
...
@@ -136,19 +136,22 @@ class ChatKnowledge(BaseChat):
last_output
=
output
yield
output
if
(
CFG
.
KNOWLEDGE_CHAT_SHOW_RELATIONS
and
last_output
and
type
(
self
.
relations
)
==
list
and
len
(
self
.
relations
)
>
0
and
hasattr
(
last_output
,
"text"
)
):
last_output
.
text
=
(
last_output
.
text
+
"
\n\n
relations:
\n\n
"
+
","
.
join
(
self
.
relations
)
)
reference
=
f
"
\n\n
{self.parse_source_view(self.chunks_with_score)}"
last_output
=
last_output
+
reference
yield
last_output
#if CFG.SELF_KNOWLEDGE_CHAT_SHOW_RELATIONS:
#非遗的代码先写死吧
if
self
.
knowledge_space
==
"非遗项目"
:
if
(
CFG
.
KNOWLEDGE_CHAT_SHOW_RELATIONS
and
last_output
and
type
(
self
.
relations
)
==
list
and
len
(
self
.
relations
)
>
0
and
hasattr
(
last_output
,
"text"
)
):
last_output
.
text
=
(
last_output
.
text
+
"
\n\n
relations:
\n\n
"
+
","
.
join
(
self
.
relations
)
)
reference
=
f
"
\n\n
{self.parse_source_view(self.chunks_with_score)}"
last_output
=
last_output
+
reference
yield
last_output
def
stream_call_reinforce_fn
(
self
,
text
):
"""return reference"""
...
...
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