0

如何修改chatgpt头像?

 1 year ago
source link: https://foofish.net/change-chatgpt-avatar.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头像? - FooFish

你们发现了吗?

我们跟ChatGPT聊天时,用户头像都是邮箱账号的前两个字母,而有些人的头像却是他自己的头像,这是怎么做到的呢?

其实,这是ChatGPT网站用了一个叫Gravatar的第三方的服务 , Gravatar 可以为每个邮箱地址生成一个唯一的默认头像,默认是邮箱的前面几个字母,ChatGPT就用该图像作为用户的默认头像来显示。

如何设置自己的头像?

打开 Gravatar网站: https://en.gravatar.com/

image-20230421155758143

使用 WordPress.com 帐户注册 Gravatar

image-20230421160058703

创建后,你的邮箱账号会收到一封账号激活邮件,激活成功后就可以开始设置头像了。

image-20230421160811627
image-20230421152454805

本地选择你要上传的头像即可。

设置头像后并不会在ChatGPT的网站立即生效,这是因为有缓存问题,你可以将退出ChatGPT再重新登录后就能看到你自己的头像了。

image-20230421161321133

如果你的产品也想接入Gravatar,其实也很简单,几行代码就能搞定,例如我使用Python可以这样:

import urllib, hashlib

email = "[email protected]" # 你的邮箱
default = "https://www.example.com/default.jpg" # 默认头像
size = 40 # 头像尺寸

# 构造头像的URL地址
gravatar_url = "https://www.gravatar.com/avatar/" + hashlib.md5(email.lower()).hexdigest() + "?"
gravatar_url += urllib.urlencode({'d':default, 's':str(size)})

直接把url放在img标签即可。

最后推荐加入我的知识星球【ChatGPT研究社】,里面不仅有ChatGPT的保姆级教程还有ChatGPT相关的应用案例、副业案例、创业案例、商业价值分享、以及ChatGPT开发教程,现在加入即可获取的一个ChatGPT账号。

image-20230330011719223

有问题可以扫描二维码和我交流

关注公众号「Python之禅」,回复「1024」免费获取Python资源

python之禅

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK