Name | mkdocs-ai-summary JSON |
Version |
0.2.4
JSON |
| download |
home_page | None |
Summary | A mkdocs plugin to generage summary with the help of AI. |
upload_time | 2024-05-28 13:28:39 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License Copyright (c) 2024 Yang Zhang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
mkdocs
ai
blog
chatgpt
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# mkdocs-ai-summary
[![PyPI - Version](https://img.shields.io/pypi/v/mkdocs-ai-summary)](https://pypi.org/project/mkdocs-ai-summary/)
![PyPI - Implementation](https://img.shields.io/pypi/implementation/mkdocs-ai-summary)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mkdocs-ai-summary)
Generage an **ai-summary** for the page:
![](assets/2024-05-23-04-35-01.png)
Minimal demo: [aiboy996.github.io/mkdocs-ai-summary](https://aiboy996.github.io/mkdocs-ai-summary)
Live demo(my homepage): [yangzhang.site](https://yangzhang.site)
## Installation
You should install the package with pip:
```
pip install mkdocs-ai-summary[chatgpt]
```
or
```
pip install mkdocs-ai-summary[tongyi]
```
> ⚠️⚠️⚠️⚠️
>
> Only support [ChatGPT](https://chat.openai.com/) and [tongyi ai](https://tongyi.aliyun.com/) for now.
>
> To use **ChatGPT(default)**, you should set a Environmental Variable for **api key**:
> ```bash
> export OPENAI_API_KEY='sk-xxxxxxx'
> ```
> [how to get an OPENAI_API_KEY?](https://platform.openai.com/docs/quickstart)
>
> To use **tongyi ai**, you should set a Environmental Variable for **api key**:
> ```bash
> export DASHSCOPE_API_KEY='sk-xxxxxxx'
> ```
> [how to get an DASHSCOPE_API_KEY?](https://dashscope.console.aliyun.com/)
[optional] Then you can include the [ai-summary.css](./docs/ai-summary.css)(optional, this is for the **custom ai summary admonition style**) in the config file as below:
## Configuration
### Options can be set
name|type|default value| note
--|--|--|--
api|str|chatgpt| only support chatgpt or tongyi
model|str|gpt-3.5-turbo | -
ignore_code|bool|true| ignore code block in markdown
cache|bool|true| -
cache_dir|str|"./"| -
prompt|str|"Please help me summarize the following content into an abstract within 200 words: "| -
### For ChatGPT Summary
Setup `mkdocs.yml` like this:
```yml
site_name: mkdocs-ai-summary
theme:
name: material
plugins:
- ai-summary:
api: "chatgpt"
model: "gpt-3.5-turbo"
ignore_code: true
cache: true
cache_dir: "./"
prompt: "Please help me summarize the following content into an abstract within 200 words: "
- tags
markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
extra_css:
- ai-summary.css
```
Then for the page you want an ai-summary, just add a meta tag:
```markdown
---
include:
- ai-summary
---
# title
hello ai summary.
```
### For tongyi ai Summary
or you can use **tongyi ai** by setting:
```yml
plugins:
- ai-summary:
api: "tongyi"
model: "qwen-turbo"
ignore_code: true
cache: true
cache_dir: "./"
prompt: "Please help me summarize the following content into an abstract within 200 words: "
```
### Setup ai-summary for specific page
You can also setup ai summary for each page separately:
```markdown
---
include:
- ai-summary
ai-summary-config:
api: "tongyi"
model: "qwen-turbo"
prompt: "帮我把下面的内容总结为200字以内的摘要:"
---
# title
hello ai summary.
```
all config options are available. **Page configuration will override unified configuration.**
## About Cache
Don't worry about duplicate api calls, we've made the cache function so that if you've done an ai-summary before and the content hasn't changed it will use the cache.
Enjoy it.
Raw data
{
"_id": null,
"home_page": null,
"name": "mkdocs-ai-summary",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "mkdocs, AI, blog, chatgpt",
"author": null,
"author_email": "Yang Zhang <mail@yangzhang.site>",
"download_url": "https://files.pythonhosted.org/packages/8d/86/7dfc75e8870a0c73eb8d0e528fb37f72a4f5abbb94d2ea048cdfc3789c17/mkdocs_ai_summary-0.2.4.tar.gz",
"platform": null,
"description": "# mkdocs-ai-summary\n\n[![PyPI - Version](https://img.shields.io/pypi/v/mkdocs-ai-summary)](https://pypi.org/project/mkdocs-ai-summary/)\n![PyPI - Implementation](https://img.shields.io/pypi/implementation/mkdocs-ai-summary)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mkdocs-ai-summary)\n\nGenerage an **ai-summary** for the page:\n![](assets/2024-05-23-04-35-01.png)\n\nMinimal demo: [aiboy996.github.io/mkdocs-ai-summary](https://aiboy996.github.io/mkdocs-ai-summary)\n\nLive demo(my homepage): [yangzhang.site](https://yangzhang.site)\n\n## Installation\n\nYou should install the package with pip:\n```\npip install mkdocs-ai-summary[chatgpt]\n```\nor\n```\npip install mkdocs-ai-summary[tongyi]\n```\n> \u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\u26a0\ufe0f\n> \n> Only support [ChatGPT](https://chat.openai.com/) and [tongyi ai](https://tongyi.aliyun.com/) for now.\n> \n> To use **ChatGPT(default)**, you should set a Environmental Variable for **api key**:\n> ```bash\n> export OPENAI_API_KEY='sk-xxxxxxx'\n> ```\n> [how to get an OPENAI_API_KEY?](https://platform.openai.com/docs/quickstart)\n> \n> To use **tongyi ai**, you should set a Environmental Variable for **api key**:\n> ```bash\n> export DASHSCOPE_API_KEY='sk-xxxxxxx'\n> ```\n> [how to get an DASHSCOPE_API_KEY?](https://dashscope.console.aliyun.com/)\n\n[optional] Then you can include the [ai-summary.css](./docs/ai-summary.css)(optional, this is for the **custom ai summary admonition style**) in the config file as below:\n\n## Configuration\n\n### Options can be set\n\nname|type|default value| note\n--|--|--|--\napi|str|chatgpt| only support chatgpt or tongyi\nmodel|str|gpt-3.5-turbo | -\nignore_code|bool|true| ignore code block in markdown\ncache|bool|true| -\ncache_dir|str|\"./\"| -\nprompt|str|\"Please help me summarize the following content into an abstract within 200 words: \"| -\n\n\n### For ChatGPT Summary\n\nSetup `mkdocs.yml` like this:\n\n```yml\nsite_name: mkdocs-ai-summary\ntheme:\n name: material\n\nplugins:\n - ai-summary:\n api: \"chatgpt\"\n model: \"gpt-3.5-turbo\"\n ignore_code: true \n cache: true\n cache_dir: \"./\"\n prompt: \"Please help me summarize the following content into an abstract within 200 words: \"\n - tags\n\nmarkdown_extensions:\n - admonition\n - pymdownx.details\n - pymdownx.superfences\n - pymdownx.tabbed:\n alternate_style: true \nextra_css:\n - ai-summary.css\n```\n\nThen for the page you want an ai-summary, just add a meta tag:\n```markdown\n---\ninclude:\n- ai-summary\n---\n\n# title\n\nhello ai summary.\n```\n\n### For tongyi ai Summary\nor you can use **tongyi ai** by setting:\n```yml\nplugins:\n - ai-summary:\n api: \"tongyi\"\n model: \"qwen-turbo\"\n ignore_code: true\n cache: true\n cache_dir: \"./\"\n prompt: \"Please help me summarize the following content into an abstract within 200 words: \"\n```\n\n### Setup ai-summary for specific page\n\nYou can also setup ai summary for each page separately:\n\n```markdown\n---\ninclude:\n- ai-summary\nai-summary-config:\n api: \"tongyi\"\n model: \"qwen-turbo\"\n prompt: \"\u5e2e\u6211\u628a\u4e0b\u9762\u7684\u5185\u5bb9\u603b\u7ed3\u4e3a200\u5b57\u4ee5\u5185\u7684\u6458\u8981\uff1a\"\n---\n\n# title\n\nhello ai summary.\n```\n\nall config options are available. **Page configuration will override unified configuration.**\n\n## About Cache\n\nDon't worry about duplicate api calls, we've made the cache function so that if you've done an ai-summary before and the content hasn't changed it will use the cache.\n\nEnjoy it.\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Yang Zhang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A mkdocs plugin to generage summary with the help of AI.",
"version": "0.2.4",
"project_urls": {
"Homepage": "https://github.com/AIboy996/mkdocs-ai-summary"
},
"split_keywords": [
"mkdocs",
" ai",
" blog",
" chatgpt"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d377e57b6e76dd3accd9e1ba593e2053dc79fe02ad9238c754c8b6424087c05c",
"md5": "c64189697730da066221283fcf898225",
"sha256": "bdd85f2aa6714551ca900e4d081e3ce45d5fd4e697a9996e7a72048f0455009a"
},
"downloads": -1,
"filename": "mkdocs_ai_summary-0.2.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c64189697730da066221283fcf898225",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 8112,
"upload_time": "2024-05-28T13:28:38",
"upload_time_iso_8601": "2024-05-28T13:28:38.414305Z",
"url": "https://files.pythonhosted.org/packages/d3/77/e57b6e76dd3accd9e1ba593e2053dc79fe02ad9238c754c8b6424087c05c/mkdocs_ai_summary-0.2.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8d867dfc75e8870a0c73eb8d0e528fb37f72a4f5abbb94d2ea048cdfc3789c17",
"md5": "eb62f21c747b7beb02fa8d1b8e4bdbd6",
"sha256": "2c7084c5aa9ab55576dfb7cd96d5477cd28dae2835f45759f79f8252b001586a"
},
"downloads": -1,
"filename": "mkdocs_ai_summary-0.2.4.tar.gz",
"has_sig": false,
"md5_digest": "eb62f21c747b7beb02fa8d1b8e4bdbd6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 6100,
"upload_time": "2024-05-28T13:28:39",
"upload_time_iso_8601": "2024-05-28T13:28:39.930379Z",
"url": "https://files.pythonhosted.org/packages/8d/86/7dfc75e8870a0c73eb8d0e528fb37f72a4f5abbb94d2ea048cdfc3789c17/mkdocs_ai_summary-0.2.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-28 13:28:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AIboy996",
"github_project": "mkdocs-ai-summary",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mkdocs-ai-summary"
}