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 聯網搜索調用 #615

Open
5 tasks done
123hi123 opened this issue Dec 12, 2024 · 11 comments
Open
5 tasks done

支持Gemini 聯網搜索調用 #615

123hi123 opened this issue Dec 12, 2024 · 11 comments
Labels
enhancement New feature or request

Comments

@123hi123
Copy link

123hi123 commented Dec 12, 2024

例行检查

  • 我已确认目前没有类似 issue
  • 我已确认我已升级到最新版本
  • 我已完整查看过项目 README,已确定现有版本无法满足需求
  • 我理解并愿意跟进此 issue,协助测试和提供反馈
  • 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

功能描述

可以聯網搜索的gemini模型
見:https://linux.do/t/topic/291469?u=joegodwanggod
应用场景
聯網搜索

@123hi123 123hi123 added the enhancement New feature or request label Dec 12, 2024
@Calcium-Ion
Copy link
Owner

Calcium-Ion commented Dec 12, 2024

目前暂时不知道该怎么支持,OpenAI的格式里没这个东西

@Calcium-Ion
Copy link
Owner

目前兼容了OpenAI格式下设置tools的调用方法

{
    "messages": [
        {
            "role": "user",
            "content": "今天北京天气如何"
        }
    ],
    "model": "gemini-2.0-flash-exp",
    "stream": false,
    "tools": [
        {
            "type": "function",
            "function": {
                "name": "googleSearch"
            }
        }
    ]
}

@Calcium-Ion Calcium-Ion pinned this issue Dec 12, 2024
@Calcium-Ion Calcium-Ion changed the title 支持Gemini 聯網搜索調用 包含gcp 支持Gemini 聯網搜索調用 Dec 12, 2024
@123hi123
Copy link
Author

好強 作者加油

@sabibi12
Copy link

现在测试这个功能发现开启tool后不能传图

@Calcium-Ion

This comment has been minimized.

@sabibi12

This comment has been minimized.

@Calcium-Ion

This comment has been minimized.

@Calcium-Ion
Copy link
Owner

现在测试这个功能发现开启tool后不能传图

看了一下官方说明开启搜索是仅支持文本的哈

@sabibi12
Copy link

现在测试这个功能发现开启tool后不能传图

看了一下官方说明开启搜索是仅支持文本的哈

好的,不过我在ai studio 上测试了能够同时传图和搜索,等后续跟进

@Calcium-Ion
Copy link
Owner

现在测试这个功能发现开启tool后不能传图

看了一下官方说明开启搜索是仅支持文本的哈

好的,不过我在ai studio 上测试了能够同时传图和搜索,等后续跟进

等gemini的api支持了就行,现在的代码没问题

@123hi123
Copy link
Author

作者有想到甚麼方法可以在owu當中加入tools嗎

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

No branches or pull requests

3 participants