generated from polymech/site-template
kbot - support your local groover
This commit is contained in:
parent
147634a9cd
commit
facced1b78
@ -23,7 +23,7 @@
|
||||
"format": "unix-time"
|
||||
}
|
||||
],
|
||||
"default": "2025-03-25T10:04:33.286Z"
|
||||
"default": "2025-03-25T12:11:36.725Z"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -38,7 +38,7 @@ export const references_simple = () => {
|
||||
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 ! No references to PreciousPlastic or OneArmy!!!",
|
||||
prompt: "Return a list of useful references (only with links), as Markdown, grouped : Articles, Papers, Youtube, Software, at least 5 per category, ... Dont comment ! No references to PreciousPlastic or OneArmy!!!",
|
||||
filters: 'code'
|
||||
};
|
||||
}
|
||||
@ -58,11 +58,11 @@ export const template_research = () => {
|
||||
}
|
||||
export const extract_tools_and_hardware = () => {
|
||||
return {
|
||||
router: "openai",
|
||||
model: "gpt-4o",
|
||||
router_: "openai",
|
||||
model: "perplexity/sonar-deep-research",
|
||||
preferences: "none",
|
||||
mode: "completion",
|
||||
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.",
|
||||
prompt: "Extract the required tools, software hardware from the following tutorial.Return as Markdown chapters (H3) with very short bullet points (not bold), with links, max. 5.",
|
||||
filters: "code"
|
||||
};
|
||||
}
|
||||
@ -87,6 +87,16 @@ export const extract_learned_skills = () => {
|
||||
};
|
||||
}
|
||||
|
||||
export const local = () => {
|
||||
return {
|
||||
model: "perplexity/sonar-deep-research",
|
||||
preferences: "none",
|
||||
mode: "completion",
|
||||
prompt: "Markdown chapter (h4) with a list of local resources, services & suppliers, max. 5, with links,group by category. dont comment, just the list",
|
||||
filters: "code"
|
||||
};
|
||||
}
|
||||
|
||||
export const templates = {
|
||||
simple: template_simple,
|
||||
code_simple: template_code_simple,
|
||||
@ -96,7 +106,8 @@ export const templates = {
|
||||
references: references_simple,
|
||||
tools_and_hardware: extract_tools_and_hardware,
|
||||
required_skills: extract_required_skills,
|
||||
learned_skills: extract_learned_skills
|
||||
learned_skills: extract_learned_skills,
|
||||
local: local
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -22,7 +22,8 @@ import {
|
||||
I18N_SOURCE_LANGUAGE,
|
||||
HOWTO_COMPLETE_RESOURCES,
|
||||
HOWTO_COMPLETE_SKILLS,
|
||||
HOWTO_ADD_HARDWARE
|
||||
HOWTO_ADD_HARDWARE,
|
||||
HOWTO_LOCAL_RESOURCES
|
||||
} from "config/config.js";
|
||||
import { filter } from "@/base/kbot.js";
|
||||
|
||||
@ -101,6 +102,11 @@ if (HOWTO_COMPLETE_SKILLS) {
|
||||
howto_resources = `${howto_resources}\n\n ${references_extra}`
|
||||
}
|
||||
|
||||
if (HOWTO_LOCAL_RESOURCES && howto.user && howto.user.geo) {
|
||||
const references_extra = await filter(`Location: ${authorGeo.countryName}`,'local')
|
||||
howto_resources = `${howto_resources}\n\n ${references_extra}`
|
||||
}
|
||||
|
||||
const Resources = component(howto_resources);
|
||||
|
||||
---
|
||||
|
||||
@ -28,6 +28,7 @@ export const HOWTO_ANNOTATIONS_CACHE = true
|
||||
export const HOWTO_COMPLETE_RESOURCES = true
|
||||
export const HOWTO_ADD_HARDWARE = true
|
||||
export const HOWTO_COMPLETE_SKILLS = true
|
||||
export const HOWTO_LOCAL_RESOURCES = true
|
||||
|
||||
export const HOWTO_MIGRATION = () => path.resolve(resolve("./data/last.json"))
|
||||
export const HOWTO_ROOT_INTERN = () => path.resolve(resolve("./public/resources/howtos"))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user