kbot deep rat

This commit is contained in:
lovebird 2025-03-25 12:21:26 +01:00
parent 167948de72
commit 147634a9cd
8 changed files with 19 additions and 13 deletions

View File

@ -23,7 +23,7 @@
"format": "unix-time"
}
],
"default": "2025-03-24T19:56:52.552Z"
"default": "2025-03-25T10:04:33.286Z"
},
"description": {
"type": "string",

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
"messages": [
{
"role": "user",
"content": "use a formal tone\nspell check the text, fix any errors\nremove emojis\nremove personal preferences or biases\nshorten text if possible but preserve personality\nremove references to preciousplastic, bazar and Discord\nremove any brain/green washing as well suggestions not related to the craft\nContext: howto tutorials, for makers\nConvert units, from metric to imperial and vice versa (in braces)\ndont comment just return as Markdown : # Resources\n\n ### Skills Developed or Improved\n\n- **Recycling and Waste Management**: Understanding the process of collecting, sorting, and processing marine litter and fishing nets for reuse.\n \n- **Material Science and Engineering**: Learning about the properties of polypropylene and how to combine it with recycled materials for optimal texture and color.\n\n- **Manufacturing Process Operation**: Gaining hands-on experience with industrial equipment such as an industrial dryer and modified sheetpress for board production.\n\n- **Prototyping and Product Design**: Developing the ability to design and produce functional and decorative products from recycled materials.\n\n- **Project Management**: Collaborating with different entities (Vertidos Cero Association and AIMPLAS) and managing resources efficiently to support a circular economy initiative."
"content": "use a formal tone\nspell check the text, fix any errors\nremove emojis\nremove personal preferences or biases\nshorten text if possible but preserve personality\nremove references to preciousplastic, bazar and Discord\nremove any brain/green washing, eg: sustainble, circular, recycling ... enflated prospects\nContext: howto tutorials, for makers\nConvert units, from metric to imperial and vice versa (in braces)\ndont comment just return as Markdown : # Resources\n\n ### Tools\n\n- Laser cutter\n- Reamer tool\n- Heating element\n- Welder\n- KWh meter\n\n### Software\n\n- Circuit diagram update tools\n\n### Hardware\n\n- Aluminium blocks\n- Sheet metal\n- Steel tubes\n- Signal lights\n- Ceramic fuses\n## Articles\n- [Sheet Metal Bending Process Guide](<a class=\"text-orange-600 underline\" href=\"https://www.accurl.com/blog/sheet-metal-bending/)\" target=\"_blank\" rel=\"noopener noreferrer\">accurl.com/blog/sheet-metal-bending/)</a> \n- [Plastic Laser Cutting Techniques](<a class=\"text-orange-600 underline\" href=\"https://www.accurl.com/blog/laser-cutting-plastic/)\" target=\"_blank\" rel=\"noopener noreferrer\">accurl.com/blog/laser-cutting-plastic/)</a> \n- [HDPE Recycling Methods](<a class=\"text-orange-600 underline\" href=\"https://www.businesswaste.co.uk/your-waste/plastic-recycling/hdpe-recycling/)\" target=\"_blank\" rel=\"noopener noreferrer\">businesswaste.co.uk/your-waste/plastic-recycling/hdpe-recycling/)</a> \n- [Sheet Metal Bending Basics](<a class=\"text-orange-600 underline\" href=\"https://www.makerverse.com/resources/sheet-metal/bending-basics-for-sheet-metal-fabrication/)\" target=\"_blank\" rel=\"noopener noreferrer\">makerverse.com/resources/sheet-metal/bending-basics-for-sheet-metal-fabrication/)</a> \n- [BOM Creation Guide](<a class=\"text-orange-600 underline\" href=\"https://www.eziil.com/how-to-create-bill-of-materials/)\" target=\"_blank\" rel=\"noopener noreferrer\">eziil.com/how-to-create-bill-of-materials/)</a> \n\n## Books\n- [Sheet Metal Bending: Operational Techniques](<a class=\"text-orange-600 underline\" href=\"https://books.apple.com/us/book/sheet-metal-bending/id1456730785)\" target=\"_blank\" rel=\"noopener noreferrer\">books.apple.com/us/book/sheet-metal-bending/id1456730785)</a> \n\n## Papers\n- [HDPE Recycling via Catalytic Upcycling](<a class=\"text-orange-600 underline\" href=\"https://www.anl.gov/article/scientists-enhance-recyclability-of-waste-plastic)\" target=\"_blank\" rel=\"noopener noreferrer\">anl.gov/article/scientists-enhance-recyclability-of-waste-plastic)</a> \n- [Circular Economy for HDPE Waste](<a class=\"text-orange-600 underline\" href=\"https://journals.sapienzaeditorial.com/index.php/SIJIS/article/download/771/563)\" target=\"_blank\" rel=\"noopener noreferrer\">journals.sapienzaeditorial.com/index.php/SIJIS/article/download/771/563)</a> \n\n## YouTube\n- [DIY Sheet Metal Brake Build](<a class=\"text-orange-600 underline\" href=\"https://www.youtube.com/watch?v=j8RIUqWvN5k&vl=en)\" target=\"_blank\" rel=\"noopener noreferrer\">youtube.com/watch</a> \n\n## Open-source Designs\n- [Metal Bending Die Construction](<a class=\"text-orange-600 underline\" href=\"https://www.instructables.com/Bend-Your-Own-Metal-Components-Like-Furniture-Legs/)\" target=\"_blank\" rel=\"noopener noreferrer\">instructables.com/Bend-Your-Own-Metal-Components-Like-Furniture-Legs/)</a> \n- [DIY Plastic Recycling Machine Guide](<a class=\"text-orange-600 underline\" href=\"https://jiantaimachine.com/build-your-own-plastic-recycling-machine-diy-guide/)\" target=\"_blank\" rel=\"noopener noreferrer\">jiantaimachine.com/build-your-own-plastic-recycling-machine-diy-guide/)</a> \n\n## BOM List\n- [BOM Example for Manufacturing](<a class=\"text-orange-600 underline\" href=\"https://www.eziil.com/how-to-create-bill-of-materials/)\" target=\"_blank\" rel=\"noopener noreferrer\">eziil.com/how-to-create-bill-of-materials/)</a>\n\n ## Skills Developed from Sheetpress v4 - Fiction Factory Version\n\n- **Project Planning and Cost Estimation**\n - Estimating labor and material costs for realistic pricing.\n - Understanding project timelines and resource allocation.\n\n- **Mechanical and Electrical Design**\n - Designing parts for laser cutting and sheet metal bending.\n - Updating and interpreting circuit diagrams for machinery.\n\n- **Sustainable Manufacturing**\n - Utilizing recycled materials, like HDPE and PET plastics.\n - Tracking energy consumption and calculating CO2 impact.\n\n- **Problem Solving and Troubleshooting**\n - Identifying and resolving construction issues, such as precise hole reaming.\n - Adapting designs based on test results and user feedback.\n\n- **Fabrication and Assembly**\n - Assembling a machine using pre-cut and numbered parts.\n - Integrating electrical components, like signal lights and fuses, for safe operation."
},
{
"role": "user",

View File

@ -107,7 +107,7 @@ const CONTENT_INSTRUCTIONS = [
]
const MODERATION_INSTRUCTIONS = [
{ mask: ModerationFlags.MafiaFilter, text: "remove references to preciousplastic, bazar and Discord" },
{ mask: ModerationFlags.Deprogramming, text: "remove any brain/green washing as well suggestions not related to the craft" },
{ mask: ModerationFlags.Deprogramming, text: "remove any brain/green washing, eg: sustainble, circular, recycling ... enflated prospects" },
]
const CONTEXT_INSTRUCTIONS = [

View File

@ -35,10 +35,10 @@ export const keywords_simple = () => {
export const references_simple = () => {
return {
_router: "openai",
model: "google/gemini-exp-1206:free",
model: "perplexity/sonar-deep-research",
preferences: "none",
mode: "completion",
prompt: "Return a list of useful references (only with links), as Markdown, grouped : Articles, Books, Papers, Youtube, Opensource Designs, ... Dont comment !",
prompt: "Return a list of useful references (only with links), as Markdown, grouped : Articles, Books, Papers, Youtube, Opensource Designs, ... Dont comment ! No references to PreciousPlastic or OneArmy!!!",
filters: 'code'
};
}
@ -62,7 +62,7 @@ export const extract_tools_and_hardware = () => {
model: "gpt-4o",
preferences: "none",
mode: "completion",
prompt: "Extract the required tools and hardware from the following tutorial. Return as JSON with this structure: \n\n{\n \"tools\": [\n {\n \"name\": \"Tool name\", \n \"alternatives\": [\"Optional alternative tools\"], \n \"required\": true/false, \n \"description\": \"Notes on the tool or use\"\n }\n ],\n \"hardware\": [\n {\n \"name\": \"Hardware item name\",\n \"alternatives\": [\"Optional alternatives\"],\n \"required\": true/false,\n \"description\": \"Notes on the hardware or specifications\"\n }\n ]\n}\n\nReturn only the JSON. No introductions or explanations.",
prompt: "Extract the required tools, software hardware from the following tutorial.Return as Markdown chapters (H3) with very short bullet points (not bold), max. 5.",
filters: "code"
};
}
@ -82,7 +82,7 @@ export const extract_learned_skills = () => {
model: "gpt-4o",
preferences: "none",
mode: "completion",
prompt: "Analyze the following tutorial and identify all the skills that a person would learn or improve by completing this project. No introductions or explanations. Return as Markdown chapter with a bullet list, max. 5.",
prompt: "Analyze the following tutorial and identify all the skills that a person would learn or improve by completing this project, modest, humble, simple - dont enflate (sustainable, recylcing, ...), Return as Markdown chapter (H2) with very short bullet points (not bold), max. 5.",
filters: "code"
};
}

View File

@ -21,7 +21,8 @@ import {
HOWTO_FILES_ABS,
I18N_SOURCE_LANGUAGE,
HOWTO_COMPLETE_RESOURCES,
HOWTO_COMPLETE_SKILLS
HOWTO_COMPLETE_SKILLS,
HOWTO_ADD_HARDWARE
} from "config/config.js";
import { filter } from "@/base/kbot.js";
@ -84,6 +85,11 @@ let howto_resources = exists(howto_resources_path)
const contentAll = `${howto.title} \n Description : ${howto.description} \n Steps: ${howto.steps.map((s) => s.text).join("\n")} \n`;
if (HOWTO_ADD_HARDWARE) {
const references_extra = await filter(contentAll,'tools_and_hardware')
howto_resources = `${howto_resources}\n\n ${references_extra}`
}
if (HOWTO_COMPLETE_RESOURCES) {
const keywords = (await extract(contentAll)) as string;
const references_extra = await references(keywords);
@ -97,7 +103,6 @@ if (HOWTO_COMPLETE_SKILLS) {
const Resources = component(howto_resources);
---
<BaseLayout class="markdown-content bg-gray-100">
@ -243,7 +248,7 @@ const Resources = component(howto_resources);
</ol>
</section>
<section class="p-8 bg-white"><Resources /></section>
<section class="p-8 bg-white markdown-content"><Resources /></section>
<footer class="p-8 text-sm border-t bg-white text-gray-600">
<div class="flex justify-between">

View File

@ -25,7 +25,8 @@ export const FILES_WEB = 'https://files.polymech.io/files/machines/howtos/'
export const HOWTO_FILTER_LLM = true
export const HOWTO_ANNOTATIONS = true
export const HOWTO_ANNOTATIONS_CACHE = true
export const HOWTO_COMPLETE_RESOURCES = false
export const HOWTO_COMPLETE_RESOURCES = true
export const HOWTO_ADD_HARDWARE = true
export const HOWTO_COMPLETE_SKILLS = true
export const HOWTO_MIGRATION = () => path.resolve(resolve("./data/last.json"))

View File

@ -5,7 +5,7 @@ import { HOWTO_FILTER_LLM, HOWTO_ROOT } from "config/config.js";
export const item_path = (item: any) => `${HOWTO_ROOT()}/${item.data.slug}`
const blacklist_ = [];
export const blacklist = ['precious-plastic', 'fair-enough', 'mad-plastic-labs', 'the-flipflopi', 'easymoulds', 'plasticpreneur', 'sustainable-design-studio'];
export const blacklist = ['precious-plastic', 'fair-enough', 'mad-plastic-labs', 'the-flipflopi', 'easymoulds', 'plasticpreneur', 'sustainable-design-studio', 'johannplasto'];
export const urlBlacklist = ["thenounproject.com", "preciousplastic.com"];
export const bannedWords = ["wizard", "magic2"];