概览:Firebase AI Logic 解决方案
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
使用 Firebase AI Logic 开发应用时,除了主要指南中介绍的基础知识之外,您可能还需要其他方面的知识。本部分中概述的解决方案针对更高级的使用场景提供了指导。
管理文件并在多模态请求中包含大型文件
通过使用 Cloud Storage for Firebase,您可以利用快速、安全且可扩缩的基础设施来存储和管理文件。此外,您还可以使用 Cloud Storage for Firebase 网址在多模态请求中包含更大的文件。
查看Cloud Storage for Firebase解决方案
保护您的应用免遭未经授权的客户端的攻击
对于移动应用和 Web 应用,您需要保护 Gemini API 和项目资源免遭未经授权的客户端滥用。您可以使用 Firebase App Check 验证所有 API 调用是否都来自您的实际应用。
请参阅 Firebase App Check 指南
动态且有条件地设置运行时配置
如果您想根据运行时条件设置配置,可以使用 Firebase Remote Config。一个示例是根据最终用户的位置更改运行 Vertex AI 服务和生成模型的位置。
查看Remote Config解决方案
无需发布应用的新版本即可更新应用中的值
如果您需要在不发布应用新版本的情况下动态更改应用中的值,可以使用 Firebase Remote Config。例如,在新模型版本发布时更新模型名称,或者更改系统指令、提示、安全设置或请求的输入。
查看Remote Config解决方案
我们正在积极开发其他解决方案和指南,请过段时间再返回查看!
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-19。
[null,null,["最后更新时间 (UTC):2025-08-19。"],[],[],null,["\u003cbr /\u003e\n\nAs you develop your app with Firebase AI Logic, you might want to go beyond\nthe basics discussed in the main guides. The solutions outlined in this section\noffer guidance on more advanced use cases.\n\nManage files and include large files in multimodal requests\n\nBy using Cloud Storage for Firebase, you can take advantage of a fast, secure,\nand scalable infrastructure for file storage and management. Plus, you can\ninclude larger files in your multimodal requests using a\nCloud Storage for Firebase URL.\n\n[See the Cloud Storage for Firebase solution](/docs/ai-logic/solutions/cloud-storage)\n\nProtect your app from unauthorized clients\n\nFor mobile and web apps, you need to protect the Gemini API and\nyour project resources from abuse by unauthorized clients.\nYou can use Firebase App Check to verify that all API calls are from your\nactual app.\n\n[See the Firebase App Check guide](/docs/ai-logic/app-check)\n\nDynamically and conditionally set runtime configurations\n\nIf you want to set configurations based on runtime conditions, you can use\n[Firebase Remote Config](/docs/remote-config). One example is changing the\nlocation where you run the Vertex AI service and generative model based on an\nend-user's location.\n\n[See the Remote Config solution](/docs/ai-logic/solutions/remote-config)\n\nUpdate values in your app without releasing a new version of your app\n\nIf you need to dynamically change values in your app without releasing a new\nversion of your app, you can use Firebase Remote Config. Examples include\nupdating the model name when a new model version is released or changing\nsystem instructions, prompts, safety settings, or input for a request.\n\n[See the Remote Config solution](/docs/ai-logic/solutions/remote-config)\n\n\u003cbr /\u003e\n\nWe're actively working on other solutions and guides, so check back soon!"]]