
用Rust写了一个免费使用 ChatGPT 的命令行工具
代码在 https://github.com/shenjinti/fgpt star
提供了 mac 和 linux 的二进制包. 可以到 github 上自行下载
不得不说,Rust写 cli 工具还是真的好用,不管是readline或者tokio和reqwest都大大减少代码量
https_proxy变量OpenAPI模式,无限使用 fgpt "How to get a domain's MX record on linux shell?" # Output plain code -c/--code fgpt -c "Write python code to reverse a string" # With pipe git diff | fgpt "Write a git commit bief with follow diff" # With stdin fgpt "Convert the follow csv data to json, without any description" < contacts.csv 1 amorphobia 2024-04-18 20:13:14 +08:00 linux 可以编译 musl libc 吗?想在某些古老的系统上使用 |
2 Vogan 2024-04-18 22:20:04 +08:00 能支持代码 markdown 的高亮嘛? shell-gpt 支持 |
3 inkuku OP @amorphobia 可以的,我研究一下 |
5 molezznet 2024-04-19 09:25:56 +08:00 fgpt "hello" Error: Reqwest("builder error") 怎么排查 …… |
7 macy 2024-04-19 10:29:44 +08:00 能否支持自己配置 url 和 key 呢,这样就能对接到其他兼容的大模型或者企业内部私有的模型了 |
8 molezznet 2024-04-19 10:45:37 +08:00 fgpt --log-level debug "hi" 2024-04-19 10:45:02 [DEBUG] cli.rs:141 - Message { role: "user", content: "hi", content_type: "text" } Error: Reqwest("builder error") |
13 inkuku OP @molezznet hahah ,看到了,多谢,确认是 reqwest 没有启用 socks5 导致的,我已经修复了,可以测试看看哈哈 |
14 molezznet 2024-04-19 20:47:30 +08:00 @inkuku 行了 >> 含有“笑”的词语 当然,以下是一些含有“笑”的词语: 1. 笑容 (xiào róng) - smile 2. 笑话 (xiào huà) - joke 3. 笑声 (xiào shēng) - laughter 4. 笑脸 (xiào liǎn) - smiling face 5. 笑眼 (xiào yǎn) - laughing eyes 6. 笑嘻嘻 (xiào xī xī) - smilingly 7. 笑到肚子疼 (xiào dào dù zi téng) - laughing till one's stomach hurts 8. 笑而不语 (xiào ér bù yǔ) - smile without saying a word 希望你喜欢这些词语! |
15 royalknight 2024-04-22 11:29:08 +08:00 这个会封号吗,哈哈 |
16 inkuku OP @royalknight 不会,因为没有登录注册账号的逻辑,但是需要自己翻墙 |