Coder Social home page Coder Social logo

declan-haojin / hexo-auto-tag Goto Github PK

View Code? Open in Web Editor NEW
54.0 11.0 10.0 2.34 MB

Automatically tag your Hexo posts with GPT-3|使用GPT-3自动为Hexo文章添加标签

Home Page: https://www.npmjs.com/package/hexo-auto-tag

License: MIT License

JavaScript 100.00%
blog hexo hexo-plugin hexo-tag gpt-3 openai-api

hexo-auto-tag's Introduction

hexo-auto-tag

npm version

Automatically assigns relevant predefined tags to your posts based on their content with the power of GPT-3.

使用 GPT-3 的强大功能,根据文章内容自动为您的文章分配相关的预定义标签。 中文文档

Installation

npm install hexo-auto-tag

Usage

  1. Add the following to your Hexo site's _config.yml file:
auto_tag:
  enable: true
  apiKey: <YOUR OPENAI API KEY>
  threshold: 0.23 # range: 0-1, 0.23 has been tested to be a good value. Lower values tend to result in fewer tags being assigned to a post.
  tags:
    - tag1
    - tag2
    - tag3

You can get your API key from here. It may require a paid plan to use the API. However, the cost is extremely low with less than $0.1 to assign 50 tags to 200 posts.

  1. Run the following command when ready to generate your site:
hexo clean && hexo generate

Make sure to run BOTH hexo clean and hexo generate.

Note

This plugin is still in early development. Please report any issues here.

hexo-auto-tag's People

Contributors

declan-haojin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hexo-auto-tag's Issues

报错了,无法使用.

错误信息如下:
TypeError: Cannot read properties of undefined (reading 'enable')
at Hexo.logic (D:\Software\开发\x2b.net\x2b.net-source\node_modules\hexo-auto-tag\lib\logic.js:46:31)
at Hexo.tryCatcher (D:\Software\开发\x2b.net\x2b.net-source\node_modules\bluebird\js\release\util.js:16:23)
at Hexo. (D:\Software\开发\x2b.net\x2b.net-source\node_modules\bluebird\js\release\method.js:15:34)
at D:\Software\开发\x2b.net\x2b.net-source\node_modules\hexo\lib\extend\filter.js:67:52
at tryCatcher (D:\Software\开发\x2b.net\x2b.net-source\node_modules\bluebird\js\release\util.js:16:23)
at Object.gotValue (D:\Software\开发\x2b.net\x2b.net-source\node_modules\bluebird\js\release\reduce.js:166:18)
at Object.gotAccum (D:\Software\开发\x2b.net\x2b.net-source\node_modules\bluebird\js\release\reduce.js:155:25)
at Object.tryCatcher (D:\Software\开发\x2b.net\x2b.net-source\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (D:\Software\开发\x2b.net\x2b.net-source\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (D:\Software\开发\x2b.net\x2b.net-source\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (D:\Software\开发\x2b.net\x2b.net-source\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (D:\Software\开发\x2b.net\x2b.net-source\node_modules\bluebird\js\release\promise.js:729:18)
at _drainQueueStep (D:\Software\开发\x2b.net\x2b.net-source\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (D:\Software\开发\x2b.net\x2b.net-source\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (D:\Software\开发\x2b.net\x2b.net-source\node_modules\bluebird\js\release\async.js:102:5)
at Async.drainQueues (D:\Software\开发\x2b.net\x2b.net-source\node_modules\bluebird\js\release\async.js:15:14)
at process.processImmediate (node:internal/timers:476:21)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.