Skip to content

Commit

Permalink
[update] readme
Browse files Browse the repository at this point in the history
  • Loading branch information
AIboy996 committed Dec 12, 2024
1 parent c019247 commit 3044077
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 26 deletions.
4 changes: 2 additions & 2 deletions _ai_summary_cache_chatgpt.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"mkdocs-ai-summary": {
"content_md5": "ca65412768c8432c18c07b8a19a618cd",
"ai_summary": "Mkdocs-ai-summary is a package that allows users to generate AI-powered summaries for their pages. It is compatible with various technologies such as ChatGPT and tongyi ai. To enjoy this functionality, users are required to install the package with pip, and set an Environmental Variable for the appropriate API key for either ChatGPT (default) or tongyi ai. The package also allows customization through different configuration settings like API choice, model selection, ignoring code blocks in markdown, caching, cache directory and prompts. Furthermore, users can set up an AI summary for each page separately, with the page configuration overriding the unified settings. An additional feature is the cache functionality, designed to avoid redundant API calls and employ the cache when the content remains unaltered after an AI summary is made. Enjoy its benefits by integrating mkdocs-ai-summary into your pages."
"content_md5": "1b161a864feefb7971c12fb67fba991f",
"ai_summary": "mkdocs-ai-summary is a plugin that generates an AI summary for a webpage. The plugin can be installed via pip and supports the usage of ChatGPT and Tongyi AI. To utilize these, users are required to set an Environmental Variable for the api key. The plugin also includes optional support for the ai-summary.css for custom AI summary admonition style. Configuration parameters include api, model, ignore_code, cache, cache_dir, and prompt amongst others. The plugin also supports individual page configuration for the AI summary. The cache functionality ensures there are no unnecessary duplicate api calls. If the content hasn't changed since the last summary, the cache will be used. This software can be viewed with a demo on 'aiboy996.github.io/mkdocs-ai-summary' and 'yangzhang.site'.\n"
},
"Example 3(tarnslated by ChatGPT summary)": {
"content_md5": "458015aebe0c0a4a629a97cb9c121443",
Expand Down
37 changes: 20 additions & 17 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,31 @@ Live demo(my homepage): [yangzhang.site](https://yangzhang.site)
You should install the package with pip:
```
pip install mkdocs-ai-summary[chatgpt]
# this will install `openai` additionally
```
or
```
pip install mkdocs-ai-summary[tongyi]
# this will install `dashscope` additionally
```
> [!WARNING]
>
> 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](./ai-summary.css)(optional, this is for the **custom ai summary admonition style**) in the config file as below:

!!! warning
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/)

!!! info
Then you can include the [ai-summary.css](./ai-summary.css)(optional, this is for the **custom ai summary admonition style**) in the config file as below.

## Configuration

Expand Down
9 changes: 7 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ Live demo(my homepage): [yangzhang.site](https://yangzhang.site)
You should install the package with pip:
```
pip install mkdocs-ai-summary[chatgpt]
# this will install `openai` additionally
```
or
```
pip install mkdocs-ai-summary[tongyi]
# this will install `dashscope` additionally
```
> ⚠️⚠️⚠️⚠️

> [!WARNING]
>
> Only support [ChatGPT](https://chat.openai.com/) and [tongyi ai](https://tongyi.aliyun.com/) for now.
>
Expand All @@ -37,7 +40,9 @@ pip install mkdocs-ai-summary[tongyi]
> ```
> [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:
> ![INFO]
>
> 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
Expand Down
15 changes: 10 additions & 5 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
<h1 id="mkdocs-ai-summary">mkdocs-ai-summary</h1>
<div class="admonition chatgpt-summary">
<p class="admonition-title">AI Summary powered by <a href="https://chat.openai.com/">ChatGPT</a></p>
<p>Mkdocs-ai-summary is a package that allows users to generate AI-powered summaries for their pages. It is compatible with various technologies such as ChatGPT and tongyi ai. To enjoy this functionality, users are required to install the package with pip, and set an Environmental Variable for the appropriate API key for either ChatGPT (default) or tongyi ai. The package also allows customization through different configuration settings like API choice, model selection, ignoring code blocks in markdown, caching, cache directory and prompts. Furthermore, users can set up an AI summary for each page separately, with the page configuration overriding the unified settings. An additional feature is the cache functionality, designed to avoid redundant API calls and employ the cache when the content remains unaltered after an AI summary is made. Enjoy its benefits by integrating mkdocs-ai-summary into your pages.</p>
<p>mkdocs-ai-summary is a plugin that generates an AI summary for a webpage. The plugin can be installed via pip and supports the usage of ChatGPT and Tongyi AI. To utilize these, users are required to set an Environmental Variable for the api key. The plugin also includes optional support for the ai-summary.css for custom AI summary admonition style. Configuration parameters include api, model, ignore_code, cache, cache_dir, and prompt amongst others. The plugin also supports individual page configuration for the AI summary. The cache functionality ensures there are no unnecessary duplicate api calls. If the content hasn't changed since the last summary, the cache will be used. This software can be viewed with a demo on 'aiboy996.github.io/mkdocs-ai-summary' and 'yangzhang.site'.</p>
</div>
<p><a href="https://pypi.org/project/mkdocs-ai-summary/"><img alt="PyPI - Version" src="https://img.shields.io/pypi/v/mkdocs-ai-summary" /></a>
<img alt="PyPI - Implementation" src="https://img.shields.io/pypi/implementation/mkdocs-ai-summary" />
Expand All @@ -330,12 +330,14 @@ <h1 id="mkdocs-ai-summary">mkdocs-ai-summary</h1>
<h2 id="installation">Installation</h2>
<p>You should install the package with pip:
<div class="highlight"><pre><span></span><code>pip install mkdocs-ai-summary[chatgpt]
# this will install `openai` additionally
</code></pre></div>
or
<div class="highlight"><pre><span></span><code>pip install mkdocs-ai-summary[tongyi]
# this will install `dashscope` additionally
</code></pre></div></p>
<blockquote>
<p>[!WARNING]</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Only support <a href="https://chat.openai.com/">ChatGPT</a> and <a href="https://tongyi.aliyun.com/">tongyi ai</a> for now.</p>
<p>To use <strong>ChatGPT(default)</strong>, you should set a Environmental Variable for <strong>api key</strong>:
<div class="highlight"><pre><span></span><code><span class="nb">export</span><span class="w"> </span><span class="nv">OPENAI_API_KEY</span><span class="o">=</span><span class="s1">&#39;sk-xxxxxxx&#39;</span>
Expand All @@ -345,8 +347,11 @@ <h2 id="installation">Installation</h2>
<div class="highlight"><pre><span></span><code><span class="nb">export</span><span class="w"> </span><span class="nv">DASHSCOPE_API_KEY</span><span class="o">=</span><span class="s1">&#39;sk-xxxxxxx&#39;</span>
</code></pre></div>
<a href="https://dashscope.console.aliyun.com/">how to get an DASHSCOPE_API_KEY?</a></p>
</blockquote>
<p>[optional] Then you can include the <a href="ai-summary.css">ai-summary.css</a>(optional, this is for the <strong>custom ai summary admonition style</strong>) in the config file as below:</p>
</div>
<div class="admonition info">
<p class="admonition-title">Info</p>
<p>Then you can include the <a href="ai-summary.css">ai-summary.css</a>(optional, this is for the <strong>custom ai summary admonition style</strong>) in the config file as below.</p>
</div>
<h2 id="configuration">Configuration</h2>
<h3 id="options-can-be-set">Options can be set</h3>
<table>
Expand Down
Binary file modified site/sitemap.xml.gz
Binary file not shown.

0 comments on commit 3044077

Please sign in to comment.