@elgap/edukaai 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +15 -0
- package/.output/public/_nuxt/BHDzAs85.js +1 -0
- package/.output/public/_nuxt/BJzbfdL_.js +1 -0
- package/.output/public/_nuxt/BKGLlKXk.js +6 -0
- package/.output/public/_nuxt/BLuXzJk3.js +1 -0
- package/.output/public/_nuxt/BNOzzLI3.js +1 -0
- package/.output/public/_nuxt/BO5GMwXh.js +1 -0
- package/.output/public/_nuxt/BQRbsFGy.js +1 -0
- package/.output/public/_nuxt/Be4MVdOg.js +1 -0
- package/.output/public/_nuxt/Bu4d3Z1T.js +1 -0
- package/.output/public/_nuxt/BwpBBNv4.js +1 -0
- package/.output/public/_nuxt/C1Og9-6n.js +97 -0
- package/.output/public/_nuxt/C3CjAhtj.js +1 -0
- package/.output/public/_nuxt/C6E3Ty3z.js +1 -0
- package/.output/public/_nuxt/COct4B42.js +1 -0
- package/.output/public/_nuxt/CQ6g2dtj.js +1 -0
- package/.output/public/_nuxt/CURSW5TV.js +246 -0
- package/.output/public/_nuxt/CW57JW4s.js +1 -0
- package/.output/public/_nuxt/Cg2fM61o.js +18 -0
- package/.output/public/_nuxt/CgGOeWta.js +1 -0
- package/.output/public/_nuxt/CoyYbT7u.js +1 -0
- package/.output/public/_nuxt/D11MHbGc.js +133 -0
- package/.output/public/_nuxt/D24dz0S8.js +1 -0
- package/.output/public/_nuxt/D3EFPr8x.js +1 -0
- package/.output/public/_nuxt/Dvt4ZHil.js +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -0
- package/.output/public/_nuxt/builds/meta/ab87ba0e-6d0d-4466-8b12-00d44f8fb9d3.json +1 -0
- package/.output/public/_nuxt/default.C1K1-g4D.css +1 -0
- package/.output/public/_nuxt/entry.CH8k-Mga.css +1 -0
- package/.output/public/_nuxt/error-404.C-Ezrlz-.css +1 -0
- package/.output/public/_nuxt/error-500.DBWf9FGj.css +1 -0
- package/.output/public/_nuxt/first-training.wFDD65zm.css +1 -0
- package/.output/public/_nuxt/import.cUKYdCrq.css +1 -0
- package/.output/public/_nuxt/index.D-2VHyHA.css +1 -0
- package/.output/public/_nuxt/index.D4J_vHmL.css +1 -0
- package/.output/public/_nuxt/mPJeLIz7.js +1 -0
- package/.output/server/chunks/_/error-500.mjs +19 -0
- package/.output/server/chunks/_/error-500.mjs.map +1 -0
- package/.output/server/chunks/build/ExampleCard-styles.BUOJhEg0.mjs +8 -0
- package/.output/server/chunks/build/ExampleCard-styles.BUOJhEg0.mjs.map +1 -0
- package/.output/server/chunks/build/ExampleForm-Bcpl0CfL.mjs +238 -0
- package/.output/server/chunks/build/ExampleForm-Bcpl0CfL.mjs.map +1 -0
- package/.output/server/chunks/build/ImportPreview-styles.CFmMl5Ok.mjs +8 -0
- package/.output/server/chunks/build/ImportPreview-styles.CFmMl5Ok.mjs.map +1 -0
- package/.output/server/chunks/build/_id_-BUSGcL-H.mjs +113 -0
- package/.output/server/chunks/build/_id_-BUSGcL-H.mjs.map +1 -0
- package/.output/server/chunks/build/axolotl-C-EXGgM8.mjs +112 -0
- package/.output/server/chunks/build/axolotl-C-EXGgM8.mjs.map +1 -0
- package/.output/server/chunks/build/best-practices-DsadorHb.mjs +38 -0
- package/.output/server/chunks/build/best-practices-DsadorHb.mjs.map +1 -0
- package/.output/server/chunks/build/client.precomputed.mjs +4 -0
- package/.output/server/chunks/build/client.precomputed.mjs.map +1 -0
- package/.output/server/chunks/build/default-DPkqqHOE.mjs +354 -0
- package/.output/server/chunks/build/default-DPkqqHOE.mjs.map +1 -0
- package/.output/server/chunks/build/default-styles.DsqVVS7k.mjs +8 -0
- package/.output/server/chunks/build/default-styles.DsqVVS7k.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-K4UfZNck.mjs +97 -0
- package/.output/server/chunks/build/error-404-K4UfZNck.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-styles.DuDrf-v0.mjs +8 -0
- package/.output/server/chunks/build/error-404-styles.DuDrf-v0.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-CA7TEPNg.mjs +79 -0
- package/.output/server/chunks/build/error-500-CA7TEPNg.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-styles.8IYEHzz6.mjs +8 -0
- package/.output/server/chunks/build/error-500-styles.8IYEHzz6.mjs.map +1 -0
- package/.output/server/chunks/build/examples-BHK8MDrs.mjs +134 -0
- package/.output/server/chunks/build/examples-BHK8MDrs.mjs.map +1 -0
- package/.output/server/chunks/build/export-BzxFqqfP.mjs +233 -0
- package/.output/server/chunks/build/export-BzxFqqfP.mjs.map +1 -0
- package/.output/server/chunks/build/faq-DKch73dS.mjs +112 -0
- package/.output/server/chunks/build/faq-DKch73dS.mjs.map +1 -0
- package/.output/server/chunks/build/field-guide-qbukT8F0.mjs +38 -0
- package/.output/server/chunks/build/field-guide-qbukT8F0.mjs.map +1 -0
- package/.output/server/chunks/build/first-training-BbEOBcEW.mjs +343 -0
- package/.output/server/chunks/build/first-training-BbEOBcEW.mjs.map +1 -0
- package/.output/server/chunks/build/first-training-styles.BzOa_KRD.mjs +8 -0
- package/.output/server/chunks/build/first-training-styles.BzOa_KRD.mjs.map +1 -0
- package/.output/server/chunks/build/glossary-CxSGCJoH.mjs +397 -0
- package/.output/server/chunks/build/glossary-CxSGCJoH.mjs.map +1 -0
- package/.output/server/chunks/build/huggingface-TSmyUzZU.mjs +128 -0
- package/.output/server/chunks/build/huggingface-TSmyUzZU.mjs.map +1 -0
- package/.output/server/chunks/build/import-C0kYhRv9.mjs +247 -0
- package/.output/server/chunks/build/import-C0kYhRv9.mjs.map +1 -0
- package/.output/server/chunks/build/index-C1ntBEWd.mjs +235 -0
- package/.output/server/chunks/build/index-C1ntBEWd.mjs.map +1 -0
- package/.output/server/chunks/build/index-D3CxihcX.mjs +320 -0
- package/.output/server/chunks/build/index-D3CxihcX.mjs.map +1 -0
- package/.output/server/chunks/build/index-DgKa1cy0.mjs +360 -0
- package/.output/server/chunks/build/index-DgKa1cy0.mjs.map +1 -0
- package/.output/server/chunks/build/index-cG54gaKX.mjs +513 -0
- package/.output/server/chunks/build/index-cG54gaKX.mjs.map +1 -0
- package/.output/server/chunks/build/index-styles.BX2SZiiS.mjs +8 -0
- package/.output/server/chunks/build/index-styles.BX2SZiiS.mjs.map +1 -0
- package/.output/server/chunks/build/llm-training-DIqc0eiM.mjs +91 -0
- package/.output/server/chunks/build/llm-training-DIqc0eiM.mjs.map +1 -0
- package/.output/server/chunks/build/new-b3338aLF.mjs +92 -0
- package/.output/server/chunks/build/new-b3338aLF.mjs.map +1 -0
- package/.output/server/chunks/build/nuxt-link-Ceyd90PQ.mjs +290 -0
- package/.output/server/chunks/build/nuxt-link-Ceyd90PQ.mjs.map +1 -0
- package/.output/server/chunks/build/sample-datasets-CVLWMQUA.mjs +45 -0
- package/.output/server/chunks/build/sample-datasets-CVLWMQUA.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +1979 -0
- package/.output/server/chunks/build/server.mjs.map +1 -0
- package/.output/server/chunks/build/styles.mjs +20 -0
- package/.output/server/chunks/build/styles.mjs.map +1 -0
- package/.output/server/chunks/build/test-router-BYM6Cpst.mjs +105 -0
- package/.output/server/chunks/build/test-router-BYM6Cpst.mjs.map +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +5800 -0
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -0
- package/.output/server/chunks/routes/renderer.mjs +481 -0
- package/.output/server/chunks/routes/renderer.mjs.map +1 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
- package/.output/server/index.mjs +12 -0
- package/.output/server/index.mjs.map +1 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/api.js +2 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/app.js +2 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/component.js +2 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/context.js +2 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/hooks.js +2 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/index.js +22 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/api/util.js +2 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/const.js +5 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/env.js +17 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/index.js +45 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/plugin.js +2 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/proxy.js +111 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/lib/cjs/time.js +28 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@6.6.4/package.json +37 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@7.7.9/dist/index.cjs +42 -0
- package/.output/server/node_modules/.nitro/@vue/devtools-api@7.7.9/package.json +32 -0
- package/.output/server/node_modules/.nitro/hookable@5.5.3/dist/index.cjs +299 -0
- package/.output/server/node_modules/.nitro/hookable@5.5.3/package.json +49 -0
- package/.output/server/node_modules/.nitro/hookable@6.0.1/dist/index.mjs +266 -0
- package/.output/server/node_modules/.nitro/hookable@6.0.1/package.json +52 -0
- package/.output/server/node_modules/.nitro/perfect-debounce@1.0.0/dist/index.cjs +59 -0
- package/.output/server/node_modules/.nitro/perfect-debounce@1.0.0/package.json +44 -0
- package/.output/server/node_modules/.nitro/perfect-debounce@2.1.0/dist/index.mjs +89 -0
- package/.output/server/node_modules/.nitro/perfect-debounce@2.1.0/package.json +41 -0
- package/.output/server/node_modules/@babel/parser/lib/index.js +14582 -0
- package/.output/server/node_modules/@babel/parser/package.json +50 -0
- package/.output/server/node_modules/@iconify/utils/lib/colors/index.js +292 -0
- package/.output/server/node_modules/@iconify/utils/lib/colors/keywords.js +702 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/common.js +76 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/format.js +40 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/icon.js +52 -0
- package/.output/server/node_modules/@iconify/utils/lib/css/icons.js +133 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/bool.js +20 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.js +15 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/flip.js +18 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/merge.js +18 -0
- package/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.js +31 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.js +80 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/convert.js +102 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/data.js +29 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/format.js +60 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/parse.js +50 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.js +204 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.js +35 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.js +134 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.js +167 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.js +81 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.js +94 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.js +28 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.js +78 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.js +68 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.js +47 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.js +105 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.js +38 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.js +94 -0
- package/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.js +64 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/defaults.js +26 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/merge.js +18 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/name.js +58 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/square.js +34 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon/transformations.js +13 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.js +126 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.js +21 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.js +27 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.js +38 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.js +93 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.js +48 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.js +24 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.js +44 -0
- package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.js +125 -0
- package/.output/server/node_modules/@iconify/utils/lib/index.js +53 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/custom.js +32 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/loader.js +28 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/modern.js +42 -0
- package/.output/server/node_modules/@iconify/utils/lib/loader/utils.js +63 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/objects.js +27 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/strings.js +27 -0
- package/.output/server/node_modules/@iconify/utils/lib/misc/title.js +10 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/build.js +115 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/defs.js +32 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +15 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/html.js +10 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/id.js +42 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.js +23 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/parse.js +69 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/pretty.js +55 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/size.js +28 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/trim.js +8 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/url.js +23 -0
- package/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.js +9 -0
- package/.output/server/node_modules/@iconify/utils/package.json +118 -0
- package/.output/server/node_modules/@iconify/vue/dist/iconify.mjs +1893 -0
- package/.output/server/node_modules/@iconify/vue/package.json +64 -0
- package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6763 -0
- package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
- package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
- package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
- package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
- package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
- package/.output/server/node_modules/@vue/devtools-kit/dist/index.cjs +6850 -0
- package/.output/server/node_modules/@vue/devtools-kit/package.json +44 -0
- package/.output/server/node_modules/@vue/devtools-shared/dist/index.cjs +378 -0
- package/.output/server/node_modules/@vue/devtools-shared/package.json +34 -0
- package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1870 -0
- package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
- package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6810 -0
- package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
- package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1750 -0
- package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
- package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +883 -0
- package/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
- package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +604 -0
- package/.output/server/node_modules/@vue/shared/package.json +47 -0
- package/.output/server/node_modules/birpc/dist/index.cjs +296 -0
- package/.output/server/node_modules/birpc/package.json +57 -0
- package/.output/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
- package/.output/server/node_modules/consola/dist/core.mjs +512 -0
- package/.output/server/node_modules/consola/dist/index.mjs +651 -0
- package/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
- package/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
- package/.output/server/node_modules/consola/package.json +136 -0
- package/.output/server/node_modules/devalue/index.js +4 -0
- package/.output/server/node_modules/devalue/package.json +37 -0
- package/.output/server/node_modules/devalue/src/base64.js +110 -0
- package/.output/server/node_modules/devalue/src/constants.js +7 -0
- package/.output/server/node_modules/devalue/src/parse.js +246 -0
- package/.output/server/node_modules/devalue/src/stringify.js +350 -0
- package/.output/server/node_modules/devalue/src/uneval.js +490 -0
- package/.output/server/node_modules/devalue/src/utils.js +148 -0
- package/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
- package/.output/server/node_modules/entities/dist/commonjs/decode.js +568 -0
- package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
- package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
- package/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
- package/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
- package/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/entities/package.json +120 -0
- package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
- package/.output/server/node_modules/estree-walker/package.json +37 -0
- package/.output/server/node_modules/pinia/dist/pinia.prod.cjs +719 -0
- package/.output/server/node_modules/pinia/package.json +94 -0
- package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
- package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
- package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
- package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
- package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
- package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
- package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
- package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
- package/.output/server/node_modules/source-map-js/package.json +71 -0
- package/.output/server/node_modules/source-map-js/source-map.js +8 -0
- package/.output/server/node_modules/tailwindcss/dist/chunk-X4GG3EDV.mjs +1 -0
- package/.output/server/node_modules/tailwindcss/dist/colors.mjs +1 -0
- package/.output/server/node_modules/tailwindcss/package.json +89 -0
- package/.output/server/node_modules/ufo/dist/index.mjs +645 -0
- package/.output/server/node_modules/ufo/package.json +48 -0
- package/.output/server/node_modules/unhead/dist/index.mjs +9 -0
- package/.output/server/node_modules/unhead/dist/parser.mjs +508 -0
- package/.output/server/node_modules/unhead/dist/plugins.mjs +101 -0
- package/.output/server/node_modules/unhead/dist/scripts.mjs +30 -0
- package/.output/server/node_modules/unhead/dist/server.mjs +180 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.BPM0-cfG.mjs +44 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.BnoAbrHA.mjs +269 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.CApf5sj3.mjs +148 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.CbpEuj3y.mjs +71 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.D_nrZZPH.mjs +182 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.ckV6dpEQ.mjs +166 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.fVVqDC1O.mjs +203 -0
- package/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
- package/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
- package/.output/server/node_modules/unhead/package.json +105 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
- package/.output/server/node_modules/vue/index.js +7 -0
- package/.output/server/node_modules/vue/index.mjs +1 -0
- package/.output/server/node_modules/vue/package.json +112 -0
- package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
- package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +301 -0
- package/.output/server/node_modules/vue-bundle-renderer/package.json +55 -0
- package/.output/server/node_modules/vue-router/dist/devtools-EWN81iOl.mjs +1220 -0
- package/.output/server/node_modules/vue-router/dist/vue-router.mjs +1557 -0
- package/.output/server/node_modules/vue-router/package.json +153 -0
- package/.output/server/node_modules/vue-router/vue-router.node.mjs +2 -0
- package/.output/server/package.json +37 -0
- package/LICENSE +21 -0
- package/README.md +132 -0
- package/bin/cli.js +75 -0
- package/package.json +71 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"date": "2026-03-07T02:08:35.351Z",
|
|
3
|
+
"preset": "node-server",
|
|
4
|
+
"framework": {
|
|
5
|
+
"name": "nuxt",
|
|
6
|
+
"version": "4.3.1"
|
|
7
|
+
},
|
|
8
|
+
"versions": {
|
|
9
|
+
"nitro": "2.13.1"
|
|
10
|
+
},
|
|
11
|
+
"commands": {
|
|
12
|
+
"preview": "node server/index.mjs"
|
|
13
|
+
},
|
|
14
|
+
"config": {}
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as n}from"./C6E3Ty3z.js";import{c as r,a as t,b as a,w as i,m as l,o as d,d as o}from"./Cg2fM61o.js";const c={class:"max-w-4xl mx-auto pb-20"},p={class:"text-sm text-gray-500 mb-6"},g={class:"text-center"},m={class:"flex justify-center gap-4"},v={__name:"llm-training",setup(u){return(h,e)=>{const s=n;return d(),r("div",c,[t("div",p,[a(s,{to:"/help",class:"hover:text-blue-600"},{default:i(()=>[...e[0]||(e[0]=[o("← Back to Guide",-1)])]),_:1})]),e[5]||(e[5]=l('<div class="mb-12"><div class="flex items-center gap-3 mb-4"><span class="text-4xl">🧠</span><h1 class="text-4xl font-bold">LLM Training Explained</h1></div><p class="text-xl text-gray-600"> A technical deep-dive into how Large Language Models actually work, explained for developers who want to understand the magic behind AI. </p></div><div class="card mb-8 bg-gradient-to-br from-blue-50 to-purple-50"><h2 class="text-xl font-semibold mb-4">📖 The Story Begins...</h2><p class="text-gray-700 leading-relaxed mb-4"> Imagine you're texting with a friend who's incredibly good at predicting what you're going to say next. Not because they're psychic, but because they've read every book, article, and conversation in existence. </p><p class="text-gray-700 leading-relaxed"> That's essentially what an LLM is — a statistical prediction machine that learned patterns from trillions of words. But how does it actually work under the hood? Let's dive into the technical magic, step by step. </p></div><section id="what-is-llm" class="mb-12"><div class="flex items-center gap-3 mb-6"><span class="text-3xl">1️⃣</span><h2 class="text-2xl font-bold">What is an LLM, Actually?</h2></div><div class="card"><h3 class="text-lg font-semibold mb-4 text-blue-700">The Next Token Prediction Machine</h3><p class="text-gray-700 mb-4 leading-relaxed"> At its core, an LLM (Large Language Model) is doing one thing and one thing only: <strong>predicting the next token</strong>. </p><div class="bg-gray-50 p-6 rounded-xl mb-6"><h4 class="font-medium mb-3">🎯 The Core Task</h4><div class="space-y-3"><div class="flex items-center gap-3"><span class="text-2xl">📜</span><div class="flex-1"><p class="font-mono text-sm bg-white p-2 rounded border"> "The capital of France is" </p></div></div><div class="text-center"><svg class="w-8 h-8 mx-auto text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 14l-7 7m0 0l-7-7m7 7V3"></path></svg></div><div class="flex items-center gap-3"><span class="text-2xl">🤖</span><div class="flex-1"><p class="font-mono text-sm bg-green-50 p-2 rounded border border-green-200"> "Paris" <span class="text-green-600">(probability: 99.9%)</span></p></div></div></div></div><p class="text-gray-700 mb-4 leading-relaxed"> That's it. The entire "intelligence" of ChatGPT, Claude, or any LLM comes from doing this one task extremely well, billions of times over. </p><div class="bg-blue-50 p-4 rounded-lg mb-6"><h4 class="font-medium text-blue-900 mb-2">💡 Why This Works</h4><p class="text-sm text-blue-800"> If you can predict "Paris" after "The capital of France is", and you can predict "def" after "class MyClass:", and you can predict "sincerely" after "Yours", then you've learned the patterns of language, facts about the world, programming syntax, and letter-writing etiquette — all from next-token prediction. </p></div><h3 class="text-lg font-semibold mb-4 text-blue-700">The Autoregressive Loop</h3><p class="text-gray-700 mb-4 leading-relaxed"> Here's the clever part: once the model predicts "Paris", it adds that to the context and predicts the NEXT token: </p><div class="bg-gray-50 p-4 rounded-xl mb-6"><div class="space-y-2 font-mono text-sm"><p><strong>Step 1:</strong> "The capital of France is" → predicts "Paris"</p><p><strong>Step 2:</strong> "The capital of France is Paris" → predicts ","</p><p><strong>Step 3:</strong> "The capital of France is Paris," → predicts "a"</p><p><strong>Step 4:</strong> "The capital of France is Paris, a" → predicts "city"</p><p><strong>Step 5:</strong> ...continues until it predicts an "end" token</p></div></div><p class="text-gray-700 leading-relaxed"> This is called <strong>autoregressive generation</strong> — the model feeds its own predictions back as input to generate the next part. This is how it writes essays, answers questions, or generates code one piece at a time. </p></div></section><section id="tokens" class="mb-12"><div class="flex items-center gap-3 mb-6"><span class="text-3xl">2️⃣</span><h2 class="text-2xl font-bold">Tokens: The Building Blocks</h2></div><div class="card"><h3 class="text-lg font-semibold mb-4 text-blue-700">Not Words, Not Characters</h3><p class="text-gray-700 mb-4 leading-relaxed"> LLMs don't actually work with words or characters. They work with <strong>tokens</strong> — pieces of text that are somewhere in between. </p><div class="bg-gray-50 p-6 rounded-xl mb-6"><h4 class="font-medium mb-4">How Tokenization Works</h4><div class="space-y-4"><div><p class="text-sm text-gray-500 mb-1">Original text:</p><p class="font-mono text-lg">"ChatGPT is amazing!"</p></div><div class="text-center"><span class="text-2xl">↓ Tokenized ↓</span></div><div class="flex flex-wrap gap-2"><span class="px-3 py-2 bg-blue-100 rounded-lg font-mono text-sm">Chat</span><span class="px-3 py-2 bg-blue-100 rounded-lg font-mono text-sm">G</span><span class="px-3 py-2 bg-blue-100 rounded-lg font-mono text-sm">PT</span><span class="px-3 py-2 bg-green-100 rounded-lg font-mono text-sm">is</span><span class="px-3 py-2 bg-purple-100 rounded-lg font-mono text-sm">amazing</span><span class="px-3 py-2 bg-red-100 rounded-lg font-mono text-sm">!</span></div><p class="text-sm text-gray-600 mt-2">6 tokens total</p></div></div><h3 class="text-lg font-semibold mb-4 text-blue-700">Why Tokens?</h3><div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"><div class="p-4 bg-green-50 rounded-lg"><h4 class="font-medium text-green-800 mb-2">✅ Efficient</h4><p class="text-sm text-gray-700"> Common words like "the", "and", "is" are single tokens. Rare words get broken into subword pieces. This gives a good balance between vocabulary size and sequence length. </p></div><div class="p-4 bg-blue-50 rounded-lg"><h4 class="font-medium text-blue-800 mb-2">✅ Handles Any Text</h4><p class="text-sm text-gray-700"> By breaking unknown words into pieces (like "unbelievable" → "un" + "believable"), the model can handle words it's never seen before. </p></div></div><div class="bg-yellow-50 p-4 rounded-lg mb-6"><h4 class="font-medium text-yellow-800 mb-2">📊 Token Count Examples</h4><table class="w-full text-sm"><thead><tr class="border-b"><th class="text-left py-2">Text</th><th class="text-right py-2">Tokens</th></tr></thead><tbody><tr class="border-b"><td class="py-2">"Hello"</td><td class="text-right">1</td></tr><tr class="border-b"><td class="py-2">"Hello world"</td><td class="text-right">2</td></tr><tr class="border-b"><td class="py-2">"The quick brown fox"</td><td class="text-right">4</td></tr><tr class="border-b"><td class="py-2">"uncharacteristically"</td><td class="text-right">4 (broken into pieces)</td></tr><tr><td class="py-2">A full paragraph (~100 words)</td><td class="text-right">~130-150 tokens</td></tr></tbody></table></div><div class="bg-purple-50 p-4 rounded-lg"><h4 class="font-medium text-purple-800 mb-2">💡 Why This Matters for You</h4><p class="text-sm text-gray-700"> When you're charged by the token, or when your model has a "context window" of 4096 tokens, you're not being limited by words or characters — you're being limited by these token pieces. That's why a 100-word paragraph might be 130 tokens, not 100. </p></div></div></section><section id="neural-networks" class="mb-12"><div class="flex items-center gap-3 mb-6"><span class="text-3xl">3️⃣</span><h2 class="text-2xl font-bold">Neural Networks: Pattern Recognizers</h2></div><div class="card"><h3 class="text-lg font-semibold mb-4 text-blue-700">The Pattern Recognition Machine</h3><p class="text-gray-700 mb-4 leading-relaxed"> At the heart of an LLM is a <strong>neural network</strong> — a massive system of interconnected nodes that learns patterns from data. Think of it like a giant sieve that filters information, learning which patterns are important. </p><div class="bg-gray-50 p-6 rounded-xl mb-6"><h4 class="font-medium mb-4">How a Neural Network Works (Simplified)</h4><div class="space-y-4"><div class="flex items-center gap-4"><div class="w-20 text-right text-sm text-gray-500">Input</div><div class="flex-1 p-3 bg-blue-100 rounded-lg"><p class="font-mono text-sm">Token IDs: [15496, 11, 616, 329, 11406]</p><p class="text-xs text-gray-600">("The cat sat...")</p></div></div><div class="text-center text-2xl">↓</div><div class="flex items-center gap-4"><div class="w-20 text-right text-sm text-gray-500">Processing</div><div class="flex-1 p-4 bg-purple-100 rounded-lg"><p class="font-medium text-sm mb-2">Millions of mathematical operations</p><p class="text-xs text-gray-600">Matrix multiplications, activations, transformations through layers</p></div></div><div class="text-center text-2xl">↓</div><div class="flex items-center gap-4"><div class="w-20 text-right text-sm text-gray-500">Output</div><div class="flex-1 p-3 bg-green-100 rounded-lg"><p class="font-mono text-sm">Probability distribution over all tokens</p><p class="text-xs text-gray-600">"on" = 45%, "down" = 30%, "there" = 15%, ...</p></div></div></div></div><h3 class="text-lg font-semibold mb-4 text-blue-700">The Key Idea: Learning from Examples</h3><p class="text-gray-700 mb-4 leading-relaxed"> The network doesn't "know" anything initially. It starts with random values (weights). During training, it sees millions of examples like: </p><div class="bg-gray-50 p-4 rounded-xl mb-6"><div class="space-y-2 text-sm"><p><strong>Input:</strong> "The cat sat on the"</p><p><strong>Expected Output:</strong> "mat"</p><p><strong>Network's Guess:</strong> "floor" (wrong!)</p><p class="text-red-600">→ Adjust weights slightly to do better next time</p></div></div><p class="text-gray-700 mb-4 leading-relaxed"> After seeing this pattern millions of times across different contexts, the network learns: </p><ul class="list-disc list-inside text-gray-700 space-y-2 mb-6 ml-4"><li>Cats often sit on things</li><li>"Mat" commonly follows "sat on the"</li><li>Grammar patterns (articles, prepositions, word order)</li><li>World knowledge (cats are pets, mats are for sitting)</li></ul><div class="bg-green-50 p-4 rounded-lg"><h4 class="font-medium text-green-800 mb-2">🧠 The Emergence of "Understanding"</h4><p class="text-sm text-gray-700"> Notice how the model doesn't have a "cat database" or a "mat definition." It just learned statistical patterns. Yet from these patterns, complex behaviors emerge — answering questions, writing code, reasoning through problems. This emergent complexity is what makes LLMs so powerful (and surprising). </p></div></div></section><section id="transformers" class="mb-12"><div class="flex items-center gap-3 mb-6"><span class="text-3xl">4️⃣</span><h2 class="text-2xl font-bold">The Transformer Architecture</h2></div><div class="card"><h3 class="text-lg font-semibold mb-4 text-blue-700">"Attention Is All You Need"</h3><p class="text-gray-700 mb-4 leading-relaxed"> In 2017, Google researchers published a paper with that title. It revolutionized AI. The key insight: <strong>attention mechanisms</strong> allow models to focus on relevant parts of the input when making predictions. </p><div class="bg-gray-50 p-6 rounded-xl mb-6"><h4 class="font-medium mb-4">The Attention Analogy</h4><p class="text-gray-700 mb-4"> Imagine you're reading a long paragraph and encounter the word "it" at the end: </p><div class="bg-white p-4 rounded border"><p class="mb-3"> "The computer was old and slow. The user tried to run a new program on <span class="bg-yellow-200 px-1 font-bold">it</span>, but..." </p><p class="text-sm text-gray-600"> To understand what "it" refers to, your brain looks back and <strong>attends to</strong> the most relevant words: "computer", "old", "slow". You don't equally consider every word — you focus on what matters. </p></div></div><h3 class="text-lg font-semibold mb-4 text-blue-700">Self-Attention Mechanism</h3><p class="text-gray-700 mb-4 leading-relaxed"> The transformer uses <strong>self-attention</strong> to let every token "look at" every other token and decide which ones are important for understanding its meaning. </p><div class="bg-blue-50 p-6 rounded-xl mb-6"><h4 class="font-medium text-blue-900 mb-4">How It Works</h4><div class="space-y-4"><div class="flex items-start gap-3"><div class="w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center text-white font-bold text-sm flex-shrink-0">1</div><div><h5 class="font-medium">Query, Key, Value</h5><p class="text-sm text-gray-700 mb-2"> For each token, the model creates three vectors: </p><ul class="list-disc list-inside ml-4 space-y-1 text-sm text-gray-700"><li><strong>Query:</strong> "What am I looking for?"</li><li><strong>Key:</strong> "What do I contain?"</li><li><strong>Value:</strong> "What information do I have?"</li></ul></div></div><div class="flex items-start gap-3"><div class="w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center text-white font-bold text-sm flex-shrink-0">2</div><div><h5 class="font-medium">Compute Attention Scores</h5><p class="text-sm text-gray-700"> Each token's Query is compared to every other token's Key. High match = high attention weight. The model learns which relationships matter. </p></div></div><div class="flex items-start gap-3"><div class="w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center text-white font-bold text-sm flex-shrink-0">3</div><div><h5 class="font-medium">Weighted Sum</h5><p class="text-sm text-gray-700"> Each token's new representation becomes a weighted combination of all tokens' Values, weighted by attention scores. </p></div></div></div></div><h3 class="text-lg font-semibold mb-4 text-blue-700">Multi-Head Attention</h3><p class="text-gray-700 mb-4 leading-relaxed"> The model doesn't just do this once — it runs multiple "attention heads" in parallel. Each head can learn different types of relationships: </p><div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"><div class="p-4 bg-green-50 rounded-lg"><h5 class="font-medium text-green-800 mb-2">Head A: Syntax</h5><p class="text-sm text-gray-700">Learns grammatical relationships — subjects match with verbs, pronouns match with nouns.</p></div><div class="p-4 bg-purple-50 rounded-lg"><h5 class="font-medium text-purple-800 mb-2">Head B: Semantics</h5><p class="text-sm text-gray-700">Learns meaning relationships — "king" relates to "queen", "Paris" relates to "France".</p></div><div class="p-4 bg-blue-50 rounded-lg"><h5 class="font-medium text-blue-800 mb-2">Head C: Long-Range</h5><p class="text-sm text-gray-700">Learns connections across long distances in text — a character introduced in paragraph 1 mentioned again in paragraph 5.</p></div><div class="p-4 bg-orange-50 rounded-lg"><h5 class="font-medium text-orange-800 mb-2">Head D: Context</h5><p class="text-sm text-gray-700">Learns task-specific patterns — in code, variable definitions match with usages.</p></div></div><div class="bg-gray-50 p-4 rounded-xl mb-6"><h4 class="font-medium mb-3">Visual: Attention Pattern</h4><div class="bg-white p-4 rounded border"><p class="mb-4 font-mono text-sm">"The animal didn't cross the street because it was too tired."</p><p class="text-sm text-gray-700 mb-2"> When processing "it", the model's attention might look like: </p><div class="flex flex-wrap gap-2"><span class="px-2 py-1 bg-red-100 rounded text-xs">The (5%)</span><span class="px-2 py-1 bg-green-200 rounded text-xs font-bold">animal (75%)</span><span class="px-2 py-1 bg-red-100 rounded text-xs">didn't (2%)</span><span class="px-2 py-1 bg-red-100 rounded text-xs">cross (3%)</span><span class="px-2 py-1 bg-red-100 rounded text-xs">the (5%)</span><span class="px-2 py-1 bg-yellow-200 rounded text-xs">street (5%)</span><span class="px-2 py-1 bg-red-100 rounded text-xs">because (2%)</span><span class="px-2 py-1 bg-yellow-200 rounded text-xs">tired (3%)</span></div><p class="text-xs text-gray-500 mt-3"> The model learns "it" refers to "animal" (75%), with some attention to "tired" (3%) to understand context. </p></div></div><h3 class="text-lg font-semibold mb-4 text-blue-700">The Transformer Stack</h3><p class="text-gray-700 mb-4 leading-relaxed"> A modern LLM like GPT-4 or Llama has dozens of these attention layers stacked on top of each other. Each layer refines the understanding: </p><div class="bg-gray-50 p-4 rounded-xl"><div class="space-y-3"><div class="flex items-center gap-3"><div class="w-24 text-right text-xs text-gray-500">Layer 1</div><div class="flex-1 h-8 bg-blue-200 rounded flex items-center px-3"><span class="text-xs">Basic word relationships, syntax</span></div></div><div class="flex items-center gap-3"><div class="w-24 text-right text-xs text-gray-500">Layer 12</div><div class="flex-1 h-8 bg-blue-300 rounded flex items-center px-3"><span class="text-xs">Phrase meanings, local context</span></div></div><div class="flex items-center gap-3"><div class="w-24 text-right text-xs text-gray-500">Layer 24</div><div class="flex-1 h-8 bg-blue-400 rounded flex items-center px-3"><span class="text-xs text-white">Sentences, reasoning steps</span></div></div><div class="flex items-center gap-3"><div class="w-24 text-right text-xs text-gray-500">Layer 48</div><div class="flex-1 h-8 bg-blue-600 rounded flex items-center px-3"><span class="text-xs text-white">High-level concepts, document structure</span></div></div><div class="flex items-center gap-3"><div class="w-24 text-right text-xs text-gray-500">Final</div><div class="flex-1 h-8 bg-green-500 rounded flex items-center px-3"><span class="text-xs text-white">Next token prediction</span></div></div></div><p class="text-xs text-gray-500 mt-4"> Lower layers handle local patterns (words, grammar). Higher layers handle global patterns (meaning, reasoning, context). </p></div></div></section><section id="training-process" class="mb-12"><div class="flex items-center gap-3 mb-6"><span class="text-3xl">5️⃣</span><h2 class="text-2xl font-bold">How Training Actually Works</h2></div><div class="card"><h3 class="text-lg font-semibold mb-4 text-blue-700">From Random to Brilliant</h3><p class="text-gray-700 mb-4 leading-relaxed"> Training an LLM is like teaching a student who starts knowing nothing. You show them examples, correct their mistakes, and gradually they improve. </p><div class="bg-gray-50 p-6 rounded-xl mb-6"><h4 class="font-medium mb-4">The Training Loop</h4><div class="space-y-4"><div class="flex items-start gap-3"><div class="w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center text-white font-bold text-sm flex-shrink-0">1</div><div class="flex-1"><h5 class="font-medium">Feed Input</h5><p class="text-sm text-gray-700"> Give the model a sequence: "The capital of France is" </p></div></div><div class="flex items-start gap-3"><div class="w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center text-white font-bold text-sm flex-shrink-0">2</div><div class="flex-1"><h5 class="font-medium">Make Prediction</h5><p class="text-sm text-gray-700"> Model runs through layers and guesses: "Paris" (or maybe "London" if it's early in training) </p></div></div><div class="flex items-start gap-3"><div class="w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center text-white font-bold text-sm flex-shrink-0">3</div><div class="flex-1"><h5 class="font-medium">Compare to Truth</h5><p class="text-sm text-gray-700"> We know the answer should be "Paris". Calculate how wrong the model was. </p></div></div><div class="flex items-start gap-3"><div class="w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center text-white font-bold text-sm flex-shrink-0">4</div><div class="flex-1"><h5 class="font-medium">Adjust Weights</h5><p class="text-sm text-gray-700"> Use calculus (backpropagation) to figure out which weights to tweak so the model does better next time. </p></div></div><div class="flex items-start gap-3"><div class="w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center text-white font-bold text-sm flex-shrink-0">5</div><div class="flex-1"><h5 class="font-medium">Repeat Billions of Times</h5><p class="text-sm text-gray-700"> Do this for trillions of tokens across the entire internet. Gradually, the model gets better. </p></div></div></div></div><h3 class="text-lg font-semibold mb-4 text-blue-700">Key Concepts</h3><div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"><div class="p-4 bg-blue-50 rounded-lg"><h5 class="font-medium text-blue-800 mb-2">Loss Function</h5><p class="text-sm text-gray-700"> A mathematical measure of "how wrong" the model was. Lower loss = better predictions. Training tries to minimize this. </p></div><div class="p-4 bg-green-50 rounded-lg"><h5 class="font-medium text-green-800 mb-2">Learning Rate</h5><p class="text-sm text-gray-700"> How big of adjustments to make. Too big = unstable. Too small = slow. Like turning the steering wheel when driving. </p></div><div class="p-4 bg-purple-50 rounded-lg"><h5 class="font-medium text-purple-800 mb-2">Epochs</h5><p class="text-sm text-gray-700"> How many times the model sees the entire dataset. More epochs = more learning, but too many = overfitting. </p></div><div class="p-4 bg-orange-50 rounded-lg"><h5 class="font-medium text-orange-800 mb-2">Batch Size</h5><p class="text-sm text-gray-700"> How many examples to process before updating weights. Larger batches = more stable but need more memory. </p></div></div><div class="bg-yellow-50 p-4 rounded-lg"><h4 class="font-medium text-yellow-800 mb-2">⚠️ Why This Takes So Long</h4><p class="text-sm text-gray-700"> GPT-3 was trained on ~500 billion tokens. That's like reading the entire written works of humanity hundreds of times. Each token requires running billions of mathematical operations through the network. Even with thousands of GPUs, this takes weeks or months. That's why pre-trained models are so valuable — you're leveraging weeks of computation! </p></div></div></section><section id="fine-tuning-deep" class="mb-12"><div class="flex items-center gap-3 mb-6"><span class="text-3xl">6️⃣</span><h2 class="text-2xl font-bold">Fine-Tuning: Teaching the Specialist</h2></div><div class="card"><h3 class="text-lg font-semibold mb-4 text-blue-700">Why Fine-Tune?</h3><p class="text-gray-700 mb-4 leading-relaxed"> A pre-trained model knows general language and facts, but it doesn't know YOUR specific domain. Fine-tuning is like giving it specialized training. </p><div class="bg-gray-50 p-6 rounded-xl mb-6"><h4 class="font-medium mb-4">The Analogy: Medical School</h4><div class="space-y-3"><div class="flex items-start gap-3"><span class="text-2xl">📚</span><div><h5 class="font-medium">Pre-training = College</h5><p class="text-sm text-gray-700"> The model learns general knowledge, critical thinking, and how to communicate. Like a college graduate who knows a bit about everything. </p></div></div><div class="text-center text-2xl">↓</div><div class="flex items-start gap-3"><span class="text-2xl">🎓</span><div><h5 class="font-medium">Fine-tuning = Medical School</h5><p class="text-sm text-gray-700"> Now you give them specialized training. Thousands of examples of medical cases, diagnoses, patient interactions. They become a doctor. </p></div></div></div></div><h3 class="text-lg font-semibold mb-4 text-blue-700">How Fine-Tuning Works</h3><p class="text-gray-700 mb-4 leading-relaxed"> Instead of training from scratch (which takes weeks and costs millions), you start with a pre-trained model and continue training on your specific dataset. This is much faster because: </p><ul class="list-disc list-inside text-gray-700 space-y-2 mb-6 ml-4"><li>The model already knows language, grammar, and general facts</li><li>You only need to teach it your specific domain</li><li>Training takes hours or days, not weeks</li><li>Costs hundreds of dollars, not millions</li><li>Needs hundreds or thousands of examples, not billions</li></ul><div class="bg-green-50 p-4 rounded-lg mb-6"><h4 class="font-medium text-green-800 mb-2">✨ What Changes During Fine-Tuning?</h4><p class="text-sm text-gray-700 mb-3"> The model's weights adjust to better predict your specific examples. It learns: </p><ul class="list-disc list-inside text-sm text-gray-700 space-y-1 ml-4"><li>Your terminology and jargon</li><li>Your preferred response style and tone</li><li>Patterns specific to your domain</li><li>How to format responses the way you want</li><li>Your specific knowledge base</li></ul></div><div class="bg-blue-50 p-4 rounded-lg"><h4 class="font-medium text-blue-800 mb-2">🎯 Why Your Dataset Matters</h4><p class="text-sm text-gray-700"> Every example in your dataset is teaching the model: "When you see this kind of input, produce this kind of output." The quality and diversity of your examples directly determines the quality of your fine-tuned model. That's why edukaAI focuses so much on helping you create great examples — they become the training signal that shapes your AI's behavior. </p></div></div></section><section id="model-sizes" class="mb-12"><div class="flex items-center gap-3 mb-6"><span class="text-3xl">7️⃣</span><h2 class="text-2xl font-bold">Understanding Model Sizes</h2></div><div class="card"><h3 class="text-lg font-semibold mb-4 text-blue-700">What Does "7B" Mean?</h3><p class="text-gray-700 mb-4 leading-relaxed"> When you see "Llama 2 7B" or "GPT-3 175B", the "B" stands for <strong>billion parameters</strong>. Think of parameters as the "knobs" or "dials" inside the neural network that get adjusted during training. More parameters = more capacity to learn, but also more compute needed. </p><div class="bg-gray-50 p-6 rounded-xl mb-6"><h4 class="font-medium mb-4">The Parameter Scale</h4><div class="space-y-4"><div class="flex items-center gap-4"><div class="w-32 text-right"><span class="text-2xl">🌱</span></div><div class="flex-1 p-3 bg-green-100 rounded-lg"><h5 class="font-medium">Small (1B - 7B)</h5><p class="text-sm text-gray-700"><strong>Examples:</strong> TinyLlama, Phi-2, Llama 2 7B<br><strong>Good for:</strong> Testing, edge devices, simple tasks<br><strong>Hardware:</strong> Runs on consumer GPUs (RTX 3060)<br><strong>Speed:</strong> Very fast, low latency </p></div></div><div class="flex items-center gap-4"><div class="w-32 text-right"><span class="text-2xl">🌳</span></div><div class="flex-1 p-3 bg-blue-100 rounded-lg"><h5 class="font-medium">Medium (13B - 30B)</h5><p class="text-sm text-gray-700"><strong>Examples:</strong> Llama 2 13B, CodeLlama 13B, Mistral 7B (punches above its weight!)<br><strong>Good for:</strong> Production use, most practical applications<br><strong>Hardware:</strong> RTX 3090, RTX 4090, or cloud A10G<br><strong>Speed:</strong> Good balance of quality and speed </p></div></div><div class="flex items-center gap-4"><div class="w-32 text-right"><span class="text-2xl">🏔️</span></div><div class="flex-1 p-3 bg-purple-100 rounded-lg"><h5 class="font-medium">Large (70B - 175B)</h5><p class="text-sm text-gray-700"><strong>Examples:</strong> Llama 2 70B, GPT-3, Claude 2<br><strong>Good for:</strong> Complex reasoning, research, maximum capability<br><strong>Hardware:</strong> Multiple GPUs, A100s, or API access only<br><strong>Speed:</strong> Slower but smartest </p></div></div></div></div><h3 class="text-lg font-semibold mb-4 text-blue-700">Bigger Isn't Always Better</h3><p class="text-gray-700 mb-4 leading-relaxed"> It's tempting to think "bigger model = better," but that's not always true. A well-trained 13B model can outperform a poorly-trained 70B model on specific tasks. Plus, bigger models have downsides: </p><div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"><div class="p-4 bg-red-50 rounded-lg border border-red-200"><h5 class="font-medium text-red-800 mb-2">❌ Large Model Problems</h5><ul class="text-sm text-gray-700 space-y-1"><li>Higher inference costs (more $ per request)</li><li>Slower responses</li><li>Requires expensive hardware</li><li>Higher energy consumption</li><li>Harder to deploy on edge devices</li></ul></div><div class="p-4 bg-green-50 rounded-lg border border-green-200"><h5 class="font-medium text-green-800 mb-2">✅ Right-Size Benefits</h5><ul class="text-sm text-gray-700 space-y-1"><li>Faster responses = better UX</li><li>Lower costs = scalable</li><li>Runs on affordable hardware</li><li>Easier to fine-tune</li><li>Can deploy anywhere</li></ul></div></div><div class="bg-yellow-50 p-4 rounded-lg"><h4 class="font-medium text-yellow-800 mb-2">💡 The Sweet Spot for Beginners</h4><p class="text-sm text-yellow-700"> For your first fine-tuning project, we recommend starting with <strong>7B-13B models</strong>. They're big enough to learn your domain well, small enough to train affordably, and can run on consumer hardware. Once you master these, you can experiment with larger models. </p></div></div></section><section id="quantization" class="mb-12"><div class="flex items-center gap-3 mb-6"><span class="text-3xl">8️⃣</span><h2 class="text-2xl font-bold">Quantization: Making Models Smaller</h2></div><div class="card"><h3 class="text-lg font-semibold mb-4 text-blue-700">The Magic of Model Compression</h3><p class="text-gray-700 mb-4 leading-relaxed"> Remember those billions of parameters? Each one is stored as a number (usually 16 or 32 bits). <strong>Quantization</strong> is a technique that reduces the precision of these numbers, making the model smaller and faster while keeping most of its intelligence. Think of it like compressing an MP3 — smaller file, same song. </p><div class="bg-gray-50 p-6 rounded-xl mb-6"><h4 class="font-medium mb-4">How It Works (The Simple Version)</h4><div class="space-y-4"><div class="p-4 bg-white rounded-lg border"><h5 class="font-medium mb-2">Normal (FP16) - 16-bit precision</h5><p class="font-mono text-xs text-gray-600 mb-2"> Weight value: 0.3847265849234712 </p><p class="text-sm text-gray-700"> Very precise, but takes 16 bits to store. A 7B model needs ~14GB RAM. </p></div><div class="text-center text-2xl">↓ Quantize ↓</div><div class="p-4 bg-green-50 rounded-lg border border-green-200"><h5 class="font-medium text-green-800 mb-2">Quantized (INT8) - 8-bit precision</h5><p class="font-mono text-xs text-gray-600 mb-2"> Weight value: 0.38 </p><p class="text-sm text-gray-700"> Less precise, but only 8 bits. Same 7B model now needs ~7GB RAM — <strong>half the size!</strong></p></div><div class="text-center text-2xl">↓ Quantize More ↓</div><div class="p-4 bg-blue-50 rounded-lg border border-blue-200"><h5 class="font-medium text-blue-800 mb-2">Highly Quantized (INT4) - 4-bit precision</h5><p class="font-mono text-xs text-gray-600 mb-2"> Weight value: 0.4 </p><p class="text-sm text-gray-700"> Even less precise, only 4 bits. Same 7B model now needs ~3.5GB RAM — <strong>quarter the size!</strong></p></div></div></div><h3 class="text-lg font-semibold mb-4 text-blue-700">Common Quantization Formats</h3><div class="overflow-x-auto"><table class="w-full text-sm mb-6"><thead><tr class="border-b"><th class="text-left py-2">Format</th><th class="text-left py-2">Bits</th><th class="text-left py-2">Size (7B model)</th><th class="text-left py-2">Quality Loss</th><th class="text-left py-2">Use Case</th></tr></thead><tbody><tr class="border-b"><td class="py-2 font-medium">FP16</td><td class="py-2">16</td><td class="py-2">~14 GB</td><td class="py-2 text-green-600">None</td><td class="py-2">Training, max quality</td></tr><tr class="border-b"><td class="py-2 font-medium">INT8</td><td class="py-2">8</td><td class="py-2">~7 GB</td><td class="py-2 text-yellow-600">Minimal</td><td class="py-2">Production inference</td></tr><tr class="border-b"><td class="py-2 font-medium">INT4 (Q4)</td><td class="py-2">4</td><td class="py-2">~3.5 GB</td><td class="py-2 text-orange-600">Small</td><td class="py-2">Consumer hardware</td></tr><tr><td class="py-2 font-medium">INT4 (Q2/Q3)</td><td class="py-2">2-3</td><td class="py-2">~2-2.5 GB</td><td class="py-2 text-red-600">Noticeable</td><td class="py-2">Edge devices, testing</td></tr></tbody></table></div><h3 class="text-lg font-semibold mb-4 text-blue-700">When to Use Quantization</h3><div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6"><div class="p-4 bg-green-50 rounded-lg"><h5 class="font-medium text-green-800 mb-2">✅ Quantize When:</h5><ul class="text-sm text-gray-700 space-y-1"><li>Running inference (generating responses)</li><li>Deploying to consumer hardware</li><li>API cost reduction is important</li><li>Mobile/edge device deployment</li><li>Speed is critical</li></ul></div><div class="p-4 bg-yellow-50 rounded-lg"><h5 class="font-medium text-yellow-800 mb-2">⚠️ Don't Quantize When:</h5><ul class="text-sm text-gray-700 space-y-1"><li>Training/fine-tuning (use FP16)</li><li>Maximum accuracy is required</li><li>Complex reasoning tasks</li><li>Medical/legal applications</li><li>You have plenty of GPU memory</li></ul></div></div><div class="bg-purple-50 p-4 rounded-lg mb-6"><h4 class="font-medium text-purple-800 mb-2">🎯 Practical Example</h4><p class="text-sm text-gray-700 mb-3"> Let's say you want to run Llama 2 13B on your laptop: </p><div class="space-y-2 text-sm"><div class="flex justify-between items-center p-2 bg-white rounded"><span>Full precision (FP16):</span><span class="font-mono text-red-600">~26 GB RAM ❌</span></div><div class="flex justify-between items-center p-2 bg-white rounded"><span>8-bit quantized:</span><span class="font-mono text-yellow-600">~13 GB RAM ⚠️</span></div><div class="flex justify-between items-center p-2 bg-white rounded"><span>4-bit quantized (Q4):</span><span class="font-mono text-green-600">~6.5 GB RAM ✅</span></div></div><p class="text-sm text-gray-700 mt-3"><strong>Result:</strong> By quantizing to 4-bit, you can run a 13B model on a laptop with 8GB VRAM (like an RTX 3070) with minimal quality loss! </p></div><div class="bg-blue-50 p-4 rounded-lg"><h4 class="font-medium text-blue-800 mb-2">🔧 Tools for Quantization</h4><p class="text-sm text-gray-700 mb-2"> Popular tools for quantizing models: </p><ul class="text-sm text-gray-700 space-y-1"><li><strong>llama.cpp</strong> — Most popular, supports GGUF format</li><li><strong>AutoGPTQ</strong> — Easy quantization for HuggingFace models</li><li><strong>BitsAndBytes</strong> — 8-bit quantization for training</li><li><strong>ExLlama</strong> — Fast inference for 4-bit models</li></ul><p class="text-sm text-gray-700 mt-2"><strong>Good news:</strong> Many pre-quantized models are already available on HuggingFace — just download and use! </p></div></div></section><div class="card bg-gradient-to-br from-blue-50 to-purple-50 mb-12"><h2 class="text-xl font-semibold mb-4">🎓 What You Now Understand</h2><div class="grid grid-cols-1 md:grid-cols-2 gap-4 text-sm"><div class="p-3 bg-white rounded-lg"><strong>LLMs are next-token predictors</strong><p class="text-gray-600 mt-1">They predict one token at a time, feeding predictions back as input.</p></div><div class="p-3 bg-white rounded-lg"><strong>Tokens are the building blocks</strong><p class="text-gray-600 mt-1">Not words or characters, but pieces somewhere in between.</p></div><div class="p-3 bg-white rounded-lg"><strong>Neural networks learn patterns</strong><p class="text-gray-600 mt-1">They adjust millions of weights to get better at predictions.</p></div><div class="p-3 bg-white rounded-lg"><strong>Attention finds relationships</strong><p class="text-gray-600 mt-1">Lets tokens focus on other relevant tokens in the context.</p></div><div class="p-3 bg-white rounded-lg"><strong>Training is iterative correction</strong><p class="text-gray-600 mt-1">Show example, predict, compare to truth, adjust, repeat billions of times.</p></div><div class="p-3 bg-white rounded-lg"><strong>Fine-tuning specializes the model</strong><p class="text-gray-600 mt-1">Start with general knowledge, train on your specific examples.</p></div><div class="p-3 bg-white rounded-lg"><strong>Model size matters (but not too much)</strong><p class="text-gray-600 mt-1">7B-13B is the sweet spot. Bigger = smarter but slower and costlier.</p></div><div class="p-3 bg-white rounded-lg"><strong>Quantization makes models practical</strong><p class="text-gray-600 mt-1">Compress 16-bit weights to 4-bit. Run big models on consumer hardware!</p></div></div></div>',11)),t("div",g,[e[3]||(e[3]=t("h2",{class:"text-2xl font-bold mb-4"},"Ready to Apply This Knowledge?",-1)),e[4]||(e[4]=t("p",{class:"text-gray-600 mb-6"},"Now you understand how LLMs work. Time to build your dataset!",-1)),t("div",m,[a(s,{to:"/examples/new",class:"btn-primary"},{default:i(()=>[...e[1]||(e[1]=[o(" Create Your First Example ",-1)])]),_:1}),a(s,{to:"/help",class:"btn-secondary"},{default:i(()=>[...e[2]||(e[2]=[o(" Back to Guide ",-1)])]),_:1})])]),e[6]||(e[6]=l('<div class="mt-12 pt-8 border-t text-sm text-gray-500"><h3 class="font-semibold mb-2">Further Reading</h3><ul class="space-y-1"><li><a href="https://arxiv.org/abs/1706.03762" target="_blank" class="text-blue-600 hover:underline"> "Attention Is All You Need" — Vaswani et al. (2017) </a><span class="text-gray-400">— The original transformer paper</span></li><li><a href="https://jalammar.github.io/illustrated-transformer/" target="_blank" class="text-blue-600 hover:underline"> The Illustrated Transformer — Jay Alammar </a><span class="text-gray-400">— Visual guide to how transformers work</span></li><li><a href="https://d2l.ai/chapter_attention-mechanisms/index.html" target="_blank" class="text-blue-600 hover:underline"> Dive into Deep Learning — Attention Mechanisms </a><span class="text-gray-400">— Technical deep dive</span></li></ul></div>',1))])}}};export{v as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as y,o as l,c as o,a as t,n as p,t as a,f as _,g,h as w,b as r,w as f,F as h,r as b,i as M,j as k}from"./Cg2fM61o.js";import{_ as j}from"./C6E3Ty3z.js";const C={class:"flex items-center gap-3"},I={class:"flex-1"},$={class:"flex justify-between items-center mb-1"},B={key:0,class:"w-full bg-gray-200 rounded-full h-1.5"},N=y({__name:"MilestoneItem",props:{achieved:{type:Boolean},count:{},label:{},current:{}},setup(n){const s=c=>{const v=[10,50,250,500,750,1e3],i=v.indexOf(parseInt(c));return i>0?v[i-1]:0};return(c,v)=>(l(),o("div",C,[t("div",{class:p(["w-8 h-8 rounded-full flex items-center justify-center text-lg",n.achieved?"bg-green-100 text-green-600":"bg-gray-100 text-gray-400"])},a(n.achieved?"✅":"⏳"),3),t("div",I,[t("div",$,[t("span",{class:p(["font-medium",n.achieved?"text-green-700":"text-gray-600"])},a(n.label),3),t("span",{class:p(["text-sm",n.achieved?"text-green-600":"text-gray-500"])},a(n.count)+" examples ",3)]),n.achieved?g("",!0):(l(),o("div",B,[t("div",{class:"bg-blue-400 h-1.5 rounded-full transition-all duration-500",style:_({width:`${n.current/(parseInt(n.count)-s(n.count))*100}%`})},null,4)]))])]))}}),A=Object.assign(N,{__name:"MilestoneItem"}),O={class:"max-w-6xl mx-auto"},F={class:"card mb-8"},S={class:"flex items-center justify-between mb-6"},z={class:"text-right"},E={class:"text-4xl font-bold text-blue-600"},L={class:"mb-6"},T={class:"w-full bg-gray-200 rounded-full h-6"},D={key:0,class:"text-white text-sm font-medium"},R={class:"grid grid-cols-2 md:grid-cols-4 gap-4"},V={class:"bg-blue-50 rounded-lg p-4"},G={class:"text-2xl font-bold text-blue-600"},H={class:"bg-green-50 rounded-lg p-4"},P={class:"text-2xl font-bold text-green-600"},Q={class:"bg-yellow-50 rounded-lg p-4"},W={class:"text-2xl font-bold text-yellow-600"},q={class:"bg-purple-50 rounded-lg p-4"},U={class:"text-2xl font-bold text-purple-600"},J={class:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8"},K={class:"card"},X={class:"space-y-3"},Y={class:"card"},Z={class:"space-y-3"},tt={class:"grid grid-cols-1 md:grid-cols-3 gap-6"},et={class:"card"},st={class:"space-y-2"},at={class:"capitalize"},lt={class:"font-medium"},ot={key:0,class:"text-gray-500 text-center py-4"},nt={class:"card"},it={class:"space-y-2"},rt={class:"capitalize"},dt={class:"font-medium"},ct={key:0,class:"text-gray-500 text-center py-4"},ut={class:"card"},vt={class:"space-y-2"},mt={class:"capitalize"},gt={class:"font-medium"},xt={key:0,class:"text-gray-500 text-center py-4"},ht=y({__name:"index",setup(n){const s=M({total:0,approved:0,draft:0,rejected:0,sources:{},categories:{},difficulties:{},progress:{current:0,target:1e3,percentage:0}}),c=k(()=>Math.round(s.value.total/1e3*100)),v=i=>({manual:"Manual",claude:"Claude Code",cursor:"Cursor",opencode:"OpenCode"})[i]||i;return w(async()=>{try{const i=await $fetch("/api/stats/overview");s.value=i}catch(i){console.error("Error loading dashboard:",i)}}),(i,e)=>{const u=A,x=j;return l(),o("div",O,[e[14]||(e[14]=t("div",{class:"mb-8"},[t("h1",{class:"text-3xl font-bold mb-2"},"Welcome to edukaAI 👋"),t("p",{class:"text-gray-600"},"Learn LLM fine-tuning by building your own training dataset.")],-1)),t("div",F,[t("div",S,[e[1]||(e[1]=t("div",null,[t("h2",{class:"text-2xl font-bold mb-1"},"🎯 Goal: First Fine-Tuning"),t("p",{class:"text-gray-600"},"Build a dataset of 1000 high-quality training examples")],-1)),t("div",z,[t("div",E,a(s.value.progress?.current||0),1),e[0]||(e[0]=t("div",{class:"text-gray-500"},"/ 1000 examples",-1))])]),t("div",L,[t("div",T,[t("div",{class:"bg-gradient-to-r from-blue-500 via-purple-500 to-pink-500 h-6 rounded-full transition-all duration-700 flex items-center justify-end pr-2",style:_({width:`${Math.min(c.value,100)}%`})},[c.value>10?(l(),o("span",D,a(c.value)+"%",1)):g("",!0)],4)])]),t("div",R,[t("div",V,[t("div",G,a(s.value.total),1),e[2]||(e[2]=t("div",{class:"text-sm text-gray-600"},"Total Examples",-1))]),t("div",H,[t("div",P,a(s.value.approved),1),e[3]||(e[3]=t("div",{class:"text-sm text-gray-600"},"Approved",-1))]),t("div",Q,[t("div",W,a(s.value.draft),1),e[4]||(e[4]=t("div",{class:"text-sm text-gray-600"},"Drafts",-1))]),t("div",q,[t("div",U,a(s.value.rejected||0),1),e[5]||(e[5]=t("div",{class:"text-sm text-gray-600"},"Rejected",-1))])])]),t("div",J,[t("div",K,[e[6]||(e[6]=t("h3",{class:"text-lg font-semibold mb-4"},"🏆 Milestones",-1)),t("div",X,[r(u,{achieved:s.value.total>=10,count:"10",label:"First Steps!",current:Math.min(s.value.total,10)},null,8,["achieved","current"]),r(u,{achieved:s.value.total>=50,count:"50",label:"Getting Started",current:Math.max(0,Math.min(s.value.total-10,40))},null,8,["achieved","current"]),r(u,{achieved:s.value.total>=250,count:"250",label:"Quarter Way!",current:Math.max(0,Math.min(s.value.total-50,200))},null,8,["achieved","current"]),r(u,{achieved:s.value.total>=500,count:"500",label:"Halfway There!",current:Math.max(0,Math.min(s.value.total-250,250))},null,8,["achieved","current"]),r(u,{achieved:s.value.total>=750,count:"750",label:"Almost Ready!",current:Math.max(0,Math.min(s.value.total-500,250))},null,8,["achieved","current"]),r(u,{achieved:s.value.total>=1e3,count:"1000",label:"Ready to Train! 🎉",current:Math.max(0,Math.min(s.value.total-750,250))},null,8,["achieved","current"])])]),t("div",Y,[e[10]||(e[10]=t("h3",{class:"text-lg font-semibold mb-4"},"⚡ Quick Actions",-1)),t("div",Z,[r(x,{to:"/examples/new",class:"flex items-center gap-3 p-3 bg-blue-50 hover:bg-blue-100 rounded-lg transition-colors"},{default:f(()=>[...e[7]||(e[7]=[t("span",{class:"text-2xl"},"➕",-1),t("div",null,[t("div",{class:"font-medium"},"Create New Example"),t("div",{class:"text-sm text-gray-600"},"Add a training example manually")],-1)])]),_:1}),r(x,{to:"/import",class:"flex items-center gap-3 p-3 bg-purple-50 hover:bg-purple-100 rounded-lg transition-colors"},{default:f(()=>[...e[8]||(e[8]=[t("span",{class:"text-2xl"},"📥",-1),t("div",null,[t("div",{class:"font-medium"},"Import from AI Assistants"),t("div",{class:"text-sm text-gray-600"},"Import from Claude, Cursor, or OpenCode")],-1)])]),_:1}),r(x,{to:"/export",class:"flex items-center gap-3 p-3 bg-green-50 hover:bg-green-100 rounded-lg transition-colors"},{default:f(()=>[...e[9]||(e[9]=[t("span",{class:"text-2xl"},"📤",-1),t("div",null,[t("div",{class:"font-medium"},"Export to HuggingFace"),t("div",{class:"text-sm text-gray-600"},"Upload your dataset for training")],-1)])]),_:1})])])]),t("div",tt,[t("div",et,[e[11]||(e[11]=t("h3",{class:"text-lg font-semibold mb-4"},"📊 By Source",-1)),t("div",st,[(l(!0),o(h,null,b(s.value.sources,(m,d)=>(l(),o("div",{key:d,class:"flex justify-between items-center"},[t("span",at,a(v(d)),1),t("span",lt,a(m),1)]))),128)),!s.value.sources||Object.keys(s.value.sources).length===0?(l(),o("div",ot," No data yet ")):g("",!0)])]),t("div",nt,[e[12]||(e[12]=t("h3",{class:"text-lg font-semibold mb-4"},"📋 By Category",-1)),t("div",it,[(l(!0),o(h,null,b(s.value.categories,(m,d)=>(l(),o("div",{key:d,class:"flex justify-between items-center"},[t("span",rt,a(d),1),t("span",dt,a(m),1)]))),128)),!s.value.categories||Object.keys(s.value.categories).length===0?(l(),o("div",ct," No data yet ")):g("",!0)])]),t("div",ut,[e[13]||(e[13]=t("h3",{class:"text-lg font-semibold mb-4"},"📈 By Difficulty",-1)),t("div",vt,[(l(!0),o(h,null,b(s.value.difficulties,(m,d)=>(l(),o("div",{key:d,class:"flex justify-between items-center"},[t("span",mt,a(d),1),t("span",gt,a(m),1)]))),128)),!s.value.difficulties||Object.keys(s.value.difficulties).length===0?(l(),o("div",xt," No data yet ")):g("",!0)])])])])}}});export{ht as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{H as w,j as S,I as k,J as B,e as x,K as C,L as T,M as N,N as j,O as L}from"./Cg2fM61o.js";const M=Object.freeze({left:0,top:0,width:16,height:16}),R=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),I=Object.freeze({...M,...R});Object.freeze({...I,body:"",hidden:!1});function P(e){const[n,s,r,t]=e;if(r!==t){const o=Math.max(r,t);return[n-(o-r)/2,s-(o-t)/2,o,o]}return e}const E=/(-?[0-9.]*[0-9]+[0-9.]*)/g,V=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function v(e,n,s){if(n===1)return e;if(s=s||100,typeof e=="number")return Math.ceil(e*n*s)/s;if(typeof e!="string")return e;const r=e.split(E);if(r===null||!r.length)return e;const t=[];let o=r.shift(),i=V.test(o);for(;;){if(i){const c=parseFloat(o);isNaN(c)?t.push(o):t.push(Math.ceil(c*n*s)/s)}else t.push(o);if(o=r.shift(),o===void 0)return t.join("");i=!i}}const W=Object.freeze({width:null,height:null}),H=Object.freeze({...W,...R});function D(e,n="defs"){let s="";const r=e.indexOf("<"+n);for(;r>=0;){const t=e.indexOf(">",r),o=e.indexOf("</"+n);if(t===-1||o===-1)break;const i=e.indexOf(">",o);if(i===-1)break;s+=e.slice(t+1,o).trim(),e=e.slice(0,r).trim()+e.slice(i+1)}return{defs:s,content:e}}function G(e,n){return e?"<defs>"+e+"</defs>"+n:n}function K(e,n,s){const r=D(e);return G(r.defs,n+r.content+s)}const U=e=>e==="unset"||e==="undefined"||e==="none";function J(e,n){const s={...I,...e},r={...H,...n},t={left:s.left,top:s.top,width:s.width,height:s.height};let o=s.body;[s,r].forEach(g=>{const f=[],A=g.hFlip,O=g.vFlip;let m=g.rotate;A?O?m+=2:(f.push("translate("+(t.width+t.left).toString()+" "+(0-t.top).toString()+")"),f.push("scale(-1 1)"),t.top=t.left=0):O&&(f.push("translate("+(0-t.left).toString()+" "+(t.height+t.top).toString()+")"),f.push("scale(1 -1)"),t.top=t.left=0);let d;switch(m<0&&(m-=Math.floor(m/4)*4),m=m%4,m){case 1:d=t.height/2+t.top,f.unshift("rotate(90 "+d.toString()+" "+d.toString()+")");break;case 2:f.unshift("rotate(180 "+(t.width/2+t.left).toString()+" "+(t.height/2+t.top).toString()+")");break;case 3:d=t.width/2+t.left,f.unshift("rotate(-90 "+d.toString()+" "+d.toString()+")");break}m%2===1&&(t.left!==t.top&&(d=t.left,t.left=t.top,t.top=d),t.width!==t.height&&(d=t.width,t.width=t.height,t.height=d)),f.length&&(o=K(o,'<g transform="'+f.join(" ")+'">',"</g>"))});const i=r.width,c=r.height,a=t.width,l=t.height;let u,h;i===null?(h=c===null?"1em":c==="auto"?l:c,u=v(h,a/l)):(u=i==="auto"?a:i,h=c===null?v(u,l/a):c==="auto"?l:c);const y={},z=(g,f)=>{U(f)||(y[g]=f.toString())};z("width",u),z("height",h);const $=[t.left,t.top,a,l];return y.viewBox=$.join(" "),{attributes:y,viewBox:$,body:o}}function _(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Q(e){return"data:image/svg+xml,"+_(e)}function X(e){return'url("'+Q(e)+'")'}function Y(e,n){let s=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in n)s+=" "+r+'="'+n[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+s+">"+e+"</svg>"}function Z(e){const n={display:"inline-block",width:"1em",height:"1em"},s=e.varName;switch(e.pseudoSelector&&(n.content="''"),e.mode){case"background":s&&(n["background-image"]="var(--"+s+")"),n["background-repeat"]="no-repeat",n["background-size"]="100% 100%";break;case"mask":n["background-color"]="currentColor",s&&(n["mask-image"]=n["-webkit-mask-image"]="var(--"+s+")"),n["mask-repeat"]=n["-webkit-mask-repeat"]="no-repeat",n["mask-size"]=n["-webkit-mask-size"]="100% 100%";break}return n}function ee(e,n){const s={},r=n.varName,t=J(e);let o=t.viewBox;o[2]!==o[3]&&(n.forceSquare?o=P(o):s.width=v("1em",o[2]/o[3]));const i=X(Y(t.body.replace(/currentColor/g,n.color||"black"),{viewBox:`${o[0]} ${o[1]} ${o[2]} ${o[3]}`,width:`${o[2]}`,height:`${o[3]}`}));if(r)s["--"+r]=i;else switch(n.mode){case"background":s["background-image"]=i;break;case"mask":s["mask-image"]=s["-webkit-mask-image"]=i;break}return s}const b={selectorStart:{compressed:"{",compact:" {",expanded:" {"},selectorEnd:{compressed:"}",compact:`; }
|
|
2
|
+
`,expanded:`;
|
|
3
|
+
}
|
|
4
|
+
`},rule:{compressed:"{key}:",compact:" {key}: ",expanded:`
|
|
5
|
+
{key}: `}};function te(e,n="expanded"){const s=[];for(let r=0;r<e.length;r++){const{selector:t,rules:o}=e[r];let i=(t instanceof Array?t.join(n==="compressed"?",":", "):t)+b.selectorStart[n],c=!0;for(const a in o)c||(i+=";"),i+=b.rule[n].replace("{key}",a)+o[a],c=!1;i+=b.selectorEnd[n],s.push(i)}return s.join(n==="compressed"?"":`
|
|
6
|
+
`)}function ne(e,n={}){const s=n.customise?n.customise(e.body):e.body,r=n.mode||(n.color||!s.includes("currentColor")?"background":"mask");let t=n.varName;t===void 0&&r==="mask"&&(t="svg");const o={...n,mode:r,varName:t};r==="background"&&delete o.varName;const i={...n.rules,...Z(o),...ee({...I,...e,body:s},o)};return te([{selector:n.iconSelector||".icon",rules:i}],o.format)}async function se(e,n){if(!e)return null;const s=k(e);return s||(await B(e).catch(()=>(console.warn(`[Icon] failed to load icon \`${e}\``),null)),k(e))}function q(e){const n=w().icon,s=(n.collections||[]).sort((r,t)=>t.length-r.length);return S(()=>{const r=e(),t=r.startsWith(n.cssSelectorPrefix)?r.slice(n.cssSelectorPrefix.length):r,o=n.aliases?.[t]||t;if(!o.includes(":")){const i=s.find(c=>o.startsWith(c+"-"));return i?i+":"+o.slice(i.length+1):o}return o})}function F(e,n){if(e!==!1)return e===!0||e===null?n:e}let p;function oe(e){return e.replace(/([^\w-])/g,"\\$1")}function re(){if(p)return p;p=new Set;const e=s=>{if(s=s.replace(/^:where\((.*)\)$/,"$1").trim(),s.startsWith("."))return s},n=s=>{if(s?.length)for(const r of s){r?.cssRules&&n(r.cssRules);const t=r?.selectorText;if(typeof t=="string"){const o=e(t);o&&p.add(o)}}};if(typeof document<"u")for(const s of document.styleSheets)try{const r=s.cssRules||s.rules;n(r)}catch{}return p}const ie=x({name:"NuxtIconCss",props:{name:{type:String,required:!0},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e){const n=C(),s=w().icon,r=S(()=>e.name?s.cssSelectorPrefix+e.name:"");function t(c){if(!c)return;const a=k(c);if(a)return a;const l=n.payload?.data?.[c];if(l)return j(c,l),l}const o=S(()=>"."+oe(r.value));function i(c,a=!0){let l=o.value;s.cssWherePseudo&&(l=`:where(${l})`);const u=ne(c,{iconSelector:l,format:"compressed",customise:F(e.customize,s.customize)});return s.cssLayer&&a?`@layer ${s.cssLayer} { ${u} }`:u}{const c=re();async function a(l){if(c.has(o.value)||typeof document>"u")return;const u=document.createElement("style");u.textContent=i(l);const h=document.head.querySelector('style, link[rel="stylesheet"]');h?document.head.insertBefore(u,h):document.head.appendChild(u),c.add(o.value)}T(()=>e.name,()=>{if(c.has(o.value))return;const l=t(e.name);l?a(l):se(e.name).then(u=>{u&&a(u)}).catch(()=>null)},{immediate:!0})}return()=>N("span",{class:["iconify",r.value]})}}),ce=x({name:"NuxtIconSvg",props:{name:{type:String,required:!0},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e,{slots:n}){const s=C(),r=w().icon,t=q(()=>e.name),o="i-"+t.value;if(t.value){const i=s.payload.data[o];i&&j(t.value,i)}return()=>N(L,{icon:t.value,ssr:!0,customise:F(e.customize,r.customize)},n)}}),ae=x({name:"NuxtIcon",props:{name:{type:String,required:!0},mode:{type:String,required:!1,default:null},size:{type:[Number,String],required:!1,default:null},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e,{slots:n}){const s=C(),r=w().icon,t=q(()=>e.name),o=S(()=>s.vueApp?.component(t.value)||((e.mode||r.mode)==="svg"?ce:ie)),i=S(()=>{const c=e.size||r.size;return c?{fontSize:Number.isNaN(+c)?c:c+"px"}:null});return()=>N(o.value,{...r.attrs,name:t.value,class:r.class,style:i.value,customize:e.customize},n)}});export{ae as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as P}from"./C6E3Ty3z.js";import{e as O,o as p,c as g,a as e,g as j,t as m,n as C,F as R,r as U,b as A,w as F,d as S,i as h,j as L,_ as W,h as H,f as Q,k as y,s as J,v as w,m as _,x as K,D as N}from"./Cg2fM61o.js";const X={class:"flex items-start justify-between mb-3"},Y={class:"flex items-center gap-3"},Z=["checked"],ee={class:"text-lg font-bold text-gray-400"},te={class:"flex items-center gap-1"},oe={class:"flex gap-2"},se=["disabled"],ae=["disabled"],le={class:"mb-3"},ne={class:"text-gray-900 font-medium line-clamp-2"},ie={class:"flex flex-wrap gap-4 text-sm text-gray-500"},re={class:"flex items-center gap-1"},ue={class:"flex items-center gap-1"},de={class:"flex items-center gap-1"},ce=O({__name:"ExampleCard",props:{example:{},isSelected:{type:Boolean}},emits:["refresh","toggleSelect"],setup(d,{emit:b}){const u=d,f=b,l=h(!1),i=L(()=>({manual:"bg-gray-100 text-gray-700",claude:"bg-purple-100 text-purple-700",cursor:"bg-blue-100 text-blue-700",opencode:"bg-green-100 text-green-700"})[u.example.source]||"bg-gray-100 text-gray-700"),n=L(()=>({draft:"bg-yellow-100 text-yellow-700",review:"bg-blue-100 text-blue-700",approved:"bg-green-100 text-green-700",rejected:"bg-red-100 text-red-700"})[u.example.status]||"bg-gray-100 text-gray-700"),x=s=>({manual:"Manual",claude:"Claude",cursor:"Cursor",opencode:"OpenCode"})[s]||s,c=s=>({draft:"Draft",review:"In Review",approved:"Approved",rejected:"Rejected"})[s]||s,k=s=>({general:"General",coding:"Coding",analysis:"Analysis",explanation:"Explanation",writing:"Writing",math:"Math",science:"Science"})[s]||s,$=s=>({beginner:"Beginner",intermediate:"Intermediate",advanced:"Advanced"})[s]||s,B=s=>new Date(s).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),D=(s,a)=>s.length<=a?s:s.substring(0,a)+"...",E=async()=>{if(confirm("Are you sure you want to approve this example?")){l.value=!0;try{await $fetch(`/api/examples/${u.example.id}/approve`,{method:"POST"}),f("refresh")}catch(s){console.error("Error approving example:",s),alert("Failed to approve example")}finally{l.value=!1}}},V=async()=>{if(confirm("Are you sure you want to delete this example? This action cannot be undone.")){l.value=!0;try{await $fetch(`/api/examples/${u.example.id}`,{method:"DELETE"}),f("refresh")}catch(s){console.error("Error deleting example:",s),alert("Failed to delete example")}finally{l.value=!1}}};return(s,a)=>{const v=P;return p(),g("div",{class:C(["card hover:shadow-md transition-shadow",{"ring-2 ring-blue-400":d.isSelected}])},[e("div",X,[e("div",Y,[d.isSelected!==void 0?(p(),g("input",{key:0,type:"checkbox",checked:d.isSelected,onChange:a[0]||(a[0]=M=>s.$emit("toggle-select")),class:"w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-blue-500"},null,40,Z)):j("",!0),e("span",ee,"#"+m(d.example.id),1),e("span",{class:C(["px-2 py-1 text-xs rounded-full font-medium",i.value])},m(x(d.example.source)),3),e("div",te,[(p(!0),g(R,null,U(d.example.qualityRating,M=>(p(),g("span",{key:M,class:"text-yellow-400"},"⭐"))),128))]),e("span",{class:C(["px-2 py-1 text-xs rounded-full font-medium",n.value])},m(c(d.example.status)),3)]),e("div",oe,[d.example.status!=="approved"?(p(),g("button",{key:0,onClick:E,disabled:l.value,class:"text-green-600 hover:text-green-700 p-1",title:"Approve"},[...a[1]||(a[1]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e("polyline",{points:"20 6 9 17 4 12"})],-1)])],8,se)):j("",!0),A(v,{to:`/examples/${d.example.id}`,class:"text-blue-600 hover:text-blue-700 p-1",title:"View/Edit"},{default:F(()=>[...a[2]||(a[2]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e("path",{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"})],-1)])]),_:1},8,["to"]),e("button",{onClick:V,disabled:l.value,class:"text-red-600 hover:text-red-700 p-1",title:"Delete"},[...a[3]||(a[3]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e("path",{d:"M3 6h18"}),e("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),e("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})],-1)])],8,ae)])]),e("div",le,[e("p",ne,' "'+m(D(d.example.instruction,100))+'" ',1)]),e("div",ie,[e("span",re,[a[4]||(a[4]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),e("path",{d:"M3 9h18"}),e("path",{d:"M9 21V9"})],-1)),S(" "+m(k(d.example.category)),1)]),e("span",ue,[a[5]||(a[5]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e("path",{d:"M12 20h9"}),e("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"})],-1)),S(" "+m($(d.example.difficulty)),1)]),e("span",de,[a[6]||(a[6]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e("circle",{cx:"12",cy:"12",r:"10"}),e("polyline",{points:"12 6 12 12 16 14"})],-1)),S(" "+m(B(d.example.createdAt)),1)])])],2)}}}),pe=Object.assign(W(ce,[["__scopeId","data-v-06fe6586"]]),{__name:"ExampleCard"}),ve={class:"space-y-6"},ge={class:"card"},me={class:"flex items-center justify-between mb-4"},xe={class:"mb-4"},fe={class:"flex justify-between text-sm mb-1"},ye={class:"text-gray-600"},he={class:"w-full bg-gray-200 rounded-full h-4"},be={class:"card py-4"},we={class:"flex flex-wrap gap-4 items-center"},ke={class:"flex items-center gap-2"},_e={class:"flex items-center gap-2"},Ce={class:"flex items-center gap-2"},Se={class:"flex items-center gap-2"},$e={class:"flex items-center gap-2"},Ee={key:0,class:"text-center py-12"},Me={key:1,class:"card text-center py-12"},je={key:2,class:"space-y-4"},Ae={key:0,class:"card bg-blue-50 border-blue-300 sticky top-4 z-20"},Be={class:"flex flex-wrap items-center justify-between gap-4"},De={class:"flex items-center gap-3"},Ve=["checked"],Fe={class:"font-medium text-blue-900"},Le={class:"flex flex-wrap items-center gap-2"},Te=["disabled"],Ne={class:"grid gap-4"},Pe={key:3,class:"flex justify-between items-center card"},Oe={class:"text-sm text-gray-600"},Re={class:"flex gap-2"},Ue=["disabled"],Ie=["disabled"],ze=O({__name:"DatasetList",setup(d){const b=h(!0),u=h([]),f=h({total:0,approved:0,draft:0}),l=h({total:0,limit:20,offset:0,hasMore:!1}),i=N({search:"",status:"",source:"",category:"",sort:"newest"}),n=h([]),x=h(!1),c=N({category:"",status:""});let k=null;const $=L(()=>Math.round(f.value.total/1e3*100)),B=o=>{const t=n.value.indexOf(o);t>-1?n.value.splice(t,1):n.value.push(o)},D=()=>{n.value.length===u.value.length?n.value=[]:n.value=u.value.map(o=>o.id)},E=()=>{n.value=[],c.category="",c.status=""},V=async()=>{if(!(!c.category||n.value.length===0)){x.value=!0;try{await $fetch("/api/examples/bulk-update",{method:"POST",body:{ids:n.value,category:c.category}}),u.value.forEach(o=>{n.value.includes(o.id)&&(o.category=c.category)}),c.category=""}catch(o){console.error("Failed to bulk update category:",o),alert("Failed to update category. Please try again.")}finally{x.value=!1}}},s=async()=>{if(!(!c.status||n.value.length===0)){x.value=!0;try{await $fetch("/api/examples/bulk-update",{method:"POST",body:{ids:n.value,status:c.status}}),u.value.forEach(o=>{n.value.includes(o.id)&&(o.status=c.status)}),c.status="",v()}catch(o){console.error("Failed to bulk update status:",o),alert("Failed to update status. Please try again.")}finally{x.value=!1}}},a=async()=>{if(n.value.length!==0){x.value=!0;try{await $fetch("/api/examples/bulk-update",{method:"POST",body:{ids:n.value,status:"approved"}}),u.value.forEach(o=>{n.value.includes(o.id)&&(o.status="approved")}),E(),v()}catch(o){console.error("Failed to bulk approve:",o),alert("Failed to approve examples. Please try again.")}finally{x.value=!1}}},v=async()=>{b.value=!0;try{const o={limit:String(l.value.limit),offset:String(l.value.offset),sort:i.sort};i.status&&(o.status=i.status),i.source&&(o.source=i.source),i.category&&(o.category=i.category),i.search&&(o.search=i.search);const t=await $fetch("/api/examples",{query:o});u.value=t.examples,l.value=t.pagination,await M()}catch(o){console.error("Error loading examples:",o)}finally{b.value=!1}},M=async()=>{try{const o=await $fetch("/api/stats/overview");f.value=o}catch(o){console.error("Error loading stats:",o)}},I=()=>{k&&clearTimeout(k),k=setTimeout(()=>{l.value.offset=0,v()},300)},z=()=>{l.value.offset>0&&(l.value.offset-=l.value.limit,v())},G=()=>{l.value.hasMore&&(l.value.offset+=l.value.limit,v())};return H(()=>{v()}),(o,t)=>{const T=P,q=pe;return p(),g("div",ve,[e("div",ge,[e("div",me,[t[8]||(t[8]=e("div",null,[e("h1",{class:"text-2xl font-bold text-gray-900"},"Dataset"),e("p",{class:"text-gray-600"},"Manage your training examples")],-1)),A(T,{to:"/examples/new",class:"btn-primary"},{default:F(()=>[...t[7]||(t[7]=[S(" + New Example ",-1)])]),_:1})]),e("div",xe,[e("div",fe,[t[9]||(t[9]=e("span",{class:"font-medium"},"🎯 Goal: First Fine-Tuning",-1)),e("span",ye,m(f.value.total)+" / 1000 ("+m($.value)+"%)",1)]),e("div",he,[e("div",{class:"bg-gradient-to-r from-blue-500 to-purple-500 h-4 rounded-full transition-all duration-500",style:Q({width:`${Math.min($.value,100)}%`})},null,4)])])]),e("div",be,[e("div",we,[e("div",ke,[t[10]||(t[10]=e("label",{class:"text-sm font-medium text-gray-700"},"Search:",-1)),y(e("input",{"onUpdate:modelValue":t[0]||(t[0]=r=>i.search=r),type:"text",class:"form-input w-64",placeholder:"Search instruction or output...",onInput:I},null,544),[[J,i.search]])]),e("div",_e,[t[12]||(t[12]=e("label",{class:"text-sm font-medium text-gray-700"},"Status:",-1)),y(e("select",{"onUpdate:modelValue":t[1]||(t[1]=r=>i.status=r),class:"form-input",onChange:v},[...t[11]||(t[11]=[_('<option value="">All</option><option value="draft">Draft</option><option value="review">In Review</option><option value="approved">Approved</option><option value="rejected">Rejected</option>',5)])],544),[[w,i.status]])]),e("div",Ce,[t[14]||(t[14]=e("label",{class:"text-sm font-medium text-gray-700"},"Source:",-1)),y(e("select",{"onUpdate:modelValue":t[2]||(t[2]=r=>i.source=r),class:"form-input",onChange:v},[...t[13]||(t[13]=[_('<option value="">All</option><option value="manual">Manual</option><option value="claude">Claude</option><option value="cursor">Cursor</option><option value="opencode">OpenCode</option>',5)])],544),[[w,i.source]])]),e("div",Se,[t[16]||(t[16]=e("label",{class:"text-sm font-medium text-gray-700"},"Category:",-1)),y(e("select",{"onUpdate:modelValue":t[3]||(t[3]=r=>i.category=r),class:"form-input",onChange:v},[...t[15]||(t[15]=[_('<option value="">All</option><option value="general">General</option><option value="coding">Coding</option><option value="analysis">Analysis</option><option value="explanation">Explanation</option><option value="writing">Writing</option><option value="math">Math</option><option value="science">Science</option>',8)])],544),[[w,i.category]])]),e("div",$e,[t[18]||(t[18]=e("label",{class:"text-sm font-medium text-gray-700"},"Sort:",-1)),y(e("select",{"onUpdate:modelValue":t[4]||(t[4]=r=>i.sort=r),class:"form-input",onChange:v},[...t[17]||(t[17]=[e("option",{value:"newest"},"Newest First",-1),e("option",{value:"oldest"},"Oldest First",-1),e("option",{value:"quality"},"Quality (High to Low)",-1)])],544),[[w,i.sort]])])])]),b.value?(p(),g("div",Ee,[...t[19]||(t[19]=[e("div",{class:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"},null,-1),e("p",{class:"mt-2 text-gray-600"},"Loading examples...",-1)])])):u.value.length===0?(p(),g("div",Me,[t[21]||(t[21]=e("div",{class:"text-6xl mb-4"},"📝",-1)),t[22]||(t[22]=e("h3",{class:"text-xl font-semibold mb-2"},"No examples yet",-1)),t[23]||(t[23]=e("p",{class:"text-gray-600 mb-4"},"Start building your dataset by creating your first training example.",-1)),A(T,{to:"/examples/new",class:"btn-primary"},{default:F(()=>[...t[20]||(t[20]=[S(" Create First Example ",-1)])]),_:1})])):(p(),g("div",je,[n.value.length>0?(p(),g("div",Ae,[e("div",Be,[e("div",De,[e("input",{type:"checkbox",checked:n.value.length===u.value.length,onChange:D,class:"w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-blue-500"},null,40,Ve),e("span",Fe,m(n.value.length)+" selected ",1)]),e("div",Le,[t[26]||(t[26]=e("span",{class:"text-sm text-blue-700"},"Bulk actions:",-1)),y(e("select",{"onUpdate:modelValue":t[5]||(t[5]=r=>c.category=r),onChange:V,class:"form-input text-sm py-1"},[...t[24]||(t[24]=[_('<option value="">Change Category...</option><option value="general">General</option><option value="coding">Coding</option><option value="analysis">Analysis</option><option value="explanation">Explanation</option><option value="writing">Writing</option><option value="math">Math</option><option value="science">Science</option>',8)])],544),[[w,c.category]]),y(e("select",{"onUpdate:modelValue":t[6]||(t[6]=r=>c.status=r),onChange:s,class:"form-input text-sm py-1"},[...t[25]||(t[25]=[_('<option value="">Change Status...</option><option value="draft">Draft</option><option value="review">In Review</option><option value="approved">Approved</option><option value="rejected">Rejected</option>',5)])],544),[[w,c.status]]),e("button",{onClick:a,class:"btn-primary text-sm py-1 px-3",disabled:x.value}," ✅ Approve All ",8,Te),e("button",{onClick:E,class:"btn-secondary text-sm py-1 px-3"}," Clear ")])])])):j("",!0),e("div",Ne,[(p(!0),g(R,null,U(u.value,r=>(p(),K(q,{key:r.id,example:r,"is-selected":n.value.includes(r.id),onToggleSelect:We=>B(r.id),onRefresh:v},null,8,["example","is-selected","onToggleSelect"]))),128))])])),u.value.length>0?(p(),g("div",Pe,[e("span",Oe," Showing "+m(u.value.length)+" of "+m(l.value.total)+" examples ",1),e("div",Re,[e("button",{onClick:z,disabled:l.value.offset===0,class:C(["btn-secondary",{"opacity-50 cursor-not-allowed":l.value.offset===0}])}," Previous ",10,Ue),e("button",{onClick:G,disabled:!l.value.hasMore,class:C(["btn-secondary",{"opacity-50 cursor-not-allowed":!l.value.hasMore}])}," Next ",10,Ie)])])):j("",!0)])}}}),Ge=Object.assign(ze,{__name:"DatasetList"}),qe={class:"max-w-6xl mx-auto"},Je={__name:"index",setup(d){return(b,u)=>{const f=Ge;return p(),g("div",qe,[A(f)])}}};export{Je as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as a,a as e,m as d,d as g,y as o,F as h,r as b,t as n,g as c,i as u,o as i}from"./Cg2fM61o.js";const v={class:"max-w-4xl mx-auto"},f={class:"card mb-6"},y={class:"space-y-4"},w={class:"p-4 bg-blue-50 rounded-lg border border-blue-200"},k={class:"flex gap-2"},C={class:"p-4 bg-green-50 rounded-lg border border-green-200"},_={class:"flex gap-2"},j={key:0,class:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4"},D={class:"bg-white rounded-xl max-w-3xl w-full max-h-[80vh] overflow-auto"},S={class:"p-6"},O={class:"flex justify-between items-center mb-4"},P={key:0,class:"space-y-4"},N={class:"mb-2"},L={class:"text-xs font-semibold text-blue-600 uppercase"},T={class:"ml-2 text-xs text-gray-500"},V={class:"font-medium mb-2"},M={class:"text-sm text-gray-600 bg-white p-3 rounded border"},B={key:0,class:"text-center text-sm text-gray-500"},A={__name:"sample-datasets",setup(E){const r=u(!1),l=u(null),p=async m=>{try{const s=await(await fetch(`/sample-data/${m}-examples.json`)).json();l.value=s,r.value=!0}catch{alert("Failed to load preview")}};return(m,t)=>(i(),a("div",v,[t[11]||(t[11]=e("div",{class:"mb-6"},[e("h1",{class:"text-2xl font-bold mb-2"},"Sample Datasets & Public Data"),e("p",{class:"text-gray-600"}," Explore high-quality example datasets and learn about public datasets you can use for training. ")],-1)),e("div",f,[t[7]||(t[7]=e("h2",{class:"text-lg font-semibold mb-4"},"📦 Sample Datasets (Ready to Import)",-1)),t[8]||(t[8]=e("p",{class:"text-sm text-gray-600 mb-4"}," Download these sample datasets to see what high-quality training data looks like. You can import them directly into edukaAI. ",-1)),e("div",y,[e("div",w,[t[4]||(t[4]=d('<div class="flex justify-between items-start mb-2"><div><h3 class="font-semibold text-blue-900">Coding Examples Dataset</h3><p class="text-sm text-blue-700">5 programming examples with detailed explanations</p></div><span class="px-2 py-1 bg-blue-100 text-blue-800 text-xs rounded">JSON</span></div><p class="text-sm text-gray-600 mb-3"> Includes: Python string manipulation, JavaScript variable declarations, React data fetching, SQL injection prevention, async/await patterns. </p>',2)),e("div",k,[t[3]||(t[3]=e("a",{href:"/sample-data/coding-examples.json",download:"",class:"inline-flex items-center gap-1 px-3 py-1.5 bg-blue-600 text-white text-sm rounded hover:bg-blue-700 transition-colors"},[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})]),g(" Download JSON ")],-1)),e("button",{onClick:t[0]||(t[0]=s=>p("coding")),class:"inline-flex items-center gap-1 px-3 py-1.5 bg-white border border-blue-300 text-blue-700 text-sm rounded hover:bg-blue-50 transition-colors"}," 👁 Preview ")])]),e("div",C,[t[6]||(t[6]=d('<div class="flex justify-between items-start mb-2"><div><h3 class="font-semibold text-green-900">General Knowledge Dataset</h3><p class="text-sm text-green-700">4 diverse examples: explanations, writing, analysis</p></div><span class="px-2 py-1 bg-green-100 text-green-800 text-xs rounded">JSON</span></div><p class="text-sm text-gray-600 mb-3"> Includes: Explaining photosynthesis to a child, professional email writing, remote work analysis, ML vs traditional programming explanation. </p>',2)),e("div",_,[t[5]||(t[5]=e("a",{href:"/sample-data/general-knowledge-examples.json",download:"",class:"inline-flex items-center gap-1 px-3 py-1.5 bg-green-600 text-white text-sm rounded hover:bg-green-700 transition-colors"},[e("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})]),g(" Download JSON ")],-1)),e("button",{onClick:t[1]||(t[1]=s=>p("general")),class:"inline-flex items-center gap-1 px-3 py-1.5 bg-white border border-green-300 text-green-700 text-sm rounded hover:bg-green-50 transition-colors"}," 👁 Preview ")])])])]),t[12]||(t[12]=d('<div class="card mb-6"><h2 class="text-lg font-semibold mb-4">🌐 Public Datasets for Training</h2><p class="text-sm text-gray-600 mb-4"> These are well-known, publicly available datasets used by researchers and companies to train LLMs. You can download them and examine the format. </p><div class="space-y-4"><div class="p-4 border rounded-lg hover:shadow-md transition-shadow"><div class="flex justify-between items-start mb-2"><h3 class="font-semibold">Stanford Alpaca</h3><span class="px-2 py-1 bg-gray-100 text-gray-600 text-xs rounded">52K examples</span></div><p class="text-sm text-gray-600 mb-2"> One of the first open-source instruction-following datasets. Contains 52,000 instruction-output pairs generated using GPT-3.5. This dataset sparked the open-source LLM revolution. </p><div class="flex items-center gap-2 text-sm"><span class="text-gray-500">License: CC BY-NC 4.0 (Research only)</span></div><a href="https://github.com/tatsu-lab/stanford_alpaca" target="_blank" class="mt-2 inline-flex items-center gap-1 text-blue-600 hover:underline text-sm"> View on GitHub → </a></div><div class="p-4 border rounded-lg hover:shadow-md transition-shadow"><div class="flex justify-between items-start mb-2"><h3 class="font-semibold">Databricks Dolly</h3><span class="px-2 py-1 bg-gray-100 text-gray-600 text-xs rounded">15K examples</span></div><p class="text-sm text-gray-600 mb-2"> First commercially viable instruction dataset (CC BY-SA 3.0 license). Contains human-generated instructions covering brainstorming, classification, closed QA, generation, information extraction, and open QA. </p><div class="flex items-center gap-2 text-sm"><span class="text-green-600">✅ Commercial use allowed</span></div><a href="https://github.com/databrickslabs/dolly" target="_blank" class="mt-2 inline-flex items-center gap-1 text-blue-600 hover:underline text-sm"> View on GitHub → </a></div><div class="p-4 border rounded-lg hover:shadow-md transition-shadow"><div class="flex justify-between items-start mb-2"><h3 class="font-semibold">ShareGPT Dataset</h3><span class="px-2 py-1 bg-gray-100 text-gray-600 text-xs rounded">90K+ conversations</span></div><p class="text-sm text-gray-600 mb-2"> Real user conversations with ChatGPT, shared publicly. Shows natural user interactions and assistant responses. Great for understanding real-world conversation patterns. </p><div class="flex items-center gap-2 text-sm"><span class="text-gray-500">License: CC0 (Public Domain)</span></div><a href="https://huggingface.co/datasets/anon8231489123/ShareGPT_Vicuna_unfiltered" target="_blank" class="mt-2 inline-flex items-center gap-1 text-blue-600 hover:underline text-sm"> View on HuggingFace → </a></div><div class="p-4 border rounded-lg hover:shadow-md transition-shadow"><div class="flex justify-between items-start mb-2"><h3 class="font-semibold">OpenOrca</h3><span class="px-2 py-1 bg-gray-100 text-gray-600 text-xs rounded">~4M examples</span></div><p class="text-sm text-gray-600 mb-2"> Massive dataset of reasoning traces (chain-of-thought) collected from GPT-4. Excellent for teaching models to show their work and reason step-by-step. One of the highest-quality large-scale datasets. </p><div class="flex items-center gap-2 text-sm"><span class="text-gray-500">License: MIT</span></div><a href="https://huggingface.co/datasets/Open-Orca/OpenOrca" target="_blank" class="mt-2 inline-flex items-center gap-1 text-blue-600 hover:underline text-sm"> View on HuggingFace → </a></div><div class="p-4 border rounded-lg hover:shadow-md transition-shadow"><div class="flex justify-between items-start mb-2"><h3 class="font-semibold">CodeAlpaca</h3><span class="px-2 py-1 bg-gray-100 text-gray-600 text-xs rounded">20K examples</span></div><p class="text-sm text-gray-600 mb-2"> Programming-focused instruction dataset. Contains code generation, explanation, and debugging examples across multiple programming languages. Perfect for training coding assistants. </p><div class="flex items-center gap-2 text-sm"><span class="text-gray-500">License: CC BY-NC 4.0 (Research only)</span></div><a href="https://huggingface.co/datasets/sahil2801/CodeAlpaca-20k" target="_blank" class="mt-2 inline-flex items-center gap-1 text-blue-600 hover:underline text-sm"> View on HuggingFace → </a></div></div></div><div class="card"><h2 class="text-lg font-semibold mb-4">📥 How to Use These Datasets</h2><div class="space-y-4 text-sm"><div class="flex items-start gap-3"><div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center font-bold text-blue-600 flex-shrink-0">1</div><div><h4 class="font-medium">Download Sample Data</h4><p class="text-gray-600">Click "Download JSON" to get sample datasets in Alpaca format.</p></div></div><div class="flex items-start gap-3"><div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center font-bold text-blue-600 flex-shrink-0">2</div><div><h4 class="font-medium">Examine the Format</h4><p class="text-gray-600">Open the JSON file to see the structure: instruction, input, output, category, difficulty.</p></div></div><div class="flex items-start gap-3"><div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center font-bold text-blue-600 flex-shrink-0">3</div><div><h4 class="font-medium">Import or Create Similar</h4><p class="text-gray-600"> Use these as templates! Notice the quality: complete explanations, code examples, proper formatting. Create your own examples following this pattern. </p></div></div></div><div class="mt-6 p-4 bg-yellow-50 rounded-lg"><h4 class="font-medium text-yellow-800 mb-2">💡 Pro Tip: Learn from Examples</h4><p class="text-sm text-yellow-700 mb-2"> Before creating your own dataset, study these samples. Notice how good examples include: </p><ul class="list-disc list-inside ml-4 space-y-1 text-sm text-yellow-700"><li>Clear, specific instructions</li><li>Complete, thorough responses</li><li>Code blocks with syntax highlighting</li><li>Multiple approaches or solutions</li><li>Explanations of WHY, not just HOW</li></ul></div></div>',2)),o(r)?(i(),a("div",j,[e("div",D,[e("div",S,[e("div",O,[t[10]||(t[10]=e("h3",{class:"text-lg font-semibold"},"Dataset Preview",-1)),e("button",{onClick:t[2]||(t[2]=s=>r.value=!1),class:"text-gray-500 hover:text-gray-700"},[...t[9]||(t[9]=[e("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),o(l)?(i(),a("div",P,[(i(!0),a(h,null,b(o(l).examples.slice(0,3),(s,x)=>(i(),a("div",{key:x,class:"p-4 bg-gray-50 rounded-lg"},[e("div",N,[e("span",L,"Example "+n(x+1),1),e("span",T,n(s.category)+" | "+n(s.difficulty),1)]),e("p",V,n(s.instruction),1),e("div",M,n(s.output.substring(0,200))+"... ",1)]))),128)),o(l).examples.length>3?(i(),a("p",B," + "+n(o(l).examples.length-3)+" more examples ",1)):c("",!0)])):c("",!0)])])])):c("",!0)]))}};export{A as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as s}from"./C6E3Ty3z.js";import{_ as a,u as i,o as u,c,a as t,t as n,b as l,w as d,d as f}from"./Cg2fM61o.js";const p={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},m={class:"max-w-520px text-center"},h=["textContent"],b=["textContent"],x=["textContent"],g={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},status:{type:Number,default:404},statusText:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(e){const r=e;return i({title:`${r.status} - ${r.statusText} | ${r.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(k,_)=>{const o=s;return u(),c("div",p,[t("div",m,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:n(e.status)},null,8,h),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:n(e.statusText)},null,8,b),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:n(e.description)},null,8,x),t("div",g,[l(o,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:d(()=>[f(n(e.backHome),1)]),_:1})])])])}}},N=a(y,[["__scopeId","data-v-204d37bf"]]);export{N as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,c as s,m as a,o as l}from"./Cg2fM61o.js";const o={},i={class:"max-w-5xl mx-auto"};function r(n,e){return l(),s("div",i,[...e[0]||(e[0]=[a('<section id="field-guide" class="mb-12"><div class="flex items-center gap-3 mb-6"><span class="text-3xl">📝</span><h2 class="text-2xl font-bold">Complete Field Guide</h2></div><p class="text-lg text-gray-600 mb-6"> Every field in edukaAI serves a purpose. Master them all to create the best training dataset. </p><div class="card mb-6"><h3 class="text-xl font-semibold mb-6 text-blue-600">Core Fields (Required)</h3><div class="space-y-8"><div class="border-l-4 border-blue-500 pl-4"><h4 class="text-lg font-semibold mb-2">🎯 Instruction</h4><p class="text-gray-600 mb-3"> The main question or task. This is what the user will type to get a response from your model. </p><div class="bg-green-50 p-4 rounded-lg mb-3"><p class="text-sm text-green-800 font-medium mb-2">✅ Good Example:</p><p class="text-sm text-gray-700">"Explain how React's useEffect hook works, including the dependency array, cleanup functions, and common pitfalls to avoid. Provide code examples for each concept."</p></div><div class="bg-red-50 p-4 rounded-lg mb-3"><p class="text-sm text-red-800 font-medium mb-2">❌ Bad Example:</p><p class="text-sm text-gray-700">"React help"</p></div><div class="text-sm bg-blue-50 p-3 rounded"><strong>💡 Pro Tips:</strong><ul class="list-disc list-inside mt-1 space-y-1"><li>Be specific about what you want</li><li>Include context in the instruction if needed</li><li>Use natural language like a real user would</li><li>Length: 50-500 characters is ideal</li></ul></div></div><div class="border-l-4 border-gray-400 pl-4"><h4 class="text-lg font-semibold mb-2">📎 Input Context (Optional)</h4><p class="text-gray-600 mb-3"> Additional context that helps the AI understand the full picture. Use this for code snippets, background info, or supporting data. </p><div class="bg-yellow-50 p-4 rounded-lg mb-3"><p class="text-sm text-yellow-800 font-medium mb-2">📌 When to Use:</p><ul class="list-disc list-inside text-sm text-gray-700 space-y-1"><li>Code that needs to be explained or refactored</li><li>Error messages that need debugging</li><li>Long context that shouldn't be in the main instruction</li><li>Background information for complex questions</li></ul></div><div class="bg-green-50 p-4 rounded-lg"><p class="text-sm text-green-800 font-medium mb-2">✅ Example:</p><p class="text-sm text-gray-700 mb-2"><strong>Instruction:</strong> "What's wrong with this code and how do I fix it?"</p><p class="text-sm text-gray-700"><strong>Input:</strong> Code snippet with error</p></div></div><div class="border-l-4 border-green-500 pl-4"><h4 class="text-lg font-semibold mb-2">📝 Output / Response</h4><p class="text-gray-600 mb-3"> The ideal AI response. This is what you want the model to learn to produce. Make it as good as you want your AI to be. </p><div class="bg-green-50 p-4 rounded-lg mb-3"><p class="text-sm text-green-800 font-medium mb-2">✅ What Makes Good Output:</p><ul class="list-disc list-inside text-sm text-gray-700 space-y-1"><li><strong>Directly answers</strong> the instruction</li><li><strong>Complete and thorough</strong> - doesn't leave the user hanging</li><li><strong>Well-structured</strong> - uses formatting, lists, code blocks</li><li><strong>Accurate</strong> - factually correct information</li><li><strong>Appropriate tone</strong> - matches your desired style</li><li><strong>Includes examples</strong> - shows, don't just tell</li><li><strong>Explains reasoning</strong> - helps user understand why</li></ul></div><div class="text-sm bg-red-50 p-3 rounded"><strong>⚠️ Common Mistakes:</strong><ul class="list-disc list-inside mt-1 space-y-1"><li>Too short or incomplete</li><li>Doesn't actually answer the question</li><li>Contains errors or bad advice</li><li>Too generic or vague</li></ul></div></div></div></div><div class="card mb-6"><h3 class="text-xl font-semibold mb-6 text-purple-600">Metadata Fields</h3><div class="space-y-6"><div class="border-l-4 border-purple-400 pl-4"><h4 class="font-semibold mb-2">🎭 System Prompt</h4><p class="text-gray-600 mb-3"> Defines the AI's personality, role, and behavior. Think of it as the "character sheet" for your AI. </p><div class="bg-purple-50 p-4 rounded-lg"><p class="text-sm text-purple-800 font-medium mb-2">✅ Example System Prompts:</p><div class="space-y-2 text-sm"><p class="bg-white p-2 rounded">"You are a patient senior software engineer who mentors junior developers. Explain concepts clearly, use analogies, and always provide code examples."</p><p class="bg-white p-2 rounded">"You are a concise technical writer. Provide direct, accurate answers without fluff. Focus on practical implementation."</p><p class="bg-white p-2 rounded">"You are an enthusiastic teacher who makes complex topics fun and accessible. Use analogies and real-world examples."</p></div></div><p class="text-sm text-gray-500 mt-3"><strong>Tip:</strong> Use the same system prompt across related examples to maintain consistent personality. </p></div><div class="border-l-4 border-purple-400 pl-4"><h4 class="font-semibold mb-2">🏷️ Category</h4><p class="text-gray-600 mb-3">Organizes your dataset into topics.</p><div class="grid grid-cols-2 md:grid-cols-4 gap-2 text-sm"><div class="bg-gray-100 p-2 rounded text-center"><strong>Coding</strong><p class="text-xs text-gray-600">Programming, debugging, architecture</p></div><div class="bg-gray-100 p-2 rounded text-center"><strong>Explanation</strong><p class="text-xs text-gray-600">Concepts, how-tos, tutorials</p></div><div class="bg-gray-100 p-2 rounded text-center"><strong>Analysis</strong><p class="text-xs text-gray-600">Data, reviews, debugging</p></div><div class="bg-gray-100 p-2 rounded text-center"><strong>Writing</strong><p class="text-xs text-gray-600">Content, emails, docs</p></div><div class="bg-gray-100 p-2 rounded text-center"><strong>Math</strong><p class="text-xs text-gray-600">Calculations, problems</p></div><div class="bg-gray-100 p-2 rounded text-center"><strong>Science</strong><p class="text-xs text-gray-600">Scientific topics</p></div><div class="bg-gray-100 p-2 rounded text-center col-span-2"><strong>General</strong><p class="text-xs text-gray-600">Everything else</p></div></div></div><div class="border-l-4 border-purple-400 pl-4"><h4 class="font-semibold mb-2">📊 Difficulty</h4><p class="text-gray-600 mb-3">Tracks complexity level. Aim for a mix of difficulties in your dataset.</p><div class="grid grid-cols-1 md:grid-cols-3 gap-3"><div class="bg-green-50 p-3 rounded-lg"><strong class="text-green-700">Beginner</strong><p class="text-sm text-gray-600 mt-1">Basic concepts, simple tasks, foundational knowledge</p><p class="text-xs text-gray-500 mt-2">Example: "What is a variable?"</p></div><div class="bg-yellow-50 p-3 rounded-lg"><strong class="text-yellow-700">Intermediate</strong><p class="text-sm text-gray-600 mt-1">Practical applications, combining concepts</p><p class="text-xs text-gray-500 mt-2">Example: "How do I use async/await with error handling?"</p></div><div class="bg-red-50 p-3 rounded-lg"><strong class="text-red-700">Advanced</strong><p class="text-sm text-gray-600 mt-1">Complex reasoning, optimization, architecture</p><p class="text-xs text-gray-500 mt-2">Example: "Design a distributed system for 1M concurrent users"</p></div></div></div><div class="border-l-4 border-purple-400 pl-4"><h4 class="font-semibold mb-2">⭐ Quality Rating (1-5 Stars)</h4><p class="text-gray-600 mb-3">Your assessment of how good this training example is.</p><div class="space-y-2 text-sm"><div class="flex items-center gap-3"><span class="text-2xl">⭐</span><div><strong>Poor</strong><p class="text-gray-600">Major issues, shouldn't be used for training</p></div></div><div class="flex items-center gap-3"><span class="text-2xl">⭐⭐</span><div><strong>Fair</strong><p class="text-gray-600">Significant problems, needs major revision</p></div></div><div class="flex items-center gap-3"><span class="text-2xl">⭐⭐⭐</span><div><strong>Good</strong><p class="text-gray-600">Acceptable quality, could be improved</p></div></div><div class="flex items-center gap-3"><span class="text-2xl">⭐⭐⭐⭐</span><div><strong>Very Good</strong><p class="text-gray-600">Solid example, minor improvements possible</p></div></div><div class="flex items-center gap-3"><span class="text-2xl">⭐⭐⭐⭐⭐</span><div><strong>Excellent</strong><p class="text-gray-600">Perfect example, ideal for training</p></div></div></div><p class="text-sm text-gray-500 mt-3"><strong>Tip:</strong> Only approve examples with 3+ stars for training. Reject 1-2 star examples. </p></div><div class="border-l-4 border-purple-400 pl-4"><h4 class="font-semibold mb-2">🏷️ Tags</h4><p class="text-gray-600 mb-3">Custom labels for filtering and organization.</p><div class="flex flex-wrap gap-2 mb-3"><span class="px-2 py-1 bg-blue-100 text-blue-700 text-xs rounded">javascript</span><span class="px-2 py-1 bg-blue-100 text-blue-700 text-xs rounded">react</span><span class="px-2 py-1 bg-blue-100 text-blue-700 text-xs rounded">debugging</span><span class="px-2 py-1 bg-blue-100 text-blue-700 text-xs rounded">best-practices</span><span class="px-2 py-1 bg-blue-100 text-blue-700 text-xs rounded">performance</span></div><p class="text-sm text-gray-500"> Add relevant keywords to make examples easier to find later. </p></div><div class="border-l-4 border-purple-400 pl-4"><h4 class="font-semibold mb-2">📝 Notes</h4><p class="text-gray-600 mb-3">Document why this is a good example or what could be improved.</p><div class="bg-yellow-50 p-3 rounded text-sm"><strong>Example notes:</strong><ul class="list-disc list-inside mt-1 space-y-1"><li>"Clear explanation with multiple examples - great for training"</li><li>"Output needs more detail about error handling"</li><li>"Imported from Claude conversation, needs review"</li><li>"Perfect beginner example, covers common confusion"</li></ul></div></div></div></div></section>',1)])])}const p=t(o,[["render",r]]);export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as s,c as t,m as a,o as i}from"./Cg2fM61o.js";const r={},l={class:"max-w-5xl mx-auto"};function o(n,e){return i(),t("div",l,[...e[0]||(e[0]=[a('<section id="best-practices" class="mb-12"><div class="flex items-center gap-3 mb-6"><span class="text-3xl">⭐</span><h2 class="text-2xl font-bold">Best Practices & Expert Tips</h2></div><div class="grid grid-cols-1 md:grid-cols-2 gap-6"><div class="card"><div class="flex items-start gap-3"><div class="flex-shrink-0 w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center text-xl">1</div><div><h3 class="font-semibold mb-2">Quantity vs Quality</h3><p class="text-gray-600 text-sm"> 100 excellent examples beat 1000 mediocre ones. Aim for quality first, then quantity. Review and improve your examples regularly. </p></div></div></div><div class="card"><div class="flex items-start gap-3"><div class="flex-shrink-0 w-10 h-10 bg-green-100 rounded-full flex items-center justify-center text-xl">2</div><div><h3 class="font-semibold mb-2">Diversity is Key</h3><p class="text-gray-600 text-sm"> Include different question styles, formats, and difficulty levels. Don't make all examples sound the same—real users ask questions differently. </p></div></div></div><div class="card"><div class="flex items-start gap-3"><div class="flex-shrink-0 w-10 h-10 bg-purple-100 rounded-full flex items-center justify-center text-xl">3</div><div><h3 class="font-semibold mb-2">Use Real Conversations</h3><p class="text-gray-600 text-sm"> Import from Claude, Cursor, or your actual user interactions. Real conversations are better than synthetic examples. </p></div></div></div><div class="card"><div class="flex items-start gap-3"><div class="flex-shrink-0 w-10 h-10 bg-orange-100 rounded-full flex items-center justify-center text-xl">4</div><div><h3 class="font-semibold mb-2">Cover Edge Cases</h3><p class="text-gray-600 text-sm"> Include examples of common mistakes, error handling, and unusual scenarios. Your model should know what NOT to do too. </p></div></div></div><div class="card"><div class="flex items-start gap-3"><div class="flex-shrink-0 w-10 h-10 bg-pink-100 rounded-full flex items-center justify-center text-xl">5</div><div><h3 class="font-semibold mb-2">Be Consistent</h3><p class="text-gray-600 text-sm"> Use the same system prompt for related examples. Consistent tone and style help the model learn your brand voice. </p></div></div></div><div class="card"><div class="flex items-start gap-3"><div class="flex-shrink-0 w-10 h-10 bg-yellow-100 rounded-full flex items-center justify-center text-xl">6</div><div><h3 class="font-semibold mb-2">Show, Don't Just Tell</h3><p class="text-gray-600 text-sm"> Good outputs include code examples, step-by-step explanations, and concrete demonstrations. Abstract explanations alone are weak. </p></div></div></div><div class="card"><div class="flex items-start gap-3"><div class="flex-shrink-0 w-10 h-10 bg-indigo-100 rounded-full flex items-center justify-center text-xl">7</div><div><h3 class="font-semibold mb-2">Iterate & Improve</h3><p class="text-gray-600 text-sm"> Don't aim for perfect on the first try. Create examples, review them, improve them. It's a process, not a one-time task. </p></div></div></div><div class="card"><div class="flex items-start gap-3"><div class="flex-shrink-0 w-10 h-10 bg-teal-100 rounded-full flex items-center justify-center text-xl">8</div><div><h3 class="font-semibold mb-2">Test Your Dataset</h3><p class="text-gray-600 text-sm"> Before training 1000 examples, try training on 100 first. Test if the model learns the right patterns. Fix issues early. </p></div></div></div></div><div class="card mt-6"><h3 class="text-lg font-semibold mb-4">🚀 Advanced Techniques</h3><div class="space-y-4"><div class="p-4 bg-gray-50 rounded-lg"><h4 class="font-medium mb-2">Chain of Thought Examples</h4><p class="text-sm text-gray-600"> For complex reasoning tasks, include examples where the AI shows its thinking process before giving the answer. This teaches the model to reason step-by-step. </p><div class="mt-2 p-2 bg-white rounded border text-xs"><strong>Example:</strong> "Let me think through this... First, I'll check X. Then, I'll verify Y. Based on this analysis, the answer is Z." </div></div><div class="p-4 bg-gray-50 rounded-lg"><h4 class="font-medium mb-2">Few-Shot Prompting in Examples</h4><p class="text-sm text-gray-600"> Include examples where the instruction provides 2-3 examples of the desired format, then asks for a new one in the same format. </p></div><div class="p-4 bg-gray-50 rounded-lg"><h4 class="font-medium mb-2">Negative Examples (What NOT to do)</h4><p class="text-sm text-gray-600"> Occasionally include examples where the instruction asks for something and the output explains why it's not possible or inappropriate. This helps the model learn boundaries. </p></div><div class="p-4 bg-gray-50 rounded-lg"><h4 class="font-medium mb-2">Progressive Complexity</h4><p class="text-sm text-gray-600"> Create sequences of examples that build on each other. Start with basics, then gradually introduce complexity. This helps the model learn dependencies between concepts. </p></div></div></div></section><section id="common-mistakes" class="mb-12"><div class="flex items-center gap-3 mb-6"><span class="text-3xl">⚠️</span><h2 class="text-2xl font-bold">Common Mistakes to Avoid</h2></div><div class="space-y-4"><div class="card border-l-4 border-red-400"><h3 class="font-semibold text-lg mb-2 text-red-700">❌ Mistake #1: Vague Instructions</h3><p class="text-gray-600 mb-3"> Instructions like "help me with Python" or "explain this" are too vague. The model can't learn from ambiguous inputs. </p><div class="bg-green-50 p-3 rounded text-sm"><strong>✅ Instead:</strong> "How do I handle file reading errors in Python with proper exception handling and user-friendly error messages?" </div></div><div class="card border-l-4 border-red-400"><h3 class="font-semibold text-lg mb-2 text-red-700">❌ Mistake #2: Inconsistent Style</h3><p class="text-gray-600 mb-3"> Mixing very formal responses with casual ones, or changing the AI's "personality" between examples confuses the model. </p><div class="bg-green-50 p-3 rounded text-sm"><strong>✅ Instead:</strong> Pick a consistent tone and stick with it. Use system prompts to maintain consistency across related examples. </div></div><div class="card border-l-4 border-red-400"><h3 class="font-semibold text-lg mb-2 text-red-700">❌ Mistake #3: Too Many Similar Examples</h3><p class="text-gray-600 mb-3"> Creating 100 variations of "How do I print in Python?" doesn't help. It just bloats your dataset without adding value. </p><div class="bg-green-50 p-3 rounded text-sm"><strong>✅ Instead:</strong> Cover diverse topics and question types. Quality diversity beats quantity similarity. </div></div><div class="card border-l-4 border-red-400"><h3 class="font-semibold text-lg mb-2 text-red-700">❌ Mistake #4: Ignoring Quality Ratings</h3><p class="text-gray-600 mb-3"> Marking every example as 5-star or not using the quality system means you'll train on bad data. </p><div class="bg-green-50 p-3 rounded text-sm"><strong>✅ Instead:</strong> Be honest with ratings. Reject 1-2 star examples. Only approve 3+ stars. Review and improve constantly. </div></div><div class="card border-l-4 border-red-400"><h3 class="font-semibold text-lg mb-2 text-red-700">❌ Mistake #5: Rushing to 1000</h3><p class="text-gray-600 mb-3"> Focusing only on the number without caring about quality. Bad examples actively harm your model. </p><div class="bg-green-50 p-3 rounded text-sm"><strong>✅ Instead:</strong> Focus on creating 10 excellent examples, then 50, then 100. Build quality incrementally. </div></div><div class="card border-l-4 border-red-400"><h3 class="font-semibold text-lg mb-2 text-red-700">❌ Mistake #6: Not Using Categories</h3><p class="text-gray-600 mb-3"> Leaving all examples as "general" makes it impossible to track dataset balance or find specific types later. </p><div class="bg-green-50 p-3 rounded text-sm"><strong>✅ Instead:</strong> Always categorize. Aim for a balanced mix: 40% coding, 30% explanation, 20% analysis, 10% other. </div></div><div class="card border-l-4 border-red-400"><h3 class="font-semibold text-lg mb-2 text-red-700">❌ Mistake #7: Outputs Too Short</h3><p class="text-gray-600 mb-3"> One-sentence outputs don't teach the model enough. They learn to be brief instead of helpful. </p><div class="bg-green-50 p-3 rounded text-sm"><strong>✅ Instead:</strong> Outputs should be 3-10 sentences minimum for simple questions, longer for complex ones. Include examples and explanations. </div></div><div class="card border-l-4 border-red-400"><h3 class="font-semibold text-lg mb-2 text-red-700">❌ Mistake #8: Wrong Difficulty Mix</h3><p class="text-gray-600 mb-3"> Having only beginner OR only advanced examples limits your model. It won't handle the full range of user needs. </p><div class="bg-green-50 p-3 rounded text-sm"><strong>✅ Instead:</strong> Aim for 30% beginner, 50% intermediate, 20% advanced. This prepares your model for all user levels. </div></div></div></section>',2)])])}const c=s(r,[["render",o]]);export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as p}from"./C6E3Ty3z.js";import{e as v,h as u,c,a as t,b as o,w as n,t as r,y as d,f as w,Q as h,i as g,o as k,j as x,_ as f}from"./Cg2fM61o.js";const m={class:"min-h-screen bg-gray-50"},y={class:"fixed left-0 top-0 h-full w-64 bg-white border-r border-gray-200 z-40"},_={class:"p-6"},b={class:"space-y-2"},M={class:"absolute bottom-0 left-0 right-0 p-6 border-t border-gray-200 bg-gray-50"},C={class:"mb-2"},B={class:"text-sm text-gray-500 float-right"},j={class:"w-full bg-gray-200 rounded-full h-2"},z={class:"text-xs text-gray-500 mt-2"},H={class:"ml-64 p-8"},L=v({__name:"default",setup(S){const a=g(0),i=x(()=>Math.round(a.value/1e3*100));return u(async()=>{try{const l=await $fetch("/api/stats/overview");a.value=l.total}catch(l){console.error("Error loading stats:",l)}}),(l,s)=>{const e=p;return k(),c("div",m,[t("aside",y,[t("div",_,[s[10]||(s[10]=t("div",{class:"flex items-center gap-2 mb-8"},[t("div",{class:"w-8 h-8 bg-gradient-to-br from-blue-500 to-purple-500 rounded-lg flex items-center justify-center text-white font-bold"}," e "),t("span",{class:"text-xl font-bold"},"edukaAI")],-1)),t("nav",b,[o(e,{to:"/",class:"nav-link","active-class":"nav-link-active"},{default:n(()=>[...s[0]||(s[0]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),t("polyline",{points:"9 22 9 12 15 12 15 22"})],-1),t("span",null,"Dashboard",-1)])]),_:1}),o(e,{to:"/examples",class:"nav-link","active-class":"nav-link-active"},{default:n(()=>[...s[1]||(s[1]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"}),t("polyline",{points:"14 2 14 8 20 8"}),t("line",{x1:"16",x2:"8",y1:"13",y2:"13"}),t("line",{x1:"16",x2:"8",y1:"17",y2:"17"}),t("line",{x1:"10",x2:"8",y1:"9",y2:"9"})],-1),t("span",null,"Dataset",-1)])]),_:1}),o(e,{to:"/import",class:"nav-link","active-class":"nav-link-active"},{default:n(()=>[...s[2]||(s[2]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t("polyline",{points:"17 8 12 3 7 8"}),t("line",{x1:"12",x2:"12",y1:"3",y2:"15"})],-1),t("span",null,"Import",-1)])]),_:1}),o(e,{to:"/export",class:"nav-link","active-class":"nav-link-active"},{default:n(()=>[...s[3]||(s[3]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t("polyline",{points:"7 10 12 15 17 10"}),t("line",{x1:"12",x2:"12",y1:"15",y2:"3"})],-1),t("span",null,"Export",-1)])]),_:1}),s[9]||(s[9]=t("div",{class:"pt-4 pb-2"},[t("span",{class:"px-3 text-xs font-semibold text-gray-400 uppercase tracking-wider"},"Learn")],-1)),o(e,{to:"/help",class:"nav-link","active-class":"nav-link-active"},{default:n(()=>[...s[4]||(s[4]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"})],-1),t("span",null,"Guide",-1)])]),_:1}),o(e,{to:"/help/huggingface",class:"nav-link","active-class":"nav-link-active"},{default:n(()=>[...s[5]||(s[5]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M12 2a10 10 0 1 0 10 10H12V2z"}),t("path",{d:"M12 12 2.5 12"})],-1),t("span",null,"What's Hugging Face?",-1)])]),_:1}),o(e,{to:"/help/axolotl",class:"nav-link","active-class":"nav-link-active"},{default:n(()=>[...s[6]||(s[6]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"}),t("path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"}),t("path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"}),t("path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"})],-1),t("span",null,"What's Axolotl?",-1)])]),_:1}),o(e,{to:"/help/first-training",class:"nav-link","active-class":"nav-link-active"},{default:n(()=>[...s[7]||(s[7]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})],-1),t("span",null,"🚀 Your First Training",-1)])]),_:1}),o(e,{to:"/sample-datasets",class:"nav-link","active-class":"nav-link-active"},{default:n(()=>[...s[8]||(s[8]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),t("path",{d:"M2 17l10 5 10-5"}),t("path",{d:"M2 12l10 5 10-5"})],-1),t("span",null,"Sample Data",-1)])]),_:1})])]),t("div",M,[t("div",C,[s[11]||(s[11]=t("span",{class:"text-sm font-medium"},"Progress to 1000",-1)),t("span",B,r(d(i))+"%",1)]),t("div",j,[t("div",{class:"bg-gradient-to-r from-blue-500 to-purple-500 h-2 rounded-full transition-all duration-500",style:w({width:`${Math.min(d(i),100)}%`})},null,4)]),t("p",z,r(a.value)+" examples created ",1)])]),t("main",H,[h(l.$slots,"default",{},void 0)])])}}}),V=f(L,[["__scopeId","data-v-108119f7"]]);export{V as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as v}from"./C6E3Ty3z.js";import{_ as g}from"./CW57JW4s.js";import{B as E,A as w,h as B,c as i,a as t,t as u,y as s,b as x,w as _,x as N,i as c,o,d as y}from"./Cg2fM61o.js";const $={class:"max-w-4xl mx-auto"},C={class:"mb-6 flex items-center justify-between"},D={class:"text-2xl font-bold mb-2"},F={key:0,class:"text-center py-12"},U={key:1,class:"card text-center py-12"},V={class:"text-red-600"},T={__name:"[id]",setup(L){const l=E(),d=w(),n=c(!0),r=c(null),p=c(null),f=async()=>{try{n.value=!0;const a=await $fetch(`/api/examples/${l.params.id}`);p.value=a.example}catch(a){r.value="Failed to load example. It may have been deleted.",console.error("Error loading example:",a)}finally{n.value=!1}},b=async a=>{try{(await $fetch(`/api/examples/${l.params.id}`,{method:"PUT",body:a})).success&&(alert("Example updated successfully!"),d.push("/examples"))}catch(e){console.error("Error updating example:",e),alert("Failed to update example. Please try again.")}},h=()=>{d.push("/examples")};return B(()=>{f()}),(a,e)=>{const m=v,k=g;return o(),i("div",$,[t("div",C,[t("div",null,[t("h1",D,"Edit Example #"+u(s(l).params.id),1),e[0]||(e[0]=t("p",{class:"text-gray-600"},"Update your training example details.",-1))]),x(m,{to:"/examples",class:"btn-secondary"},{default:_(()=>[...e[1]||(e[1]=[y(" ← Back to Dataset ",-1)])]),_:1})]),s(n)?(o(),i("div",F,[...e[2]||(e[2]=[t("div",{class:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"},null,-1),t("p",{class:"mt-2 text-gray-600"},"Loading example...",-1)])])):s(r)?(o(),i("div",U,[t("p",V,u(s(r)),1),x(m,{to:"/examples",class:"btn-primary mt-4 inline-block"},{default:_(()=>[...e[3]||(e[3]=[y(" Back to Dataset ",-1)])]),_:1})])):(o(),N(k,{key:2,"initial-data":s(p),onSubmit:b,onCancel:h},null,8,["initial-data"]))])}}};export{T as default};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import{_ as s,c as t,m as n,o as r}from"./Cg2fM61o.js";const a={},o={class:"max-w-5xl mx-auto"};function i(d,e){return r(),t("div",o,[...e[0]||(e[0]=[n(`<section id="real-examples" class="mb-12"><div class="flex items-center gap-3 mb-6"><span class="text-3xl">💡</span><h2 class="text-2xl font-bold">Real-World Examples</h2></div><p class="text-lg text-gray-600 mb-6"> Study these examples to understand what makes a great training example. Each shows different techniques and best practices. </p><div class="card mb-6"><div class="flex items-center justify-between mb-4"><div class="flex items-center gap-2"><span class="text-2xl">💻</span><h3 class="text-xl font-semibold">Example 1: Coding - Error Handling</h3></div><div class="flex gap-2"><span class="px-2 py-1 bg-blue-100 text-blue-700 text-xs rounded">Coding</span><span class="px-2 py-1 bg-green-100 text-green-700 text-xs rounded">⭐⭐⭐⭐⭐</span><span class="px-2 py-1 bg-purple-100 text-purple-700 text-xs rounded">Intermediate</span></div></div><div class="space-y-4"><div class="p-4 bg-blue-50 rounded-lg"><div class="text-sm text-blue-800 font-medium mb-2">🎯 Instruction:</div><p class="text-gray-700"> "I'm getting a 'TypeError: Cannot read property 'map' of undefined' error in my React component. How do I properly handle this and show a user-friendly error message instead of crashing?" </p></div><div class="p-4 bg-gray-50 rounded-lg"><div class="text-sm text-gray-800 font-medium mb-2">📎 Input:</div><pre class="text-sm bg-gray-100 p-2 rounded overflow-x-auto"><code>function UserList({ users }) {
|
|
2
|
+
return (
|
|
3
|
+
<div>
|
|
4
|
+
{users.map(user => (
|
|
5
|
+
<div key={user.id}>{user.name}</div>
|
|
6
|
+
))}
|
|
7
|
+
</div>
|
|
8
|
+
)
|
|
9
|
+
}</code></pre></div><div class="p-4 bg-green-50 rounded-lg"><div class="text-sm text-green-800 font-medium mb-2">📝 Output:</div><div class="text-gray-700 text-sm space-y-2"><p>This error occurs when <code>users</code> is undefined or null when the component tries to render. Here are several ways to handle this safely:</p><p><strong>Option 1: Default Prop Value (Recommended)</strong></p><pre class="bg-gray-100 p-2 rounded overflow-x-auto"><code>function UserList({ users = [] }) {
|
|
10
|
+
return (
|
|
11
|
+
<div>
|
|
12
|
+
{users.map(user => (
|
|
13
|
+
<div key={user.id}>{user.name}</div>
|
|
14
|
+
))}
|
|
15
|
+
</div>
|
|
16
|
+
)
|
|
17
|
+
}</code></pre><p><strong>Option 2: Conditional Rendering</strong></p><pre class="bg-gray-100 p-2 rounded overflow-x-auto"><code>function UserList({ users }) {
|
|
18
|
+
if (!users) {
|
|
19
|
+
return <div>Loading users...</div>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (users.length === 0) {
|
|
23
|
+
return <div>No users found</div>
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<div>
|
|
28
|
+
{users.map(user => (
|
|
29
|
+
<div key={user.id}>{user.name}</div>
|
|
30
|
+
))}
|
|
31
|
+
</div>
|
|
32
|
+
)
|
|
33
|
+
}</code></pre><p><strong>Option 3: Optional Chaining</strong></p><pre class="bg-gray-100 p-2 rounded overflow-x-auto"><code>function UserList({ users }) {
|
|
34
|
+
return (
|
|
35
|
+
<div>
|
|
36
|
+
{users?.map(user => (
|
|
37
|
+
<div key={user.id}>{user.name}</div>
|
|
38
|
+
)) ?? <p>No users available</p>}
|
|
39
|
+
</div>
|
|
40
|
+
)
|
|
41
|
+
}</code></pre><p><strong>Why this happens:</strong> The component receives props before the data is loaded, or the API call fails. Always assume data might be undefined and handle it gracefully.</p><p><strong>Best Practice:</strong> Combine default props with loading states and empty states for the best user experience.</p></div></div><div class="p-3 bg-purple-50 rounded-lg text-sm"><strong>🏷️ Tags:</strong><span class="inline-block bg-white px-2 py-0.5 rounded ml-2 mr-1">javascript</span><span class="inline-block bg-white px-2 py-0.5 rounded mr-1">react</span><span class="inline-block bg-white px-2 py-0.5 rounded mr-1">error-handling</span><span class="inline-block bg-white px-2 py-0.5 rounded">debugging</span></div><div class="p-3 bg-yellow-50 rounded-lg text-sm"><strong>📝 Notes:</strong> Great example because it includes: 1) Explanation of why the error happens, 2) Multiple solution approaches, 3) Code examples for each, 4) Best practice guidance. Shows the complete picture. </div></div></div><div class="card mb-6"><div class="flex items-center justify-between mb-4"><div class="flex items-center gap-2"><span class="text-2xl">📚</span><h3 class="text-xl font-semibold">Example 2: Concept Explanation</h3></div><div class="flex gap-2"><span class="px-2 py-1 bg-blue-100 text-blue-700 text-xs rounded">Explanation</span><span class="px-2 py-1 bg-green-100 text-green-700 text-xs rounded">⭐⭐⭐⭐⭐</span><span class="px-2 py-1 bg-yellow-100 text-yellow-700 text-xs rounded">Beginner</span></div></div><div class="space-y-4"><div class="p-4 bg-blue-50 rounded-lg"><div class="text-sm text-blue-800 font-medium mb-2">🎯 Instruction:</div><p class="text-gray-700"> "I'm new to programming. Can you explain what a 'variable' is, why we need them, and show me examples in Python? Use simple language and analogies." </p></div><div class="p-4 bg-green-50 rounded-lg"><div class="text-sm text-green-800 font-medium mb-2">📝 Output:</div><div class="text-gray-700 text-sm space-y-3"><p>Think of a variable like a labeled box where you can store something. Just like you might have a box labeled "Photos" to store pictures, or "Recipes" for cooking instructions, in programming we use variables to store data we want to use later.</p><p><strong>Why do we need variables?</strong></p><ul class="list-disc list-inside space-y-1"><li>To remember information (like a user's name)</li><li>To reuse the same value multiple times</li><li>To make our code easier to understand and change</li></ul><p><strong>Real-world analogy:</strong> Imagine you're planning a party. Instead of saying "We need 8 plates, 8 forks, and 8 napkins for our 8 guests" every time, you could say:</p><pre class="bg-gray-100 p-2 rounded mt-2"><code>guests = 8
|
|
42
|
+
print(f"We need {guests} plates")
|
|
43
|
+
print(f"We need {guests} forks")
|
|
44
|
+
print(f"We need {guests} napkins")</code></pre><p><strong>Examples in Python:</strong></p><pre class="bg-gray-100 p-2 rounded"><code># Storing different types of data
|
|
45
|
+
name = "Alice" # Text (string)
|
|
46
|
+
age = 25 # Number (integer)
|
|
47
|
+
height = 5.6 # Decimal number (float)
|
|
48
|
+
is_student = True # Yes/No value (boolean)
|
|
49
|
+
|
|
50
|
+
# Using variables
|
|
51
|
+
print(f"Hello, {name}!") # Hello, Alice!
|
|
52
|
+
print(f"You are {age} years old.") # You are 25 years old.
|
|
53
|
+
|
|
54
|
+
# Changing what's in the box
|
|
55
|
+
age = 26 # Now the box contains 26 instead of 25
|
|
56
|
+
print(f"Now you are {age}.") # Now you are 26.</code></pre><p><strong>Important rules:</strong></p><ul class="list-disc list-inside space-y-1"><li>Variable names should describe what they contain (use <code>user_name</code> not <code>x</code>)</li><li>Names can't start with numbers or contain spaces</li><li>Python is case-sensitive: <code>Name</code> and <code>name</code> are different</li></ul><p><strong>Practice exercise:</strong> Try creating a variable for your favorite color, then print a message that includes it!</p></div></div><div class="p-3 bg-purple-50 rounded-lg text-sm"><strong>🏷️ Tags:</strong><span class="inline-block bg-white px-2 py-0.5 rounded ml-2 mr-1">python</span><span class="inline-block bg-white px-2 py-0.5 rounded mr-1">basics</span><span class="inline-block bg-white px-2 py-0.5 rounded">beginner-friendly</span></div><div class="p-3 bg-yellow-50 rounded-lg text-sm"><strong>📝 Notes:</strong> Excellent beginner example. Uses relatable analogies (boxes, party planning), explains WHY not just WHAT, includes working code examples, and adds a practice exercise to reinforce learning. </div></div></div><div class="card mb-6"><div class="flex items-center justify-between mb-4"><div class="flex items-center gap-2"><span class="text-2xl">📊</span><h3 class="text-xl font-semibold">Example 3: Code Review & Analysis</h3></div><div class="flex gap-2"><span class="px-2 py-1 bg-blue-100 text-blue-700 text-xs rounded">Analysis</span><span class="px-2 py-1 bg-green-100 text-green-700 text-xs rounded">⭐⭐⭐⭐⭐</span><span class="px-2 py-1 bg-red-100 text-red-700 text-xs rounded">Advanced</span></div></div><div class="space-y-4"><div class="p-4 bg-blue-50 rounded-lg"><div class="text-sm text-blue-800 font-medium mb-2">🎯 Instruction:</div><p class="text-gray-700"> "Review this API endpoint code for performance issues and security vulnerabilities. What would you change and why?" </p></div><div class="p-4 bg-gray-50 rounded-lg"><div class="text-sm text-gray-800 font-medium mb-2">📎 Input:</div><pre class="text-sm bg-gray-100 p-2 rounded overflow-x-auto"><code>app.get('/api/users/:id', async (req, res) => {
|
|
57
|
+
const users = await db.query('SELECT * FROM users');
|
|
58
|
+
const user = users.find(u => u.id === req.params.id);
|
|
59
|
+
|
|
60
|
+
if (user) {
|
|
61
|
+
res.json(user);
|
|
62
|
+
} else {
|
|
63
|
+
res.status(404).send('Not found');
|
|
64
|
+
}
|
|
65
|
+
});</code></pre></div><div class="p-4 bg-green-50 rounded-lg"><div class="text-sm text-green-800 font-medium mb-2">📝 Output:</div><div class="text-gray-700 text-sm space-y-3"><p><strong>🚨 Critical Issues Found:</strong></p><div class="bg-red-50 p-3 rounded border-l-4 border-red-500"><p class="font-medium text-red-800">1. N+1 Query Problem (Performance)</p><p class="mt-1">Fetching ALL users then filtering in JavaScript is extremely inefficient. With 1M users, you're loading 1M rows into memory!</p><p class="mt-2 text-green-700"><strong>Fix:</strong></p><pre class="bg-gray-100 p-2 rounded mt-1"><code>const user = await db.query(
|
|
66
|
+
'SELECT * FROM users WHERE id = ?',
|
|
67
|
+
[req.params.id]
|
|
68
|
+
);</code></pre></div><div class="bg-red-50 p-3 rounded border-l-4 border-red-500"><p class="font-medium text-red-800">2. SQL Injection Vulnerability (Security)</p><p class="mt-1">Directly using <code>req.params.id</code> in queries opens SQL injection attacks.</p><p class="mt-2 text-green-700"><strong>Fix:</strong> Use parameterized queries (shown above) OR an ORM like Prisma/Sequelize.</p></div><div class="bg-yellow-50 p-3 rounded border-l-4 border-yellow-500"><p class="font-medium text-yellow-800">3. Missing Input Validation</p><p class="mt-1">No validation that <code>id</code> is actually a number/string.</p><p class="mt-2 text-green-700"><strong>Fix:</strong></p><pre class="bg-gray-100 p-2 rounded mt-1"><code>const id = parseInt(req.params.id);
|
|
69
|
+
if (isNaN(id)) {
|
|
70
|
+
return res.status(400).json({ error: 'Invalid ID format' });
|
|
71
|
+
}</code></pre></div><div class="bg-yellow-50 p-3 rounded border-l-4 border-yellow-500"><p class="font-medium text-yellow-800">4. Error Handling Missing</p><p class="mt-1">Database errors will crash the server with unhandled promise rejections.</p><p class="mt-2 text-green-700"><strong>Fix:</strong> Wrap in try-catch</p><pre class="bg-gray-100 p-2 rounded mt-1"><code>try {
|
|
72
|
+
// database operations
|
|
73
|
+
} catch (error) {
|
|
74
|
+
console.error('Database error:', error);
|
|
75
|
+
res.status(500).json({ error: 'Internal server error' });
|
|
76
|
+
}</code></pre></div><p><strong>✅ Improved Version:</strong></p><pre class="bg-gray-100 p-2 rounded"><code>app.get('/api/users/:id', async (req, res) => {
|
|
77
|
+
try {
|
|
78
|
+
const id = parseInt(req.params.id);
|
|
79
|
+
if (isNaN(id)) {
|
|
80
|
+
return res.status(400).json({ error: 'Invalid ID format' });
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const user = await db.query(
|
|
84
|
+
'SELECT id, name, email FROM users WHERE id = ?',
|
|
85
|
+
[id]
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
if (user.length === 0) {
|
|
89
|
+
return res.status(404).json({ error: 'User not found' });
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
res.json(user[0]);
|
|
93
|
+
} catch (error) {
|
|
94
|
+
console.error('Error fetching user:', error);
|
|
95
|
+
res.status(500).json({ error: 'Internal server error' });
|
|
96
|
+
}
|
|
97
|
+
});</code></pre><p><strong>📈 Performance Impact:</strong></p><ul class="list-disc list-inside space-y-1"><li>Original: O(n) time + O(n) memory (loads all users)</li><li>Improved: O(1) time + O(1) memory (database indexed lookup)</li><li>For 1M users: From ~500ms + 100MB RAM → ~5ms + minimal RAM</li></ul></div></div><div class="p-3 bg-purple-50 rounded-lg text-sm"><strong>🏷️ Tags:</strong><span class="inline-block bg-white px-2 py-0.5 rounded ml-2 mr-1">security</span><span class="inline-block bg-white px-2 py-0.5 rounded mr-1">performance</span><span class="inline-block bg-white px-2 py-0.5 rounded mr-1">nodejs</span><span class="inline-block bg-white px-2 py-0.5 rounded">database</span></div></div></div><div class="card"><h3 class="text-lg font-semibold mb-4">🎓 What Makes These Examples Great?</h3><div class="grid grid-cols-1 md:grid-cols-2 gap-4 text-sm"><div class="p-3 bg-green-50 rounded"><strong class="text-green-800">✅ Clear Instructions</strong><p class="text-gray-600 mt-1">Specific, contextual, and well-defined</p></div><div class="p-3 bg-green-50 rounded"><strong class="text-green-800">✅ Complete Outputs</strong><p class="text-gray-600 mt-1">Thorough, with multiple approaches and reasoning</p></div><div class="p-3 bg-green-50 rounded"><strong class="text-green-800">✅ Code Examples</strong><p class="text-gray-600 mt-1">Real, runnable code with explanations</p></div><div class="p-3 bg-green-50 rounded"><strong class="text-green-800">✅ Educational Value</strong><p class="text-gray-600 mt-1">Teaches concepts, not just answers</p></div><div class="p-3 bg-green-50 rounded"><strong class="text-green-800">✅ Practical Application</strong><p class="text-gray-600 mt-1">Real-world scenarios users face</p></div><div class="p-3 bg-green-50 rounded"><strong class="text-green-800">✅ Proper Metadata</strong><p class="text-gray-600 mt-1">Accurate categories, difficulty, and tags</p></div></div></div></section>`,1)])])}const p=s(a,[["render",i]]);export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as j}from"./C6E3Ty3z.js";import{e as D,h as L,c as n,a as t,t as l,F as _,r as k,k as f,v as S,g as c,l as V,n as q,d as M,m as A,b as y,w as h,i as x,p as Q,o as d}from"./Cg2fM61o.js";const R={class:"max-w-4xl mx-auto"},G={class:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6"},J={class:"card p-4 text-center"},P={class:"text-2xl font-bold text-blue-600"},U={class:"card p-4 text-center"},$={class:"text-2xl font-bold text-green-600"},W={class:"card p-4 text-center"},B={class:"text-2xl font-bold text-yellow-600"},I={class:"card p-4 text-center"},H={class:"text-2xl font-bold text-purple-600"},Y={class:"card"},z={class:"space-y-6"},K={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},X=["onClick"],Z={class:"flex items-center justify-between mb-2"},tt={class:"text-2xl"},et={key:0,class:"text-xs bg-green-100 text-green-700 px-2 py-1 rounded-full"},st={class:"font-semibold mb-1"},ot={class:"text-sm text-gray-600"},at={class:"mt-2 text-xs text-gray-500"},lt={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},it={class:"flex gap-2 flex-wrap"},nt=["onClick"],dt={key:0,class:"text-sm text-gray-600 mt-2"},rt={class:"flex items-center gap-3"},ut={class:"mt-8 flex items-center justify-between"},ct={key:0,class:"text-sm text-gray-600"},pt={key:0},mt={key:1},vt={class:"flex gap-3"},bt=["disabled"],xt={key:0},gt={key:0,class:"card mt-6"},ft={key:0,class:"space-y-4"},yt={class:"flex gap-4"},ht={class:"flex-1 p-4 bg-blue-50 rounded-lg"},wt={class:"flex items-center justify-between mb-2"},qt={class:"text-sm text-gray-600"},_t={class:"flex-1 p-4 bg-green-50 rounded-lg"},kt={class:"flex items-center justify-between mb-2"},St={class:"text-sm text-gray-600"},Ct={key:1},Et={class:"p-4 bg-blue-50 rounded-lg"},Nt={class:"flex items-center justify-between mb-2"},Ft={class:"text-sm text-gray-600"},Ot={key:2,class:"mt-4"},Tt={class:"card mt-6 bg-gradient-to-r from-blue-50 to-purple-50"},jt={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4"},Mt=D({__name:"export",setup(Dt){const C=[{id:"alpaca",name:"Alpaca",icon:"🦙",description:"Standard format for instruction tuning",compatibility:"Works with: LLaMA-Factory, Axolotl, HuggingFace",recommended:!0},{id:"sharegpt",name:"ShareGPT",icon:"💬",description:"Conversational format",compatibility:"Works with: ShareGPT, some fine-tuning tools"},{id:"jsonl",name:"JSONL",icon:"📝",description:"One JSON object per line",compatibility:"Efficient format for large datasets",recommended:!0},{id:"json",name:"JSON",icon:"📄",description:"Single JSON file with metadata",compatibility:"Includes full metadata and statistics"},{id:"csv",name:"CSV",icon:"📊",description:"Spreadsheet format",compatibility:"Open in Excel, Google Sheets"}],E=[{value:"none",label:"No Split"},{value:"90-10",label:"90% Train / 10% Val"},{value:"80-20",label:"80% Train / 20% Val"},{value:"70-30",label:"70% Train / 30% Val"}],p=x("alpaca"),m=x(!1),s=x(null),i=x({status:"approved",minQuality:void 0,split:"none",includeMetadata:!0}),u=x({total:0,approved:0,draft:0,review:0,avgQuality:0}),N=async()=>{try{const a=await $fetch("/api/stats/overview");u.value={total:a.total||0,approved:a.approved||0,draft:a.draft||0,review:a.review||0,avgQuality:a.avgQuality||0}}catch(a){console.error("Error loading stats:",a)}},F=async()=>{m.value=!0;try{const a=await $fetch("/api/export",{method:"POST",body:{format:p.value,status:i.value.status,split:i.value.split,minQuality:i.value.minQuality,includeMetadata:i.value.includeMetadata}});s.value=a}catch(a){console.error("Error exporting:",a),alert("Export failed. Please try again.")}finally{m.value=!1}},w=(a,e)=>{let r,v;typeof a=="string"?(r=a,v=e.endsWith(".csv")?"text/csv":"application/jsonl"):(r=JSON.stringify(a,null,2),v="application/json");const o=new Blob([r],{type:v}),g=URL.createObjectURL(o),b=document.createElement("a");b.href=g,b.download=e,document.body.appendChild(b),b.click(),document.body.removeChild(b),URL.revokeObjectURL(g)},O=()=>{if(!s.value)return;const a=s.value.splits?s.value.splits.train.data:s.value.data,e=typeof a=="string"?a:JSON.stringify(a,null,2);navigator.clipboard.writeText(e).then(()=>{alert("Copied to clipboard!")})},T=()=>{i.value={status:"approved",minQuality:void 0,split:"none",includeMetadata:!0},s.value=null};return L(()=>{N()}),(a,e)=>{const r=j,v=Q('else"');return d(),n("div",R,[e[29]||(e[29]=t("div",{class:"mb-6"},[t("h1",{class:"text-2xl font-bold mb-2"},"Export Your Dataset"),t("p",{class:"text-gray-600"}," Export your training examples in various formats compatible with popular fine-tuning tools. ")],-1)),t("div",G,[t("div",J,[t("div",P,l(u.value.total),1),e[6]||(e[6]=t("div",{class:"text-sm text-gray-600"},"Total Examples",-1))]),t("div",U,[t("div",$,l(u.value.approved),1),e[7]||(e[7]=t("div",{class:"text-sm text-gray-600"},"Approved",-1))]),t("div",W,[t("div",B,l(u.value.draft),1),e[8]||(e[8]=t("div",{class:"text-sm text-gray-600"},"Drafts",-1))]),t("div",I,[t("div",H,l(u.value.avgQuality.toFixed(1)),1),e[9]||(e[9]=t("div",{class:"text-sm text-gray-600"},"Avg Quality",-1))])]),t("div",Y,[e[18]||(e[18]=t("h2",{class:"text-lg font-semibold mb-6"},"Export Configuration",-1)),t("div",z,[t("div",null,[e[10]||(e[10]=t("label",{class:"form-label"},"Export Format",-1)),t("div",K,[(d(),n(_,null,k(C,o=>t("button",{key:o.id,onClick:g=>p.value=o.id,class:q(["p-4 border-2 rounded-xl text-left transition-all hover:border-blue-400",p.value===o.id?"border-blue-500 bg-blue-50":"border-gray-200"])},[t("div",Z,[t("span",tt,l(o.icon),1),o.recommended?(d(),n("span",et," Recommended ")):c("",!0)]),t("h3",st,l(o.name),1),t("p",ot,l(o.description),1),t("div",at,l(o.compatibility),1)],10,X)),64))])]),t("div",lt,[t("div",null,[e[12]||(e[12]=t("label",{class:"form-label"},"Status Filter",-1)),f(t("select",{"onUpdate:modelValue":e[0]||(e[0]=o=>i.value.status=o),class:"form-input"},[...e[11]||(e[11]=[t("option",{value:"all"},"All Examples",-1),t("option",{value:"approved"},"Approved Only",-1),t("option",{value:"draft"},"Drafts Only",-1),t("option",{value:"review"},"In Review",-1)])],512),[[S,i.value.status]])]),t("div",null,[e[14]||(e[14]=t("label",{class:"form-label"},"Minimum Quality",-1)),f(t("select",{"onUpdate:modelValue":e[1]||(e[1]=o=>i.value.minQuality=o),class:"form-input"},[...e[13]||(e[13]=[t("option",{value:void 0},"Any Quality",-1),t("option",{value:1},"⭐ 1+",-1),t("option",{value:2},"⭐⭐ 2+",-1),t("option",{value:3},"⭐⭐⭐ 3+",-1),t("option",{value:4},"⭐⭐⭐⭐ 4+",-1),t("option",{value:5},"⭐⭐⭐⭐⭐ 5 only",-1)])],512),[[S,i.value.minQuality]])])]),t("div",null,[e[15]||(e[15]=t("label",{class:"form-label"},"Train/Validation Split (Optional)",-1)),t("div",it,[(d(),n(_,null,k(E,o=>t("button",{key:o.value,onClick:g=>i.value.split=o.value,class:q(["px-4 py-2 rounded-lg border-2 transition-all",i.value.split===o.value?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-blue-300"])},l(o.label),11,nt)),64))]),i.value.split!=="none"?(d(),n("p",dt," Your dataset will be randomly split into training and validation sets. ")):c("",!0)]),t("div",rt,[f(t("input",{id:"includeMetadata","onUpdate:modelValue":e[2]||(e[2]=o=>i.value.includeMetadata=o),type:"checkbox",class:"w-4 h-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500"},null,512),[[V,i.value.includeMetadata]]),e[16]||(e[16]=t("label",{for:"includeMetadata",class:"text-sm font-medium"}," Include metadata (category, quality, timestamps, etc.) ",-1))])]),t("div",ut,[s.value?(d(),n("div",ct,[s.value.splits?(d(),n("span",pt,l(s.value.splits.train.count)+" train + "+l(s.value.splits.validation.count)+" validation examples ",1)):(d(),n("span",mt,l(s.value.count)+" examples ready for download ",1))])):c("",!0),t("div",vt,[t("button",{onClick:T,class:"btn-secondary"}," Reset "),t("button",{onClick:F,disabled:m.value||u.value.total===0,class:q(["btn-primary",{"opacity-50 cursor-not-allowed":m.value||u.value.total===0}])},[m.value?(d(),n("span",xt,"Exporting...")):c("",!0),f((d(),n("span",null,[...e[17]||(e[17]=[M("📤 Export Dataset",-1)])])),[[v]])],10,bt)])])]),s.value?(d(),n("div",gt,[e[22]||(e[22]=t("h2",{class:"text-lg font-semibold mb-4"},"Download Your Dataset",-1)),s.value.splits?(d(),n("div",ft,[t("div",yt,[t("div",ht,[t("div",wt,[e[19]||(e[19]=t("h3",{class:"font-semibold"},"Training Set",-1)),t("span",qt,l(s.value.splits.train.count)+" examples",1)]),t("button",{onClick:e[3]||(e[3]=o=>w(s.value.splits.train.data,s.value.splits.train.filename)),class:"w-full btn-primary"}," Download "+l(s.value.splits.train.filename),1)]),t("div",_t,[t("div",kt,[e[20]||(e[20]=t("h3",{class:"font-semibold"},"Validation Set",-1)),t("span",St,l(s.value.splits.validation.count)+" examples",1)]),t("button",{onClick:e[4]||(e[4]=o=>w(s.value.splits.validation.data,s.value.splits.validation.filename)),class:"w-full btn-primary"}," Download "+l(s.value.splits.validation.filename),1)])])])):(d(),n("div",Ct,[t("div",Et,[t("div",Nt,[e[21]||(e[21]=t("h3",{class:"font-semibold"},"Complete Dataset",-1)),t("span",Ft,l(s.value.count)+" examples",1)]),t("button",{onClick:e[5]||(e[5]=o=>w(s.value.data,s.value.filename)),class:"w-full btn-primary"}," Download "+l(s.value.filename),1)])])),p.value==="json"||p.value==="jsonl"?(d(),n("div",Ot,[t("button",{onClick:O,class:"text-sm text-blue-600 hover:text-blue-800 underline"}," Copy to clipboard instead ")])):c("",!0)])):c("",!0),e[30]||(e[30]=A('<div class="card mt-6"><h2 class="text-lg font-semibold mb-4">Format Guide</h2><div class="space-y-4"><div class="p-4 bg-gray-50 rounded-lg"><h3 class="font-semibold mb-2">🦙 Alpaca Format</h3><p class="text-sm text-gray-600 mb-2"> Standard format used by Alpaca, LLaMA-Factory, and many other tools. </p><code class="text-xs bg-gray-800 text-gray-200 p-2 rounded block"> { "instruction": "...", "input": "...", "output": "..." } </code></div><div class="p-4 bg-gray-50 rounded-lg"><h3 class="font-semibold mb-2">💬 ShareGPT Format</h3><p class="text-sm text-gray-600 mb-2"> Conversational format used by ShareGPT and some fine-tuning frameworks. </p><code class="text-xs bg-gray-800 text-gray-200 p-2 rounded block"> { "conversations": [{"from": "human", "value": "..."}, {"from": "gpt", "value": "..."}] } </code></div><div class="p-4 bg-gray-50 rounded-lg"><h3 class="font-semibold mb-2">📝 JSONL Format</h3><p class="text-sm text-gray-600 mb-2"> One JSON object per line. Efficient for large datasets. Compatible with most tools. </p><code class="text-xs bg-gray-800 text-gray-200 p-2 rounded block"> {"instruction": "...", "input": "...", "output": "..."} <br>{"instruction": "...", "input": "...", "output": "..."} </code></div><div class="p-4 bg-gray-50 rounded-lg"><h3 class="font-semibold mb-2">📊 CSV Format</h3><p class="text-sm text-gray-600 mb-2"> Spreadsheet format for easy viewing and editing in Excel/Google Sheets. </p><code class="text-xs bg-gray-800 text-gray-200 p-2 rounded block"> instruction,input,output,system,category,difficulty,... </code></div></div></div>',1)),t("div",Tt,[e[27]||(e[27]=t("h2",{class:"text-lg font-semibold mb-4"},"What's Next?",-1)),e[28]||(e[28]=t("p",{class:"text-gray-600 mb-4"}," New to fine-tuning? Learn about these platforms first before diving in: ",-1)),t("div",jt,[y(r,{to:"/examples",class:"p-4 bg-white rounded-lg shadow-sm hover:shadow-md transition-shadow"},{default:h(()=>[...e[23]||(e[23]=[t("div",{class:"text-2xl mb-2"},"📋",-1),t("h3",{class:"font-semibold mb-1"},"Review Dataset",-1),t("p",{class:"text-sm text-gray-600"},"Check and improve your examples before training.",-1)])]),_:1}),y(r,{to:"/help/huggingface",class:"p-4 bg-white rounded-lg shadow-sm hover:shadow-md transition-shadow border-l-4 border-yellow-400"},{default:h(()=>[...e[24]||(e[24]=[t("div",{class:"text-2xl mb-2"},"🤗",-1),t("h3",{class:"font-semibold mb-1"},"What is Hugging Face?",-1),t("p",{class:"text-sm text-gray-600"},'Learn about the "GitHub of AI" before you go there.',-1),t("span",{class:"text-xs text-yellow-600 font-medium"},"Start here →",-1)])]),_:1}),y(r,{to:"/help/axolotl",class:"p-4 bg-white rounded-lg shadow-sm hover:shadow-md transition-shadow border-l-4 border-green-400"},{default:h(()=>[...e[25]||(e[25]=[t("div",{class:"text-2xl mb-2"},"🦎",-1),t("h3",{class:"font-semibold mb-1"},"What is Axolotl?",-1),t("p",{class:"text-sm text-gray-600"},"The easiest way to fine-tune. Perfect for beginners!",-1),t("span",{class:"text-xs text-green-600 font-medium"},"Easiest option →",-1)])]),_:1}),y(r,{to:"/help/first-training",class:"p-4 bg-gradient-to-br from-purple-600 to-blue-600 text-white rounded-lg shadow-sm hover:shadow-md transition-shadow"},{default:h(()=>[...e[26]||(e[26]=[t("div",{class:"text-2xl mb-2"},"🚀",-1),t("h3",{class:"font-semibold mb-1"},"Start Training Now!",-1),t("p",{class:"text-sm text-white text-opacity-90"},"Step-by-step guide to train your first model.",-1),t("span",{class:"text-xs text-yellow-300 font-medium"},"Let's do it! →",-1)])]),_:1})])])])}}});export{Mt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as O,A,K as q,h as j,R as T,S as U,U as E,V as N,M as L,W as P,X as I,Y as H,i as V,Z as _,$ as D,z as F,j as y,a0 as B,a1 as z,a2 as M,a3 as W,a4 as $,a5 as G,a6 as K}from"./Cg2fM61o.js";const Q=(...t)=>t.find(o=>o!==void 0);function X(t){const o=t.componentName||"NuxtLink";function f(e){return typeof e=="string"&&e.startsWith("#")}function S(e,l,v){const a=v??t.trailingSlash;if(!e||a!=="append"&&a!=="remove")return e;if(typeof e=="string")return C(e,a);const i="path"in e&&e.path!==void 0?e.path:l(e).path;return{...e,name:void 0,path:C(i,a)}}function k(e){const l=A(),v=K(),a=y(()=>!!e.target&&e.target!=="_self"),i=y(()=>{const u=e.to||e.href||"";return typeof u=="string"&&B(u,{acceptRelative:!0})}),p=P("RouterLink"),h=typeof p!="string"?p.useLink:void 0,c=y(()=>{if(e.external)return!0;const u=e.to||e.href||"";return typeof u=="object"?!1:u===""||i.value}),n=y(()=>{const u=e.to||e.href||"";return c.value?u:S(u,l.resolve,e.trailingSlash)}),g=c.value?void 0:h?.({...e,to:n}),b=y(()=>{const u=e.trailingSlash??t.trailingSlash;if(!n.value||i.value||f(n.value))return n.value;if(c.value){const x=typeof n.value=="object"&&"path"in n.value?_(n.value):n.value,R=typeof x=="object"?l.resolve(x).href:x;return C(R,u)}return typeof n.value=="object"?l.resolve(n.value)?.href??null:C(z(v.app.baseURL,n.value),u)});return{to:n,hasTarget:a,isAbsoluteUrl:i,isExternal:c,href:b,isActive:g?.isActive??y(()=>n.value===l.currentRoute.value.path),isExactActive:g?.isExactActive??y(()=>n.value===l.currentRoute.value.path),route:g?.route??y(()=>l.resolve(n.value)),async navigate(u){await F(b.value,{replace:e.replace,external:c.value||a.value})}}}return O({name:o,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:k,setup(e,{slots:l}){const v=A(),{to:a,href:i,navigate:p,isExternal:h,hasTarget:c,isAbsoluteUrl:n}=k(e),g=H(!1),b=V(null),u=s=>{b.value=e.custom?s?.$el?.nextElementSibling:s?.$el};function x(s){return!g.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===s:e.prefetchOn?.[s]??t.prefetchOn?.[s])&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!J()}async function R(s=q()){if(g.value)return;g.value=!0;const d=typeof a.value=="string"?a.value:h.value?_(a.value):v.resolve(a.value).fullPath,r=h.value?new URL(d,window.location.href).href:d;await Promise.all([s.hooks.callHook("link:prefetch",r).catch(()=>{}),!h.value&&!c.value&&D(a.value,v).catch(()=>{})])}if(x("visibility")){const s=q();let d,r=null;j(()=>{const m=Y();T(()=>{d=U(()=>{b?.value?.tagName&&(r=m.observe(b.value,async()=>{r?.(),r=null,await R(s)}))})})}),E(()=>{d&&N(d),r?.(),r=null})}return()=>{if(!h.value&&!c.value&&!f(a.value)){const r={ref:u,to:a.value,activeClass:e.activeClass||t.activeClass,exactActiveClass:e.exactActiveClass||t.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};return e.custom||(x("interaction")&&(r.onPointerenter=R.bind(null,void 0),r.onFocus=R.bind(null,void 0)),g.value&&(r.class=e.prefetchedClass||t.prefetchedClass),r.rel=e.rel||void 0),L(P("RouterLink"),r,l.default)}const s=e.target||null,d=Q(e.noRel?"":e.rel,t.externalRelAttribute,n.value||c.value?"noopener noreferrer":"")||null;return e.custom?l.default?l.default({href:i.value,navigate:p,prefetch:R,get route(){if(!i.value)return;const r=new URL(i.value,window.location.href);return{path:r.pathname,fullPath:r.pathname,get query(){return I(r.search)},hash:r.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:i.value}},rel:d,target:s,isExternal:h.value||c.value,isActive:!1,isExactActive:!1}):null:L("a",{ref:b,href:i.value||null,rel:d,target:s,onClick:async r=>{if(!(h.value||c.value)){r.preventDefault();try{const m=M(i.value);return await(e.replace?v.replace(m):v.push(m))}finally{if(f(a.value)){const m=a.value.slice(1);let w=m;try{w=decodeURIComponent(m)}catch{}document.getElementById(w)?.focus()}}}}},l.default?.())}}})}const ae=X(W);function C(t,o){const f=o==="append"?$:G;return B(t)&&!t.startsWith("http")?t:f(t,!0)}function Y(){const t=q();if(t._observer)return t._observer;let o=null;const f=new Map,S=(e,l)=>(o||=new IntersectionObserver(v=>{for(const a of v){const i=f.get(a.target);(a.isIntersecting||a.intersectionRatio>0)&&i&&i()}}),f.set(e,l),o.observe(e),()=>{f.delete(e),o?.unobserve(e),f.size===0&&(o?.disconnect(),o=null)});return t._observer={observe:S}}const Z=/2g/;function J(){const t=navigator.connection;return!!(t&&(t.saveData||Z.test(t.effectiveType)))}export{ae as _};
|