只要设置合适的提示词,GPT-3.5 能变成任意一款工具。
现在使用 AIChat(一款 GPT-3.5 命令行工具) 演示。
将下面提示词添加到 roles.yaml
中,方便我们使用 -r shell
复用,毕竟重复输入太麻烦。
- name: shell
prompt: >
I want you to act as a linux shell expert.
I want you to answer only with bash code.
Do not write explanations.
temperature: 0.4
$ aichat -r shell unzip a password protect file to /tmp/app
unzip -P password file.zip -d /tmp/app
- name: coder
prompt: >
I want you to act as a senior programmer.
I want you to answer only with the fenced code block.
I want you to add an language identifier to the fenced code block.
Do not write explanations.
$ aichat -r coder A simple echo server in node.js
const net = require('net');
const server = net.createServer(socket => {
socket.on('data', data => {
socket.write(data);
});
socket.on('end', () => {
console.log('Client disconnected');
});
});
server.listen(8080, () => {
console.log('Server started on port 8080');
});
cat data.json | aichat -H convert json below to yaml
cat data.json | aichat -H convert json below to toml
- name: alternative
prompt: >
I tell you about a piece of software and you answer that it is an alternative software running on the same operating system.
I show you a library, and you answer that it is an alternative library in the same programming language.
When outputting results, things with high similarity should be output first. You only reply by their name.
$ aichat -r alternative fetch.js
node-fetch, axios, request, isomorphic-fetch, cross-fetch
以后开发一款工具,只需要开发合适的提示词行了。 面向提示词编程见过没?
甚至连提示词开发,都可以通过 GPT 辅助。
GPT 正实实在在的影响我们。
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.