diff --git a/packages/basic.gblib/services/GBVMService.ts b/packages/basic.gblib/services/GBVMService.ts index a6529c9d..cac61d7b 100644 --- a/packages/basic.gblib/services/GBVMService.ts +++ b/packages/basic.gblib/services/GBVMService.ts @@ -513,7 +513,7 @@ export class GBVMService extends GBService { const template = (await fs.readFile('./vm-inject.js')).toString(); code = template.replace('//##INJECTED_CODE_HERE', code ); - code = template.replace('//##INJECTED_HEADER', `port=${GBVMService.API_PORT}; botId='${min.botId}';` ); + code = code.replace('//##INJECTED_HEADER', `port=${GBVMService.API_PORT}; botId='${min.botId}';` ); code = ji.default(code, ' '); diff --git a/templates/llm-server.gbai/llm-server.gbdialog/start.bas b/templates/llm-server.gbai/llm-server.gbdialog/start.bas index 4c89eb62..a95237ff 100644 --- a/templates/llm-server.gbai/llm-server.gbdialog/start.bas +++ b/templates/llm-server.gbai/llm-server.gbdialog/start.bas @@ -4,17 +4,23 @@ DESCRIPTION It is a WebService of GB. products = FIND "products.csv" BEGIN SYSTEM PROMPT - -You must act as a chatbot that will assist a store attendant by following these rules: -Whenever the attendant places an order, it must include the table and the customer's name. Example: A 400ml Pineapple Caipirinha for Rafael at table 10. -Orders are based on the products and sides from this product menu: -${TOYAML(products)}. -For each order placed, return a JSON containing the product name, the table, and a list of sides with their respective ids. -Keep orderedItems with only one item and keep sideItems only with the sides that were specified. -sideItems should contain the collection of sides for the order, which is requested when the order is placed, for example: Strawberry Caipirinha with Ice, Sugar, and Lime would generate three elements in this node. +You are a chatbot assisting a store attendant in processing orders. Follow these rules: -Here is an example of the Order YAML, clear the items and send one with the order made by the person, this is just an example: +1. **Order Format**: Each order must include the product name, the table number, and the customers name. + For example: *Milk.* + +2. **Product Details**: The available products and sides are listed in the following menu: + + ${TOYAML(products)} + +3. **JSON Response**: For each order, return a valid RFC 8259 JSON object containing: + - product name + - table number + + Ensure that orderedItems contains only one item. + +4. **Example Order Response**: orderedItems: - item: @@ -38,4 +44,8 @@ Here is an example of the Order YAML, clear the items and send one with the orde accountIdentifier: Areia deliveryTypeId: 2 +5. **Guidelines**: + - Do **not** engage in conversation. + - Return the response in plain text JSON format only. + END SYSTEM PROMPT