feat: add provider ai pollinations (#667)

* feat: add provider ai pollinations

* update: enter line

---------

Co-authored-by: Diep Do <diepchiaser@gmail.com>
This commit is contained in:
diepdo1810
2025-05-13 09:48:52 +07:00
committed by GitHub
parent 7bee963a18
commit 95922908ce
8 changed files with 89 additions and 34 deletions

View File

@@ -237,6 +237,7 @@ if not config.app.get("hide_config", False):
"OneAPI",
"Cloudflare",
"ERNIE",
"Pollinations",
]
saved_llm_provider = config.app.get("llm_provider", "OpenAI").lower()
saved_llm_provider_index = 0
@@ -381,6 +382,17 @@ if not config.app.get("hide_config", False):
- **Base Url**: 填写 **请求地址** [点击查看文档](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/jlil56u11#%E8%AF%B7%E6%B1%82%E8%AF%B4%E6%98%8E)
"""
if llm_provider == "pollinations":
if not llm_model_name:
llm_model_name = "default"
with llm_helper:
tips = """
##### Pollinations AI Configuration
- **API Key**: Optional - Leave empty for public access
- **Base Url**: Default is https://text.pollinations.ai/openai
- **Model Name**: Use 'openai-fast' or specify a model name
"""
if tips and config.ui["language"] == "zh":
st.warning(
"中国用户建议使用 **DeepSeek** 或 **Moonshot** 作为大模型提供商\n- 国内可直接访问不需要VPN \n- 注册就送额度,基本够用"