Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

这几天刷屏的谷歌 Gemini 大模型又放出免费 API,压力给到奥特曼 #107

Open
cssmagic opened this issue Jan 9, 2024 · 3 comments
Labels

Comments

@cssmagic
Copy link
Owner

cssmagic commented Jan 9, 2024


魔法哥还活着哈,最近一年都在做 AI 相关的事情。有不少心得会陆续跟大家分享,敬请期待~


gemini-kv-narrow

最近 Gemini 很火啊,放出免费 API 更是 “火上浇油”。信息量有点大,我给大家提炼一下。

放出免费接口

目前放出 API 的是 Gemini Pro 模型,完全免费。

不过免费版限制了调用频率,每分钟 60 次,这对于个人开发者来说已经足够了。此外,我们发出的提示词和模型生成的内容会用于模型的改进。我们免费用,谷歌收获语料,双赢了属于是。

gemini-price-free

在线试用

Gemini 官网提供了一个在线 Playground(Google AI Studio),可以直接上手体验 Gemini Pro 和 Gemini Pro Vision 模型,文本补全和图片识别都能用。还可以探索官方提供的 提示词 demo 库

我粗略试了一下,生成速度和质量都不错,还免费。这下压力给到了奥特曼 [狗头]

不过这个在线 Playground 主要还是用于技术预览,不是面向普通用户的,暂时还不能对 ChatGPT 产生什么威胁。不过相信开源社区很快就会推出基于 Gemini 的聊天机器人 Web UI,到时候大家就会用得比较爽了。

开发者指南

作为开发者,我们当然要申请个 API Key 玩起来, 薅羊毛怎么能少了我们 ……肯定要看看它的实际效果如何啦!

API Key 申请在这里: https://makersuite.google.com/app/apikey

我已申请 API Key:

gemini-api-key

也调用成功了,截图如下:

gemini-postman

详细用法参见 API 文档:https://ai.google.dev/tutorials/rest_quickstart

接口设计也很清晰,还支持流式输出,熟悉大语言模型 API 的小伙伴应该都是秒懂啦。

其他

  • 值得注意的是:Gemini 的 token 计数很省,一个汉字都用不了一个 token,那么 30k 的上下文至少相当于隔壁家的 64k 了。谷歌更懂中文?[捂嘴笑]

  • Gemini 是谷歌的服务,大家在访问上述链接时如果遇到错误,请留意一下自己的线路哈。

今天就聊到这里,觉得有用,不防推荐给朋友哦~


本文在 “CSS魔法” 微信公众号首发,扫码立即关注:

weixin-qrcode


© Creative Commons BY-NC-ND 4.0   |   我要订阅   |   我要打赏

@cssmagic
Copy link
Owner Author

cssmagic commented Jan 9, 2024

打不开链接的同学,请留意一下自己的线路。建议 US 或 JP 线路。

@cssmagic cssmagic added the AI label Jan 9, 2024
@QiYongchuan
Copy link

请问这个api,国内可以直接请求吗

@cssmagic
Copy link
Owner Author

和 Google 的其他服务一样,国内无法直接访问。而且它反向限制了访问 IP,因此建议 US 或 JP 线路。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants