0

如何利用ChatGPT帮你写代码?

 1 year ago
source link: https://www.51cto.com/article/742059.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

如何利用ChatGPT帮你写代码?

作者:仲一 2022-12-12 12:04:59
最近爆火的ChatGpt相信大家都不陌生,听说它还能写代码,而且能力不凡。作为合格的嵌入式软件工程师,必须得充分利用起来!

最近爆火的ChatGpt相信大家都不陌生,听说它还能写代码,而且能力不凡。作为合格的嵌入式软件工程师,必须得充分利用起来!

获取系统IP地址

先写一个脚本,获取系统IP地址吧,没想到还有详细的注释!这不比百度好用多了?

图片

求最长回文子串

图片
图片
图片

完整的解析都有,很强大!

先来个简单的点灯吧。

图片
图片
图片

确实写的有模有样的,我被惊艳到了!

写一个块驱动程序

下面来个复杂的

图片
图片
图片
图片

不得不说,框架都搭建好了,完全没问题!

systemtap脚本

这里手误还打错了systemtap,它也能自动纠正回来!

图片
图片

最后还有详细的注释!这么详细,相信大家都能看懂了吧。

ChatGPT注册方法,确保可用

注册参考:https://zhuanlan.zhihu.com/p/589642999

地区选择Indonesia

ChatGPT能写代码,确实很厉害。但我在使用时,也遇到了好几次给出的是错误答案。不过,这样也好,起码也说明程序员这一行暂时也不会被AI所替代。

像简单的shell脚本,makefile等,ChatGPT确实能处理。我们可以把AI生成的代码我们拿来修改下,可以节省很多时间。

GITHUB上好玩的ChatGPT的项目

最后给大家推荐下在知乎上看到一个关于chatGPT的好玩的项目。

原文链接:https://www.zhihu.com/question/570189639/answer/2793888150

GitHub上目前已经有很多基于ChatGPT的项目,基本100⭐️以上的都在这里了,汇总如下:

  • 一个ChatGPT 使用指南:https://github.com/f/awesome-chatgpt-prompts
  • ChatGPT 提问工程师开发指南:https://github.com/wuchangming/chat-gpt-ask-question-engineer-handbook

非官方API

  • 使用Python编写的轻量级的 ChatGPT API:https://github.com/acheong08/ChatGPT
  • 一个使用Python编写的非官方ChatGPT API,基于Daniel Gross的WhatsApp GPT:https://github.com/taranjeet/chatgpt-api
  • 使用 Python 编写的非官方ChatGPT API :https://github.com/rawandahmad698/PyChatGPT

非官方客户端

  • 使用nodejs编写的非官方 ChatGPT 客户端:https://github.com/transitive-bullshit/chatgpt-api
  • 一个ChatGPT macOS桌面客户端:https://github.com/vincelwt/chatgpt-mac
  • 一个使用rust编写的 ChatGPT 桌面客户端,支持macOS, Windows, Linux:https://github.com/sonnylazuardi/chatgpt-desktop

编辑器插件

  • 一个 VSCode ChatGPT 插件:https://github.com/mpociot/chatgpt-vscode

浏览器插件

  • 一个为ChatGPT添加web访问能力的Chrome浏览器插件:https://github.com/qunash/chatgpt-advanced
  • 一个ChatGPT Chrome 插件,把ChatGPT集成到互联网上的每个文本框中:https://github.com/gragland/chatgpt-chrome-extension
  • 可以让ChatGPT回答在谷歌搜索结果页面旁边显示的浏览器插件,支持Chrome/Edge/Firefox浏览器:https://github.com/wong2/chat-gpt-google-extension
  • 集成在谷歌搜索结果的浏览器插件:https://github.com/ZohaibAhmed/ChatGPT-Google
  • 一个Chrome浏览器插件,可以导出你的ChatGPT历史到PNG、 PDF,或生成一个可共享的链接:https://github.com/liady/ChatGPT-pdf

微信机器人

  • ChatGPT 微信机器人:https://github.com/AutumnWhj/ChatGPT-wechat-bot
  • 基于开源的微信对话机器人SDK Wechaty 编写的 ChatGPT 微信机器人:https://github.com/fuergaosi233/wechat-chatgpt
  • 为个人微信接入ChatGPT:https://github.com/869413421/wechatbot

QQ机器人:

  • 一个Python编写的基于**Nonebot2**的一个闲聊机器人:https://github.com/Quan666/ELFChatBot
  • 一个基于 OpenAI GPT-3 和 Mirai 的 QQ 聊天机器人:https://github.com/Byaidu/QChatBot-GPT
  • ChatGPT for Mirai QQ 机器人:https://github.com/lss233/chatgpt-mirai-qq-bot
  • 基于OpenAI ChatGPT 开发的QQ对话机器人,调用Completion API,支持QQ私聊和群聊,mirai+ChatGPT+MySQL实现:GitHub - RockChinQ/QChatGPT: 基于OpenAI ChatGPT 开发的QQ对话机器人,调用Completion API,支持QQ私聊和群聊,mirai+ChatGPT+MySQL实现

电报机器人

  • 一个基于 ChatGPT 的 Telegram 机器人:https://github.com/m1guelpf/chatgpt-telegram
  • 一个 ChatGPT Telegram 机器人:https://github.com/altryne/chatGPT-telegram-bot

GIT版本工具

  • 使用ChatGPT自动生成commit提交信息:https://github.com/RomanHotsiy/commitgpt
  • 非官方的ChatGPT Raycast 扩展:https://github.com/abielzulio/chatgpt-raycast
  • ChatGPT蓝鸟机器人:https://github.com/transitive-bullshit/chatgpt-twitter-bot
  • 一个基于 ChatGPT 的 AI 对话 Koishi (聊天机器人框架)框架插件:https://github.com/koishijs/chatgpt-bot
  • ChatGPT 黑魔法书,中文提问魔法指令:https://github.com/del-xiong/awesome-chatgpt

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK