feat(generation): score articles with selected relevance model (#48)
This commit is contained in:
@ -68,12 +68,16 @@ export function readStackManifest() {
|
||||
if (!manifest.bootstrapAdmin?.email || !manifest.bootstrapAdmin?.password) {
|
||||
throw new Error('E2E fake stack manifest must provide disposable bootstrap admin credentials.')
|
||||
}
|
||||
for (const field of ['companyQuery', 'companyID', 'companyName', 'companySymbol', 'companyFIGI', 'summaryModelID', 'summarySentinel', 'articleTitle', 'articleURL', 'articleContent', 'candidateID']) {
|
||||
for (const field of ['companyQuery', 'companyID', 'companyName', 'companySymbol', 'companyFIGI', 'summaryModelID', 'rankingModelID', 'rankingModelName', 'summarySentinel', 'articleTitle', 'articleURL', 'articleContent', 'candidateID']) {
|
||||
if (typeof manifest.fixtures?.[field] !== 'string' || !manifest.fixtures[field]) {
|
||||
throw new Error(`E2E fake stack manifest is missing fixtures.${field}.`)
|
||||
}
|
||||
}
|
||||
|
||||
if (manifest.fixtures.rankingCapability?.selectable !== true || manifest.fixtures.rankingCapability?.mode !== 'json_schema') {
|
||||
throw new Error('E2E fake stack manifest must provide a compatible structured ranking capability.')
|
||||
}
|
||||
|
||||
const databaseURL = new URL(manifest.databaseUrl)
|
||||
const databaseName = decodeURIComponent(databaseURL.pathname.replace(/^\//, ''))
|
||||
if (!/(^|[-_])(e2e|test)([-_]|$)/i.test(databaseName)) {
|
||||
|
||||
Reference in New Issue
Block a user