hexo-ai-summaries
v1.1.2
Published
AI generates article summaries with support for custom templates
Downloads
6
Readme
AI 生成文章摘要,支持自定义模板
📦 Install
pnpm add hexo-ai-summaries🔨 Usage
在 hexo/_config.yml 中配置 hexo-ai-summaries
hexo-ai-summaries:
enable: true
# only work after this date
generateAfterDate: 2024/05 # optional
aiSummaryApi: https://<cloudflare workers url>.workers.dev/v1/chat/completions
maxToken: 30000 # optional
prompt:
You are a highly skilled AI trained in language comprehension and summarization. I would like you to read the text delimited by triple quotes and summarize it into a concise abstract paragraph. Aim to retain the most important points, providing a coherent and readable summary that could help a person understand the main points of the discussion without needing to read the entire text. Please avoid unnecessary details or tangential points.
Only give me the output and nothing else. Do not wrap responses in quotes. Respond in the Chinese language.
# fetch body
aiConfig:
model: gpt-4o
temperature: 0.7 # optional
stream: false # optional default true
headers: { 'Content-Type': 'application/json' } # optional, default undefined
tagConfig: # optional
title: .post-title
content: .post-content
toc: .toc-content
# you can customize the html, js, css file, and then plugin just only insert this file to your post
# you can check the result in `hexo/public/posts` folder
# and generated file in `hexo/public/hexo-ai-summaries/`
customHtml: # optional
htmlFile: /Gemini/gemini.html
jsFile: /Gemini/gemini.js
styleFile: /Gemini/gemini.cssin your post front-matter, add ai-summaries: false to disable ai-summaries;
title: xxx
date: xxx
categories: xxx
cover: xxx
# add this line to disable ai-summaries
ai-summaries: false