new (basic.gblib): auto-publish.
This commit is contained in:
parent
31ea62d526
commit
98ef0213ac
6 changed files with 10 additions and 7 deletions
|
@ -606,7 +606,7 @@ export class GBDeployer implements IGBDeployer {
|
|||
}
|
||||
|
||||
if (!GBConfigService.get('STORAGE_NAME')) {
|
||||
const filePath = path.join(GBConfigService.get('STORAGE_LIBRARY'), gbai);
|
||||
const filePath = path.join(GBConfigService.get('STORAGE_LIBRARY'), gbai, packageName);
|
||||
GBUtil.copyIfNewerRecursive(filePath, packageWorkFolder);
|
||||
} else {
|
||||
await this.downloadFolder(min, path.join('work', `${gbai}`), packageName);
|
||||
|
|
|
@ -1749,9 +1749,9 @@ await fs.writeFile(localFileName, buffer);
|
|||
private async watchPackages(min: GBMinInstance, packageType) {
|
||||
if (!GBConfigService.get('STORAGE_NAME')) {
|
||||
const packagePath = GBUtil.getGBAIPath(min.botId, packageType);
|
||||
const dirPath = path.join(GBConfigService.get('STORAGE_LIBRARY'), packagePath);
|
||||
const libraryPath = path.join(GBConfigService.get('STORAGE_LIBRARY'), packagePath);
|
||||
|
||||
const watcher = chokidar.watch(dirPath, {
|
||||
const watcher = chokidar.watch(libraryPath, {
|
||||
persistent: true,
|
||||
ignoreInitial: true, // Ignore initial add events
|
||||
depth: 99, // Watch subdirectories
|
||||
|
@ -1780,8 +1780,8 @@ await fs.writeFile(localFileName, buffer);
|
|||
if (this.recentChanges.size > 0) {
|
||||
|
||||
try {
|
||||
|
||||
await this.deployer.deployPackage2(min, null, dirPath);
|
||||
const workFolder = path.join('work', packagePath);
|
||||
await this.deployer.deployPackage2(min, null, workFolder, true);
|
||||
|
||||
} catch (error) {
|
||||
GBLogEx.error(min, `Error deploying package: ${GBUtil.toYAML(error)}`);
|
||||
|
|
|
@ -471,7 +471,7 @@ export class KBService implements IGBKBService {
|
|||
const answers = [];
|
||||
const questions = [];
|
||||
|
||||
GBLogEx.info(min, `Processing ${rows.length} rows from tabular file ${filePath}...`);
|
||||
GBLogEx.info(min, `Processing ${rows.length} rows from ${path.basename(filePath)}...`);
|
||||
await asyncPromise.eachSeries(rows, async line => {
|
||||
// Skips the first line.
|
||||
|
||||
|
@ -1370,7 +1370,7 @@ export class KBService implements IGBKBService {
|
|||
await fs.writeFile(packagePath, html, 'utf8');
|
||||
}
|
||||
|
||||
GBLogEx.info(min, `Done publishing of: ${localPath}.`);
|
||||
GBLogEx.info(min, `Done publishing of: ${path.basename(localPath)}.`);
|
||||
}
|
||||
|
||||
private async playAudio(
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{"2":42,"3":43,"4":44,"5":45,"6":46,"7":47,"8":48,"9":49,"10":50,"11":51,"12":52,"13":53,"14":54,"15":55,"16":56,"17":57,"18":58,"19":59,"20":60,"21":61,"22":62,"23":63,"24":64}
|
|
@ -0,0 +1 @@
|
|||
{"2":42,"3":43,"4":44}
|
|
@ -2,3 +2,4 @@ PARAM prompt as STRING LIKE "Generate a cat."
|
|||
DESCRIPTION Calls an artificial intelligence model to create an image. `prompt` parameter is a text description of the desired image.
|
||||
FIND
|
||||
RETURN "https://"
|
||||
|
Loading…
Add table
Reference in a new issue