Show knowledge sources and pass readable passages to chat
This commit is contained in:
@@ -50,7 +50,7 @@ class Handler(BaseHTTPRequestHandler):
|
||||
if self.path == '/chat-tools/api/chat':
|
||||
system, user = message['messages']
|
||||
valid = (system['role'] == 'system' and 'fixture/visible-repo' in system['content']
|
||||
and 'source: knowledge.md' in system['content']
|
||||
and 'Source: knowledge.md' in system['content']
|
||||
and user == {'role': 'user', 'content': 'can you see my git repos'})
|
||||
if not valid:
|
||||
self.reply(400)
|
||||
|
||||
Reference in New Issue
Block a user