File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,17 @@ const helper = require('../../lib/agent_helper')
10
10
const { removeModules } = require ( '../../lib/cache-buster' )
11
11
// load the assertSegments assertion
12
12
require ( '../../lib/metrics_helper' )
13
- const { version : pkgVersion } = require ( '@langchain/core/package.json' )
13
+ const fs = require ( 'fs' )
14
+ let pkgVersion
15
+ try {
16
+ ; ( { version : pkgVersion } = JSON . parse (
17
+ fs . readFileSync (
18
+ `${ __dirname } /node_modules/@langchain/community/node_modules/@langchain/core/package.json`
19
+ )
20
+ ) )
21
+ } catch {
22
+ ; ( { version : pkgVersion } = require ( '@langchain/core/package.json' ) )
23
+ }
14
24
const createOpenAIMockServer = require ( '../openai/mock-server' )
15
25
const { filterLangchainEvents, filterLangchainEventsByType } = require ( './common' )
16
26
const { DESTINATIONS } = require ( '../../../lib/config/attribute-filter' )
You can’t perform that action at this time.
0 commit comments