欢迎光临散文网 会员登陆 & 注册

写一个powershell函数调用你自己申请的chatgpt api

2023-03-04 18:14 作者:时间鸟  | 我要投稿

api参考资料:https://platform.openai.com/docs/api-reference/chat/create

测试使用环境:win10, powershell7 (不建议使用系统自带的powershell,解析json、字符编码会有一些奇怪的问题)

将这个函数放入到 powershell 的 配置文件$profile,以后每次启动powershell就都能生效了

使用例:


写一个powershell函数调用你自己申请的chatgpt api的评论 (共 条)

分享到微博请遵守国家法律