Skip to content

Commit

Permalink
Additional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
spong committed Oct 16, 2023
1 parent 1ff738c commit 8a6ad54
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { DirectoryLoader } from 'langchain/document_loaders/fs/directory';
import { TextLoader } from 'langchain/document_loaders/fs/text';
import { join, resolve } from 'path';

import * as fs from 'fs';
import { ElasticsearchStore } from '../elasticsearch_store/elasticsearch_store';

/**
Expand All @@ -34,6 +35,12 @@ export const loadESQL = async (esStore: ElasticsearchStore, logger: Logger): Pro
logger.info(`esql_loader joinPath\n${joinPath}`);
logger.info(`esql_loader resolvePath\n${resolvePath}`);

if (fs.existsSync(resolvePath)) {
logger.info(`esql_loader the resolvePath exists`);
} else {
logger.info(`esql_loader the resolvePath does NOT exist`);
}

const languageLoader = new DirectoryLoader(
resolve(__dirname, '../../../knowledge_base/esql/language_definition'),
{
Expand Down

0 comments on commit 8a6ad54

Please sign in to comment.