bclswl0827 / ChatGemini

✨ ChatGemini 是一个基于 Google Gemini 的网页客户端,对标 ChatGPT 3.5,操作逻辑同 ChatGPT 3.5 一致,同时支持在聊天中上传图片,应用会自动调用 Gemini-Pro-Vision 模型进行识图。
http://ibcl.us/ChatGemini/
MIT License
904 stars 247 forks source link

Add an image to use models/gemini-pro-vision, or switch your model to a text model. #22

Closed jun0wanan closed 4 months ago

jun0wanan commented 4 months ago

调用gemini-vision-pro 后得到的错误,请问你知道怎么解决吗?我只输入了text,没有输入图片。难道是必须要带图吗?

bclswl0827 commented 4 months ago

是的,调用 gemini-vision-pro 必须带图,另外 gemini-vision-pro 没有上下文支持

jun0wanan commented 4 months ago

是的,调用 gemini-vision-pro 必须带图,另外 gemini-vision-pro 没有上下文支持

好奇怪。。那为什么官网的gemini可以直接输入文本,而且还有上下文支持,他们的api确是这样哇.......我测了他们官网网页版好像是能够图文上下文的。

bclswl0827 commented 4 months ago

我测了他们官网网页版好像是能够图文上下文的

官网同 Google 提供的 API 是有差异的,请以开发文档为准。开发文档中明确提到:

The gemini-pro-vision model (for text-and-image input) is not yet optimized for multi-turn conversations. Make sure to use gemini-pro and text-only input for chat use cases.

参考链接 ai.google.dev/tutorials/web_quickstart#multi-turn-conversations-chat

jun0wanan commented 4 months ago

我测了他们官网网页版好像是能够图文上下文的

官网同 Google 提供的 API 是有差异的,请以开发文档为准。开发文档中明确提到:

The gemini-pro-vision model (for text-and-image input) is not yet optimized for multi-turn conversations. Make sure to use gemini-pro and text-only input for chat use cases.

参考链接 ai.google.dev/tutorials/web_quickstart#multi-turn-conversations-chat

好的谢谢您,不知道能不能还向您问问,gemini的api能不能设置时间timeout那个,我测特别长的图文会超过60s,直接给我报错了:

urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='generativelanguage.googleapis.com', port=443): Read timed out. (read timeout=60.0)

bclswl0827 commented 4 months ago

不需要设置 timeout

jun0wanan commented 4 months ago

不需要设置 timeout

那特别长的图文超时怎么办,我查了查官方文档没有这个参数欸,其他都有就gemini没有

bclswl0827 commented 4 months ago

不需要设置 timeout

那特别长的图文超时怎么办,我查了查官方文档没有这个参数欸,其他都有就gemini没有

特别长的图文,启用 SSE 即可,流式读取 你在使用 Python,参考链接 https://ai.google.dev/api/python/google/generativeai/GenerativeModel#streaming

jun0wanan commented 4 months ago

不需要设置 timeout

那特别长的图文超时怎么办,我查了查官方文档没有这个参数欸,其他都有就gemini没有

特别长的图文,启用 SSE 即可,流式读取 你在使用 Python,参考链接 https://ai.google.dev/api/python/google/generativeai/GenerativeModel#streaming

好的谢谢您!

jun0wanan commented 4 months ago

不需要设置 timeout

那特别长的图文超时怎么办,我查了查官方文档没有这个参数欸,其他都有就gemini没有

特别长的图文,启用 SSE 即可,流式读取 你在使用 Python,参考链接 https://ai.google.dev/api/python/google/generativeai/GenerativeModel#streaming

你好流式读取多模态模型没有欸,那怎么解决orz