Git Product home page Git Product logo

chatgpt-desktop's Introduction

ChatGPT-Desktop

English | 中文 | Español

Features

  • Support for multiple platforms, minimal resource usage, ideal for 24/7 use

  • Easily configurable proxy settings, bypass network restrictions with ease

  • Wake up at any time with a customizable shortcut key, boost your productivity

  • Support for multiple conversations, integrated with GPT-3.5-turbo memory mode, never forget what you've said

  • Robust prompt management, build your own role preset library

  • Share your moments with just one click

  • Automatic updates, local conversation history storage, your privacy is our priority

  • And much more to explore...

Download

Supported Platforms:

Screenshots

Detail

Q & A

1. There are network restrictions in my area, how can I use it properly?

You can try our provided soulution.

Detailed deployment tutorial on Discord.

2. "App Is Damaged and Can't Be Opened" on MacOS

Reference solution.

How to Contribute

Development environment requirements

Please install Rust & NodeJS according to the steps on the official websites

Download project dependencies

npm install

Run the project on the development mode

npm run tauri dev

Build the project

Debug after build, please add flag --debug

npm run tauri build

To generate your own application icon, please replace src-tauri/assets/icon.png, only .png format is supported

npm run build:icon

yarn OR pnpm is also supported.

Contributions of any kind are welcome,

  • Issue
  • Pull request
  • Feature request
  • Bug report
  • Documentation
  • Translation
  • etc.

Contact Us

Star History

Star History Chart

Contributors

License

MIT License

chatgpt-desktop's People

Contributors

1596944197 avatar ayangweb avatar azir-11 avatar davidramos-om avatar donghuitiao avatar l1m2e avatar orangelckc avatar pkptzx 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chatgpt-desktop's Issues

禁用鼠标右键与内置快捷键

再一次.....

只在发布的版本禁止右键
  if (import.meta.env.PROD) {
    document.addEventListener('contextmenu', (event) => event.preventDefault());
  }
屏蔽一些浏览器默认的快捷键

比如:ctrl+p,ctrl+u,ctrl+f,ctrl+g

  document.onkeydown = function(event) {
    if(event.ctrlKey == true && event.code == 'KeyP') {
        console.log('Ctrl + p');
        event.preventDefault();
    }
    if(event.ctrlKey == true && event.code == 'KeyU') {
        console.log('Ctrl + u');
        event.preventDefault();
    }
    if(event.ctrlKey == true && event.code == 'KeyG') {
        console.log('Ctrl + g');
        event.preventDefault();
    }
}

希望增加选择头像的功能。

毕竟使用过程中我用了唐三藏、机器人、老妈、朋友等等。。总希望能有个匹配的头像,更加贴切一些,最好还能跟换自己的头像。

对话优化

对话的宽度会被 code 块撑开,需要单独给 code 块添加 overflow-auto

输入时token计算模拟

import GPT3Tokenizer from 'gpt3-tokenizer';
const tokenizer = new GPT3Tokenizer({ type: 'gpt3' });
export function estimateTokens(str: string): number {
    const encoded: { bpe: number[]; text: string[] } = tokenizer.encode(str);
    return encoded.bpe.length;
}

参考demo

需要同时计算输入的字符+角色描述的字符
如果开启了记忆模式,还需要增加记忆所消耗的字符
总上传token必须少于4096,建议留200的余量,因为计算可能和实际有误差

需要将计算token的方法抽离,之后会用到计算返回答案的token计算

Image

窗口优化

windows 电脑窗口添加添加阴影,始终加边框,取消圆角!

程序窗口快捷键切换效果的建议

  1. 为快捷键切换加上淡入效果,不会太突兀。
  2. 按以下步骤有个不好的体验:
    ①快捷键呼出窗口 ②用鼠标到windows任务栏点击图标隐藏窗口 ③用快捷键呼出窗口;
    此时是不能正常呼出窗口的,必须用鼠标点击任务栏的图标来打开。

以上两点我均参考everything。

图片生成

// 根据提示创建图像
export const createImage = (params, token) => {
  console.log(params)
  return axios({
    method: 'post',
    baseURL: `${baseUrl}/v1/images/generations`,
    headers: {
      'Authorization': 'Bearer ' + token,
      'Content-Type': 'application/json'
    },
    data: params
  }).then(res => {
    return res.data.data;
  })
}

// 根据提示词编辑图像
export const createImageEdit = (formData, token) => {
  return axios({
    method: 'post',
    baseURL: `${baseUrl}/v1/images/edits`,
    headers: {
      'Authorization': 'Bearer ' + token,
      'Content-Type': 'multipart/form-data'
    },
    data: formData
  }).then(res => {
    return res.data.data;
  })
}

拖动问题for windows

  1. 如果不置顶,无法拖动。
  2. 拖动边太窄,不好拖。
  3. 为什么不默认居中。

Windows版本运行正常但会弹出警示框

Windows可以正常运行进行问答,但问出第一个问题后会弹出一个警示框

请求出错: Network Error: lo Error: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。(os error 10060): loError: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。(os error 10060)

256db843382736776afca60677de535.png

token 超出提示

目前只做了实时计算+显示,还需要再超过token限制时,给用户提示的交互设计

应当给白色主题增加边框或阴影

应当给白色主题增加边框或阴影。
当我在浏览白色网页或其他应用时,焦点不在chatgtp-desktop上时,边框会隐藏,这时候我分不清天与地。
image

优化对话页面

  1. 添加操作按钮!
  2. 对话的宽度会被 code 块撑开,需要单独给 code 块添加 overflow-auto

ubuntu下 快捷键没用

最新的0.08版本,界面本身没什么问题,

就是快捷键无法隐藏、显示出窗口来。

换了一些按键组合,也没用

ubuntu22.04

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.