Git Product home page Git Product logo

vscode-writer-assistant's Introduction

Writer Assistant

一款基于生成模型GPT-2的写作助手,旨在提高写作速度和增加写作灵感。目前依托vscode平台,作为插件辅助用户写作使用。

效果

使用

打开需要编辑的TXT文件, 编辑一个开头后,追加一个空格符 _ , 然后按 Ctrl + I 续写文章。例如: 输入”今天... 我们“上文后,需要在后面追加一个空格”今天... 我们 “,才能进行续写。

注意:打开的文本后缀必须是.txt, 新建的文本需要保存后才能自动续写。

安装

插件安装

通过vscode市场搜索 writer-assistant 可以直接安装插件, 也可以通过下载插件进行手动安装。

插件默认的服务是在线的,目前跑在一台只有两核的服务器上T^T,所有有时候请求会比较慢,如果想提高性能,可以通过本地部署服务来提升体验。

本地部署服务

通过本地部署服务和配置

  • 可以提高服务的响应速度,当然这个也取决于本地机器的性能。
  • 本地部署还可以突破补全字数以及推荐的句子数的限制。

Docker环境安装

服务运行需要Docker环境,如果你的机器没有Docker, 下载安装参考官网

启动服务

已经打包成镜像,可以直接pull下来运行。

docker run -d -p 23423:80 --name writer-assistant-server mymusise/writer-assistant-server

更具体的安装过程参考详细文档

设置参数

  • serverAddress: 后台服务地址,本地部署后填写本地地址
  • maxContext: 最大参考上下文长度(只参考上文)
  • maxLength: 生成文本的最大长度(通用服务最长长度为8, 本地部署最长支持128)
  • numSuggest: 推荐的句子数(通用服务一次最多推荐3个句子, 本地部署不受限制)

图

关于模型

声明

项目用到的数据均来源网络,本项目未进行任何商业目的。本项目遵从GPL协议,引用请注明出处。

vscode-writer-assistant's People

Contributors

mymusise 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.