Second Brain: Crafted, Curated, Connected, Compounded on 10月02日
使用OpenAI插件增强Obsidian效率
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本文介绍了如何通过安装和配置OpenAI插件来增强Obsidian的功能。文章详细说明了安装步骤、设置模板以及使用方法,帮助用户利用OpenAI的强大AI能力提升写作和内容创作的效率。通过Ava和Templater插件,用户可以轻松地将选定的文本发送给OpenAI进行生成,从而实现快速的内容创作。

📚 通过安装Ava和Templater插件,用户可以无缝集成OpenAI的AI功能到Obsidian中,实现高效的文本生成。

🔧 文章详细介绍了在Obsidian中安装OpenAI插件的具体步骤,包括创建OpenAI API账户、获取密钥并配置插件,确保用户能够顺利设置。

🎨 Templater插件允许用户自定义模板,通过JavaScript脚本与OpenAI API交互,实现选中文本的智能生成,提升创作自由度。

🚀 使用Ava插件,用户只需选中所需文本并激活模板,即可快速生成内容,极大地提高了内容创作的效率和质量。

OpenAI (GPT-3) is a powerful AI that can write whole articles, see Data Nets (fully written by AI). It’s the same AI backbone GPT-3 that is used for GitHub Copilot.

Wouldn’t it be nice to use the inside of Obsidian? Luckily there are two plugins and one that works for my needs.

I liked the integration better of Ava and gave it a try. And it’s superb as you select text and apply a Template, and voila, OpenAI will generate the text.

Here a small demonstrations how it looks like:

# How to install

Check the instructions on GitHub. But essentially you need to create an account on OpenAI API, and create secret key under View API Keys. Copy these and add to your pluging in Obsidian.

It also supports Stable Diffusion to generate image, which I haven’t used yet

# Set up the Template

With the Templater plugin you need to add a script, I had to call it completeSelection.js and added this code (see GitHub for the latest):

 1 2 3 4 5 6 7 8 91011121314151617
const completeSelection = async () => {    document.body.style.cursor = "wait";    const msg = window.getSelection().toString();    const response = await app.plugins.plugins["ava"].openai.createCompletion({        "model": "text-davinci-002",        "prompt": msg,        "temperature": 0.7,        "max_tokens": msg.length + 100,        "top_p": 1,        "frequency_penalty": 0,        "presence_penalty": 0    })    document.body.style.cursor = "default";    return `${msg}${response.data.choices[0].text}`;}module.exports = completeSelection;

Set the location you put this JavaScript:
![[Pasted image 20221124105048.png]]

Now create a new Markdown note which you move to your Templater folder that contains nothing else than:

1
<% tp.user.completeSelection() %>

Now you are all set and can use it.

# How to use it?

You select a text, and activate a template with Templater either via cmd+p and search for Templater: Open Insert Template modal or add a shortcut to it (I have cmd+t) and the AI will do his job.

# Example with text-davinci-002

https://www.ssp.sh/brain/Pasted%20image%2020221124104516.pnhttps://www.ssp.sh/brain/Pasted%20image%2020221129105144.png/Pasted%20image%2020221129105144.png">

# Example with text-davinci-003

After the upgrade 2022-11-29 to text-davinci-003, I added the exact same questions:

Vim is an incredibly powerful text editor that is used by experienced developers and system administrators. It is incredibly fast, has a large number of features, and is highly customizable. Learning Vim can help you become a more efficient programmer and system administrator, enabling you to work faster and with fewer mistakes. It can also help you become more familiar with the command line, which is an essential skill for many development and sysadmin tasks.

Why is OpenAI the future?

OpenAI is the future because of its potential to revolutionize the way we interact with technology. Its focus on artificial general intelligence (AGI) research and development will allow machines to learn and think in ways that are similar to humans, potentially enabling them to solve complex problems and create new solutions. OpenAI’s focus on ethical AI use, as well as its commitment to making its technology accessible to everyone, also gives it an advantage over other tech companies. By making its technology available to the public, OpenAI will help to ensure that the AI revolution is an inclusive one, rather than an exclusive one that only benefits

See also a video on this Tweet.


Origin:
References: More on Second Brain Assistant with Obsidian (NoteGPT)
Created 2022-11-24

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

OpenAI Obsidian AI写作 插件教程
相关文章