mirror of
https://github.com/linyqh/NarratoAI.git
synced 2025-12-14 04:52:50 +00:00
- 移除了 script_generator.py 中的多余参数 'enable_search' - 删除了 webui.sh 脚本,可能是因为不再需要或已改为其他方式实现 - 新增了 test_gemini.py 测试文件,用于测试 Gemini 模型
12 lines
378 B
Python
12 lines
378 B
Python
import google.generativeai as genai
|
|
from app.config import config
|
|
import os
|
|
|
|
os.environ["HTTP_PROXY"] = config.proxy.get("http")
|
|
os.environ["HTTPS_PROXY"] = config.proxy.get("https")
|
|
|
|
genai.configure(api_key=config.app.get("vision_gemini_api_key"))
|
|
model = genai.GenerativeModel("gemini-1.5-flash")
|
|
response = model.generate_content("Explain how AI works")
|
|
print(response.text)
|