18ea3e0c8b6c41758dcda4003a16c51af3326a5a
- 添加组件加载成功日志记录 - 在加载脚本前输出调试信息 - 更新模块导入后的日志格式 - 优化组件实例获取流程 - 改进依赖脚本加载顺序 - 增加对模块类型判断的日志输出
Using the Gemini API in a Chrome Extension.
This sample demonstrates how to use the Gemini Cloud API in a Chrome Extension.
Overview
The extension provides a chat interface for the Gemini API. To learn more about the API head over to https://ai.google.dev/.
Running this extension
- Clone this repository.
- Download the Gemini API client by running:
npm install - Retrieve an API key and update functional-samples/ai.gemini-in-the-cloud/sidepanel/index.js (only for testing).
- Compile the JS bundle for the sidepanel implementation by running:
npm run build - Load this directory in Chrome as an unpacked extension.
- Click the extension icon.
- Interact with the prompt API in the sidebar.
Languages
TypeScript
98.9%
CSS
0.5%
JavaScript
0.4%
HTML
0.2%