Coder Social home page Coder Social logo

vaayne / notionai-plus Goto Github PK

View Code? Open in Web Editor NEW
284.0 7.0 27.0 36.94 MB

NotionAI Plus is a browser extension that adds NotionAI's powerful features to any website you visit

Home Page: https://chrome.google.com/webstore/detail/notionai-plus/ilgkcoockdhdpkikaakkjacblhpmdmeo

License: MIT License

JavaScript 2.53% TypeScript 97.40% CSS 0.07%
gpt-3 gpt3 notion notion-ai notionai chrome-extension python

notionai-plus's Introduction

NotionAI Plus

NotionAI Plus is a browser extension that adds NotionAI's powerful features to any website you visit. With NotionAI Plus, you can easily analyze text, generate summaries, and perform sentiment analysis on any webpage.

Latest changes: CHANGELOG.md

If you are looking for the NotionAI Python SDK, please visit notionai-py

Demo

notionai-plus.mp4

Screen Capture

Click to see

Context Meny

Mian Window

Mian Window without context

Setting Page

Features

  • Analyze text, generate summaries, and perform sentiment analysis on any webpage using NotionAI's powerful features

  • Support multiple engines:

  • Support for all NotionAI built-in prompts

  • Support for using custom prompts

Usage

  1. Install NotionAI Plus from the Chrome Web Store or Firefox Addon
  2. Open the options page and set your Notion space ID
  3. Open any webpage and use the shortcut alt+k to activate the extension
  4. If you select some text and then use the shortcut alt+k to activate the extension, it will automatically fill the text in the input box.

Contributing

NotionAI Plus is an open-source project and welcomes contributions from the community. Feel free to submit issues, feature requests, or pull requests on the GitHub repository.

notionai-plus's People

Contributors

chenpx976 avatar dependabot[bot] avatar vaayne 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  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

notionai-plus's Issues

token not work

r = requests.post(url, headers=cls._build_headers(token))

TypeError: _build_headers() missing 1 required positional argument: 'token'

noting response?

not available?what's wrong ?{"data":[""],"is_generating":false,"duration":0.44491028785705566,"average_duration":0.44491028785705566}

Cannot be used

Notion recently started charging, and free users can only experience it 20 times, which has been working well before, but the recent call code returned null.

第二次触发插件

设置好快捷键后,在页面上选中文字触发快捷键可以激活扩展,但是如果我这个时候选中另一段文字再点击快捷键,扩展就没反应了

Don't work on chrome

I have set my notion space id and openai api key, but it doesn't work on chrome~
image

error: Expecting value: line 1 column 1 (char 0)

 ~/NotionAI/examples/basic   main ±  python3 main.py
data: <!DOCTYPE html>, error: Expecting value: line 1 column 1 (char 0)
data: <html>, error: Expecting value: line 1 column 1 (char 0)
data:   <head>, error: Expecting value: line 1 column 2 (char 1)
data:           <meta charset="utf-8" />, error: Expecting value: line 1 column 3 (char 2)
data:           <title>Notion</title>, error: Expecting value: line 1 column 3 (char 2)

There are some errors in the webui page

image
image

During the use of my webui deployment, an error occurred and the content was not output correctly, and I have checked my account information filled in correctly several times.

'res is not defined' Error

I'm trying to use the NotionAI engine to brainstorm ideas on a text selection (already set up my Space in Options), but I am getting a 'res is not defined' error.

some questions about the chatgptweb engine

Thanks for this great extension. In the notionai-plus extension, my default engine is chatgpt web and it works well, but one question confuses me a lot: I do not login to my chatgpt account(I log out first), but i still works. I am looking forward to your reply.

question

Sorry to bother someone...there is something wrong with my notionAI Plus, i want to know, if i don't pay for notionAI, can i use the service from notionAI plus? i had to try to use its service, there is no response...sad.

NotionAI is not ready

Hello, I have set the notion space id in the latest version 0.0.10, but it still doesn't work on edge, it says "NotionAI is not ready".
image
image
image

Don't work on edge

I save my notion ai account, but it don't work.
I want to debug it. Do you have any suggestions?

I got a error message

data: {"errorId":"a4d63819-215e-430c-9ea9-ce7e451bf284","name":"ValidationError","message":"Invalid input."}, error: 'type'

AttributeError: 'NotionAI' object has no attribute 'write_with_topic'.

Hello, I installed the package and write the code below that is exactly same as your example code.

import os
from notionai import NotionAI

TOKEN = os.getenv("NOTION_TOKEN")

def main():
    ai = NotionAI(TOKEN)
    res = ai.blog_post("write a blog about the meaning of life")
    print(res)

if __name__ == "__main__":
    main()

I inputed my token correctly in the .env file, but I got an error:

Traceback (most recent call last):
  File "main.py", line 12, in <module>
    main()
  File "main.py", line 8, in main
    res = ai.blog_post("write a blog about the meaning of life")
  File "/home/runner/PositiveNegligibleLifecycles/venv/lib/python3.10/site-packages/notionai/notionai.py", line 239, in blog_post
    return self.write_with_topic(TopicEnum.blog_ost, prompt)
AttributeError: 'NotionAI' object has no attribute 'write_with_topic'. Did you mean: 'writing_with_topic'?

Hope you have a nice day 🙂

请问填写的到底是NotionSpaceID还是NotionToken

使用的时候提示 {"errorId":"f1418668-eb83-4701-a35c-f058a68fff04","name":"UnauthorizedError","message":"Token was invalid or expired.","clientData":{"type":"login_try_again"}}

请问是因为Notion AI达到了免费使用次数导致的吗?

Not been working for me since update

since before the most recent notion update I have been your unofficial API and it has been working amazingly. But since then when I try to generate a string using notion AI a blank string is returned: "", this was happening with my code but also your example code when I copied and pasted it.

[REQUEST] Some promising ideas (browser extension)

First of all, thank you again. You can't imagine how useful I found it. <3 Here are some ideas:

  • Full screen mode and left or right panel mode switcher with the last position remembered.
  • Ability to drag the window.
  • Option to copy the answer and paste it into the input, which is useful for modifying answers with a new prompt and improving them.
  • Option to copy and paste into the current page's text area or input, which is useful for writing comments, answers, or emails.
  • Default selection of the template.
  • Separate selection for templates, as the list is too long. For example, languages could be separated.
  • Ability to output in another language.
  • Acting templates? (act as a coach, act as a professional trader etc)
  • Coding templates? Improve the code, find problems, write comments, optimise, generate tests etc
  • Adding a costume list of templates for the personal prompt input
  • Day/Night mode

ps: btw why is the source code that is in repo different from the production version? folder says 0.07 , chrome shows 0.05

shortcut to hide panel

Hi, I found that the latest version of the extension cannot use the shortcut key command+ k to hide the extension, I think this is a very practical feature, I hope it can be added.

如下

能不能给个离线插件包呢?

not found spaceId

Hello, I described the operation according to your document, but I couldn't find spaceid

image

ImportError: cannot import name 'ActionTypeEnum' from 'notionai.enums'

Hey @vaayne , awesome project! I met this issue when run python app.py 😁

Traceback (most recent call last):
  File "/Users/jimmylv/c/AI/NotionAI/examples/webui/app.py", line 5, in <module>
    from notionai.enums import ActionTypeEnum, TopicEnum, TranslateLanguageEnum
ImportError: cannot import name 'ActionTypeEnum' from 'notionai.enums' (/Users/jimmylv/c/AI/NotionAI/examples/webui/.venv/lib/python3.10/site-packages/notionai/enums.py)

Errors in Chrome Extension from The Github (Not Webstore)

You are an absolute genius! You had a great idea, and I absolutely love it! Thank you!

And here is the errors in logs from chrome extensions tab

Unchecked runtime.lastError: Cannot create item with duplicate id notionai
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-ChatGPT
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-translate
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-changeTone
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-helpMeWrite
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-continueWriting
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-summarize
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-improveWriting
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-fixSpellingGrammar
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-explainThis
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-makeLonger
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-makeShorter
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-findActionItems
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-simplifyLanguage
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-helpMeWrite-brainsteamIdeas
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-helpMeWrite-blogPost
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-helpMeWrite-outline
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-helpMeWrite-socialMediaPost
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-helpMeWrite-pressRelease
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-helpMeWrite-creativeStory
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-helpMeWrite-essay
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-helpMeWrite-poem
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-helpMeWrite-meetingAgenda
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-helpMeWrite-prosConsList
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-helpMeWrite-jobDescription
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-helpMeWrite-salesEmail
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-helpMeWrite-recruitingEmail
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-translate-english
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-translate-korean
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-translate-chinese
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-translate-japanese
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-translate-spanish
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-translate-russian
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-translate-french
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-translate-german
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-translate-italian
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-translate-portuguese
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-translate-dutch
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-translate-indonesia
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-translate-tagalog
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-translate-vietnamese
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-changeTone-professional
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-changeTone-casual
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-changeTone-straightforward
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-changeTone-confident
Unchecked runtime.lastError: Cannot create item with duplicate id notionai-changeTone-friendly
Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received
Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received

开发者你好,有个疑问求助

之前第一代开发的notion 我记得是使用cookie传入,有一个web界面呈现,那个前端web界面是开源的哪个项目来着?一直没想起来

TypeError: can only concatenate str (not "NoneType") to str

HI, thanks for your work.
I updated the package to 0.1.0, and tried to test your example code.

$ pip list |grep notion
notionai-py          0.1.0    

$ cat test.py 
import os
from notionai import NotionAI

TOKEN = os.getenv("NOTION_TOKEN")
SPACE_ID = os.getenv("NOTION_SPACE_ID")

def main():
    ai = NotionAI(TOKEN, SPACE_ID)
    res = ai.blog_post("write a blog about the meaning of life")
    print(res)

if __name__ == "__main__":
    main()

And I set my NOTION_TOKEN and NOTION_SPACE_ID in the .env file

NOTION_TOKEN="xxx"
NOTION_SPACE_ID="yyy"

but I got an error:

$ python3 test.py 
Traceback (most recent call last):
  File "test.py", line 13, in <module>
    main()
  File "test.py", line 9, in main
    res = ai.blog_post("write a blog about the meaning of life")
  File "/home/a/notionai/.venv/lib/python3.8/site-packages/notionai/notionai.py", line 262, in blog_post
    return self.writing_with_topic(TopicEnum.blog_post, prompt)
  File "/home/a/notionai/.venv/lib/python3.8/site-packages/notionai/notionai.py", line 90, in writing_with_topic
    return self._post(content)
  File "/home/a/notionai/.venv/lib/python3.8/site-packages/notionai/notionai.py", line 59, in _post
    r = self._request(content)
  File "/home/a/notionai/.venv/lib/python3.8/site-packages/notionai/notionai.py", line 45, in _request
    "token_v2=" + self.token,
TypeError: can only concatenate str (not "NoneType") to str

It looks like the token was not set correctly. But I double-checked my token and confirmed that it was correct. I even set the relevant environment variables, but the error reporting persists.

Could not decrypt token.

I followed the instructions on Github to obtain
NOTION_TOKEN
截圖 2023-03-06 上午5 36 31

and NOTION_SPACE_ID,
截圖 2023-03-06 上午5 53 04

but when executing it, an error 'Could not decrypt token' appeared.
截圖 2023-03-06 上午5 37 58

两个小建议,增加背景颜色和增加选项中文

第一个是,只在谷歌上用没问题,因为右边是空白的,但当右边有东西的时候,比如我逛b站,右边就是各种视频,我就看不清notion ai的回复了(当然可以双击一下,就有底色勉强看)
第二个是,选项都是英文的。。讲真有点多还看不懂(好像比notion ai原生的还多?是我幻觉吗?)

另外感觉速度没用notion内置的快,可能是因为这里是必须全文输出完了之后一次性展示?所以显得久了?

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.