Stevessrowu函数: Gemini with search&code 中发帖

"""
title: Gemini 深度研究 API
author: OVINC CN (由 AI 为 Manifold 修改)
git_url: https://github.com/OVINC-CN/OpenWebUIPlugin.git
version: 0.3.0
licence: MIT
"""

import json
import logging
import time
import uuid
from typing import AsyncIterable, Optional, Callable, Awaitable, AsyncGenerator, List

import httpx
from pydantic import BaseModel, Field

# 假设 open_webui.env 存在,如果不存在,则使用标准的 logging 配置
try:
...