mirror of
https://github.com/alibaba/higress.git
synced 2026-03-12 20:50:55 +08:00
Set the llm-api-key field of the ai-search plugin to optional (#1846)
This commit is contained in:
@@ -39,7 +39,7 @@ description: higress 支持通过集成搜索引擎(Google/Bing/Arxiv/Elastics
|
||||
|------|----------|----------|--------|------|
|
||||
| llmServiceName | string | 必填 | - | LLM服务名称 |
|
||||
| llmServicePort | number | 必填 | - | LLM服务端口 |
|
||||
| llmApiKey | string | 必填 | - | LLM服务API密钥 |
|
||||
| llmApiKey | string | 选填 | - | LLM服务API密钥 |
|
||||
| llmUrl | string | 必填 | - | LLM服务API地址 |
|
||||
| llmModelName | string | 必填 | - | LLM模型名称 |
|
||||
| timeoutMillisecond | number | 选填 | 30000 | API调用超时时间(毫秒) |
|
||||
|
||||
@@ -39,7 +39,7 @@ It is strongly recommended to enable this feature when using Arxiv or Elasticsea
|
||||
|------|-----------|-------------|---------------|-------------|
|
||||
| llmServiceName | string | Required | - | LLM service name |
|
||||
| llmServicePort | number | Required | - | LLM service port |
|
||||
| llmApiKey | string | Required | - | LLM service API key |
|
||||
| llmApiKey | string | Optional | - | LLM service API key |
|
||||
| llmUrl | string | Required | - | LLM service API URL |
|
||||
| llmModelName | string | Required | - | LLM model name |
|
||||
| timeoutMillisecond | number | Optional | 30000 | API call timeout (milliseconds) |
|
||||
|
||||
@@ -196,9 +196,6 @@ func parseConfig(json gjson.Result, config *Config, log wrapper.Log) error {
|
||||
Port: llmServicePort,
|
||||
})
|
||||
llmApiKey := searchRewriteJson.Get("llmApiKey").String()
|
||||
if llmApiKey == "" {
|
||||
return errors.New("llmApiKey not found")
|
||||
}
|
||||
searchRewrite.apiKey = llmApiKey
|
||||
llmUrl := searchRewriteJson.Get("llmUrl").String()
|
||||
if llmUrl == "" {
|
||||
|
||||
Reference in New Issue
Block a user