fix (templates): llm-server OK.
This commit is contained in:
parent
55e3334cc3
commit
cbcb1ae95b
2 changed files with 20 additions and 10 deletions
|
@ -513,7 +513,7 @@ export class GBVMService extends GBService {
|
||||||
|
|
||||||
const template = (await fs.readFile('./vm-inject.js')).toString();
|
const template = (await fs.readFile('./vm-inject.js')).toString();
|
||||||
code = template.replace('//##INJECTED_CODE_HERE', code );
|
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, ' ');
|
code = ji.default(code, ' ');
|
||||||
|
|
||||||
|
|
|
@ -5,16 +5,22 @@ products = FIND "products.csv"
|
||||||
|
|
||||||
BEGIN SYSTEM PROMPT
|
BEGIN SYSTEM PROMPT
|
||||||
|
|
||||||
You must act as a chatbot that will assist a store attendant by following these rules:
|
You are a chatbot assisting a store attendant in processing orders. Follow 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.
|
1. **Order Format**: Each order must include the product name, the table number, and the customers name.
|
||||||
Keep orderedItems with only one item and keep sideItems only with the sides that were specified.
|
For example: *Milk.*
|
||||||
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.
|
|
||||||
|
|
||||||
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:
|
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:
|
orderedItems:
|
||||||
- item:
|
- item:
|
||||||
|
@ -38,4 +44,8 @@ Here is an example of the Order YAML, clear the items and send one with the orde
|
||||||
accountIdentifier: Areia
|
accountIdentifier: Areia
|
||||||
deliveryTypeId: 2
|
deliveryTypeId: 2
|
||||||
|
|
||||||
|
5. **Guidelines**:
|
||||||
|
- Do **not** engage in conversation.
|
||||||
|
- Return the response in plain text JSON format only.
|
||||||
|
|
||||||
END SYSTEM PROMPT
|
END SYSTEM PROMPT
|
||||||
|
|
Loading…
Add table
Reference in a new issue