Coder Social home page Coder Social logo

gpt3-chrome-extension's Introduction

buildspace

start

下記のhpに書き換え後の文章は生成予定 https://www.calmlywriter.com/online/?utm_source=buildspace.so&utm_medium=buildspace_project

manifest.json

manifest.jsonでは、拡張機能の名前、必要なアセット、実行に必要なアクセス許可を ブラウザーに伝え、バックグラウンドおよびページで実行するファイルを識別します。

name, discription

Chromeの拡張機能ストアで表示される名前と詳細

action

  • default_title: 右クリックで表示する際の文章名
  • default_popup: 拡張機能を押した際のpopupの表示ファイル

background

データのrelayerを指定。 今回はservice_workerで、拡張機能側から読み込んだ文字をもとにchatGPTに通信をしに行く。 lisnerも同様

permissions

拡張機能は基本的にブラウザで実行されるマルウェアになる可能性があるため、セキュリティはそれらにとって大きな問題です。拡張機能に必要な権限を明示的に宣言する必要があります。

content_scripts

jsを追加時はmanifest.jsonでcontent_scriptsとして 読み込ませる。

curl https://api.openai.com/v1/completions \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer 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' \
  -d '{
  "model": "text-davinci-003",
  "prompt": "さっぱりだ",
  "max_tokens": 30,
  "temperature": 0.4
}'

gpt3-chrome-extension's People

Contributors

almostefficient avatar adilanchian avatar naoto13 avatar

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.