Skip to content

Commit ebce404

Browse files
committed
对话机器人增加当前阅读页的上下文信息,方便网页阅读时回答问题
1 parent d648727 commit ebce404

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

_layouts/default.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,7 @@ <h2 class="project-tagline">{{ site.description | default: site.github.project_t
605605
</script>
606606
{% endif %}
607607
<link href="https://cdn.jsdelivr.net/npm/@n8n/chat/dist/style.css" rel="stylesheet" />
608+
{% assign md_filename = page.path | split: '/' | last | split: '.' | first %}
608609
<script type="module">
609610
import { createChat } from 'https://cdn.jsdelivr.net/npm/@n8n/chat/dist/chat.bundle.es.js';
610611

@@ -615,7 +616,9 @@ <h2 class="project-tagline">{{ site.description | default: site.github.project_t
615616
chatInputKey: 'chatInput',
616617
chatSessionKey: 'sessionId',
617618
loadPreviousSession: true,
618-
metadata: {},
619+
metadata: {
620+
title: '{{ md_filename }}'
621+
},
619622
showWelcomeScreen: false,
620623
defaultLanguage: 'cn',
621624
initialMessages: [

0 commit comments

Comments
 (0)