fix(core.gbapp): Themes missing in PROD.
This commit is contained in:
parent
bdf5786aa5
commit
bb456cae11
3 changed files with 16 additions and 18 deletions
|
@ -712,7 +712,7 @@ export class GBDeployer implements IGBDeployer {
|
||||||
|
|
||||||
case '.gbtheme':
|
case '.gbtheme':
|
||||||
// Updates server listeners to serve theme files in .gbtheme.
|
// Updates server listeners to serve theme files in .gbtheme.
|
||||||
const filePath = path.join(GBConfigService.get('STORAGE_LIBRARY'), 'default.gbai', 'default.gbtheme');
|
const filePath = path.join(process.env.PWD, 'templates','default.gbai', 'default.gbtheme');
|
||||||
GBServer.globals.server.use('/' + urlJoin('themes', packageName), express.static( filePath));
|
GBServer.globals.server.use('/' + urlJoin('themes', packageName), express.static( filePath));
|
||||||
GBLogEx.verbose(min, `Theme (.gbtheme) assets accessible at: /themes/${packageName}.`);
|
GBLogEx.verbose(min, `Theme (.gbtheme) assets accessible at: /themes/${packageName}.`);
|
||||||
|
|
||||||
|
|
|
@ -134,11 +134,9 @@ export class GBLLMOutputParser extends BaseLLMOutputParser<ExpectedOutput> {
|
||||||
let res;
|
let res;
|
||||||
try {
|
try {
|
||||||
GBLogEx.info(this.min, result);
|
GBLogEx.info(this.min, result);
|
||||||
result = result.replace(/\u000A/g, '\n');
|
|
||||||
result = result.replace(/\\n/g, '\n');
|
|
||||||
result = result.replace(/\`\`\`/g, '');
|
|
||||||
res = JSON.parse(result);
|
res = JSON.parse(result);
|
||||||
} catch {
|
} catch (e) {
|
||||||
|
GBLogEx.verbose(this.min, `LLM JSON error: ${GBUtil.toYAML(e)}.`);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,15 +221,13 @@ export class ChatServices {
|
||||||
page = await ChatServices.findPageForText(metadata.source, doc.pageContent);
|
page = await ChatServices.findPageForText(metadata.source, doc.pageContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
output = `${output}\n\n\n\nUse also the following context which is coming from Source Document: ${filename} at page: ${
|
output = `${output}\n\n\n\nUse also the following context which is coming from Source Document: ${filename} at page: ${page ? page : 'entire document'
|
||||||
page ? page : 'entire document'
|
|
||||||
}
|
}
|
||||||
(you will fill the JSON sources collection field later),
|
(you will fill the JSON sources collection field later),
|
||||||
Ignore this block if it is an index or part of table of contents.
|
Ignore this block if it is an index or part of table of contents.
|
||||||
And memorize this block among document
|
And memorize this block among document
|
||||||
information and return when you
|
information and return when you
|
||||||
are refering this part of content:\n\n\n\n ${
|
are refering this part of content:\n\n\n\n ${doc.pageContent
|
||||||
doc.pageContent
|
|
||||||
} \n\n\n\n.`;
|
} \n\n\n\n.`;
|
||||||
}
|
}
|
||||||
return output;
|
return output;
|
||||||
|
@ -447,6 +443,7 @@ export class ChatServices {
|
||||||
- Ensure that no TOC with page numbering, indexing or summary information is included in your response.
|
- Ensure that no TOC with page numbering, indexing or summary information is included in your response.
|
||||||
- Double check that your response contains ONLY the JSON object before returning
|
- Double check that your response contains ONLY the JSON object before returning
|
||||||
- You sometimes return a formatted JSON surrounded by quotes like MD, DONT RETURN LIKE THIS, just valid JSON!
|
- You sometimes return a formatted JSON surrounded by quotes like MD, DONT RETURN LIKE THIS, just valid JSON!
|
||||||
|
- Do not use ENTER to format JSON, but keep ENTER char inside text tag.
|
||||||
|
|
||||||
Failure to follow these requirements exactly will result in an error.`;
|
Failure to follow these requirements exactly will result in an error.`;
|
||||||
|
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
Id,Name,Birthday,Email,Personalid,Address
|
Id,Name,Birthday,Email,Personalid,Address
|
||||||
|
lwkerderv,John Godf,12/12/2001,johng@fool.com.tg,12381239923,"Boulevard Street, 329"
|
|
Loading…
Add table
Reference in a new issue