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':
|
||||
// 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));
|
||||
GBLogEx.verbose(min, `Theme (.gbtheme) assets accessible at: /themes/${packageName}.`);
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ import {
|
|||
import { GBUtil } from '../../../src/util.js';
|
||||
import { z } from 'zod';
|
||||
import zodToJsonSchema from 'zod-to-json-schema';
|
||||
export interface CustomOutputParserFields {}
|
||||
export interface CustomOutputParserFields { }
|
||||
export type ExpectedOutput = any;
|
||||
|
||||
function isChatGeneration(llmOutput: ChatGeneration | Generation): llmOutput is ChatGeneration {
|
||||
|
@ -134,11 +134,9 @@ export class GBLLMOutputParser extends BaseLLMOutputParser<ExpectedOutput> {
|
|||
let res;
|
||||
try {
|
||||
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);
|
||||
} catch {
|
||||
} catch (e) {
|
||||
GBLogEx.verbose(this.min, `LLM JSON error: ${GBUtil.toYAML(e)}.`);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -223,15 +221,13 @@ export class ChatServices {
|
|||
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: ${
|
||||
page ? page : 'entire document'
|
||||
output = `${output}\n\n\n\nUse also the following context which is coming from Source Document: ${filename} at page: ${page ? page : 'entire document'
|
||||
}
|
||||
(you will fill the JSON sources collection field later),
|
||||
Ignore this block if it is an index or part of table of contents.
|
||||
And memorize this block among document
|
||||
information and return when you
|
||||
are refering this part of content:\n\n\n\n ${
|
||||
doc.pageContent
|
||||
are refering this part of content:\n\n\n\n ${doc.pageContent
|
||||
} \n\n\n\n.`;
|
||||
}
|
||||
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.
|
||||
- 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!
|
||||
- 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.`;
|
||||
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
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