零一万物 Yi
可用模型清单:https://platform.lingyiwanwu.com/docs#%E6%A8%A1%E5%9E%8B%E4%B8%8E%E8%AE%A1%E8%B4%B9
import Agently
agent = (
Agently.create_agent()
.set_settings("current_model", "OAIClient")
.set_settings("model.OAIClient.auth", { "api_key": "<Your-API-Key>" })
# 使用Yi的API Base URL
.set_settings("model.OAIClient.url", "https://api.lingyiwanwu.com/v1")
# 如果需要切换模型,可参考模型清单:https://platform.lingyiwanwu.com/docs#%E6%A8%A1%E5%9E%8B%E4%B8%8E%E8%AE%A1%E8%B4%B9
.set_settings("model.OAIClient.options", { "model": "yi-medium" })
)