Skip to content

Commit

Permalink
ci: Updated the langchain vectorstore test to reference the correct v…
Browse files Browse the repository at this point in the history
…ersion of `@langchain/core` getting tested (#2202)
  • Loading branch information
bizob2828 authored May 20, 2024
1 parent 8110d42 commit ed81852
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/versioned/langchain/vectorstore.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ const helper = require('../../lib/agent_helper')
const { removeModules } = require('../../lib/cache-buster')
// load the assertSegments assertion
require('../../lib/metrics_helper')
const { version: pkgVersion } = require('@langchain/core/package.json')
const fs = require('fs')
let pkgVersion
try {
;({ version: pkgVersion } = JSON.parse(
fs.readFileSync(
`${__dirname}/node_modules/@langchain/community/node_modules/@langchain/core/package.json`
)
))
} catch {
;({ version: pkgVersion } = require('@langchain/core/package.json'))
}
const createOpenAIMockServer = require('../openai/mock-server')
const { filterLangchainEvents, filterLangchainEventsByType } = require('./common')
const { DESTINATIONS } = require('../../../lib/config/attribute-filter')
Expand Down

0 comments on commit ed81852

Please sign in to comment.