Skip to content

一个简单golang命令行接入chatgpt的脚本

Notifications You must be signed in to change notification settings

Garbo1229/chatgpt-cmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

一个简单golang命令行接入chatgpt的脚本

使用步骤:

  1. 复制代码 git clone https://github.com/Garbo1229/chatgpt-cmd.git

  2. 修改 main.goapiKey 的变量的值

    ...
    // 替换为您的API密钥
    var apiKey = ""
    ...
    
  3. 修改 ~/.bashrc~/.zshrc

    // 最后一行添加 PATH 为你的路径
    ...
    alias chatgpt="go run <PATH>/main.go"
    
  4. 立即生效

    source ~/.bashrc 或 ~/.zshrc
    
  5. 测试 chatgpt

Enjoy it ~

About

一个简单golang命令行接入chatgpt的脚本

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages