add user id

feature/LangfuseUserId
Henry 2023-11-17 16:41:49 +00:00
parent fadbffcac3
commit 3bddc95087
2 changed files with 2 additions and 1 deletions

View File

@ -49,7 +49,7 @@
"html-to-text": "^9.0.5",
"ioredis": "^5.3.2",
"langchain": "^0.0.165",
"langfuse-langchain": "^1.0.14-alpha.0",
"langfuse-langchain": "^1.0.31",
"langsmith": "^0.0.32",
"linkifyjs": "^4.1.1",
"llmonitor": "^0.5.5",

View File

@ -250,6 +250,7 @@ export const additionalCallbacks = async (nodeData: INodeData, options: ICommonO
baseUrl: langFuseEndpoint ?? 'https://cloud.langfuse.com'
}
if (release) langFuseOptions.release = release
if (options.chatId) langFuseOptions.userId = options.chatId
const handler = new CallbackHandler(langFuseOptions)
callbacks.push(handler)