NarratoAI/app/test/test_gemini.py
linyq 9c58102558 feat(review_settings): 添加视频剪辑模式选择功能优化默认提示词
- 在视频审查面板中添加剪辑模式选择选项
- 提供三种剪辑模式:仅保留音频、仅保留原声、保留原声和音频- 在 UI 中添加相应的提示信息
2024-11-22 15:39:10 +08:00

16 lines
501 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="AIzaSyBnKPxuPuBpZKGKuR_Sb9CwCIJYJF-N8DM")
# genai.configure(api_key="AIzaSyCm33aPRAZ_P29gTALv0tRerMJwY3zJrq0")
model = genai.GenerativeModel("gemini-1.5-pro")
for i in range(50):
response = model.generate_content("直接回复我文本'当前网络可用'")
print(i, response.text)