mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 13:00:56 +03:00
add return source documents functioanality
This commit is contained in:
@@ -21,6 +21,7 @@ export interface IChatMessage {
|
||||
content: string
|
||||
chatflowid: string
|
||||
createdDate: Date
|
||||
sourceDocuments: string
|
||||
}
|
||||
|
||||
export interface IComponentNodes {
|
||||
|
||||
@@ -17,6 +17,9 @@ export class ChatMessage implements IChatMessage {
|
||||
@Column()
|
||||
content: string
|
||||
|
||||
@Column({ nullable: true })
|
||||
sourceDocuments: string
|
||||
|
||||
@CreateDateColumn()
|
||||
createdDate: Date
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export class App {
|
||||
const basicAuthMiddleware = basicAuth({
|
||||
users: { [username]: password }
|
||||
})
|
||||
const whitelistURLs = ['/api/v1/prediction/', '/api/v1/node-icon/']
|
||||
const whitelistURLs = ['/api/v1/prediction/', '/api/v1/node-icon/', '/api/v1/chatflows-streaming']
|
||||
this.app.use((req, res, next) => {
|
||||
if (req.url.includes('/api/v1/')) {
|
||||
whitelistURLs.some((url) => req.url.includes(url)) ? next() : basicAuthMiddleware(req, res, next)
|
||||
|
||||
Reference in New Issue
Block a user