联网搜索:补上从接口报错里拿到的开通地址
不带 sources 打 /api/v3/responses 会返回 404,里面直接给了开通地址: https://console.volcengine.com/common-buy/CC_content_plugin 比让人自己在控制台里翻准得多,记进 SEARCH_CONSOLE_URLS。 另外探明了联网搜索**只能走 Responses API**: chat/completions + tools:[{type:web_search}] → 400 missing tools.function (它把 tools 当函数调用解析,内置工具不认) bots/chat/completions + bot:[...] → 400 InvalidParameter responses + web_search → 403 AccessDenied(形状对,没开通) 这条结论决定了接入方式,写在注释里免得以后重复试。
This commit is contained in:
@@ -427,6 +427,18 @@ SPEECH_CONSOLE_URLS = {
|
|||||||
'agentPlan': 'https://ark.volcengine.com/region:cn-beijing/openManagement?advancedActiveKey=agentPlan',
|
'agentPlan': 'https://ark.volcengine.com/region:cn-beijing/openManagement?advancedActiveKey=agentPlan',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 联网搜索(豆包搜索)相关的地址。
|
||||||
|
#
|
||||||
|
# activate 那个是**从接口报错里拿到的**:不带 sources 打 /responses 会返回
|
||||||
|
# "Your account has not activated web search. You may activate it at
|
||||||
|
# https://console.volcengine.com/common-buy/CC_content_plugin"
|
||||||
|
# 比让用户自己在控制台里翻要准。manage 那个是「开通管理 → 应用组件库 → 豆包搜索」。
|
||||||
|
SEARCH_CONSOLE_URLS = {
|
||||||
|
'activate': 'https://console.volcengine.com/common-buy/CC_content_plugin',
|
||||||
|
'manage': 'https://console.volcengine.com/ark/region:cn-beijing/openManagement'
|
||||||
|
'?advancedActiveKey=component&tab=DoubaoSearch',
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# 默认值:Android 端 Kotlin 侧也用不到这个,但 Node/Python 必须一致
|
# 默认值:Android 端 Kotlin 侧也用不到这个,但 Node/Python 必须一致
|
||||||
DEFAULT_SPEECH = {
|
DEFAULT_SPEECH = {
|
||||||
|
|||||||
@@ -353,6 +353,20 @@ export const SPEECH_CONSOLE_URLS = {
|
|||||||
agentPlan: 'https://ark.volcengine.com/region:cn-beijing/openManagement?advancedActiveKey=agentPlan',
|
agentPlan: 'https://ark.volcengine.com/region:cn-beijing/openManagement?advancedActiveKey=agentPlan',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联网搜索(豆包搜索)相关的地址。
|
||||||
|
*
|
||||||
|
* activate 那个是**从接口报错里拿到的**:不带 sources 打 /responses 会返回
|
||||||
|
* "Your account has not activated web search. You may activate it at
|
||||||
|
* https://console.volcengine.com/common-buy/CC_content_plugin"
|
||||||
|
* 比让用户自己在控制台里翻要准。
|
||||||
|
*/
|
||||||
|
export const SEARCH_CONSOLE_URLS = {
|
||||||
|
activate: 'https://console.volcengine.com/common-buy/CC_content_plugin',
|
||||||
|
manage: 'https://console.volcengine.com/ark/region:cn-beijing/openManagement'
|
||||||
|
+ '?advancedActiveKey=component&tab=DoubaoSearch',
|
||||||
|
};
|
||||||
|
|
||||||
/** 掩码值:写设置时看到它表示"不改"(跟 apiKey 一个套路) */
|
/** 掩码值:写设置时看到它表示"不改"(跟 apiKey 一个套路) */
|
||||||
export const MASK = '••••••••';
|
export const MASK = '••••••••';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user