diff --git a/plugins/wasm-cpp/extensions/request_block/plugin.cc b/plugins/wasm-cpp/extensions/request_block/plugin.cc index ce6492379..c187ceae5 100644 --- a/plugins/wasm-cpp/extensions/request_block/plugin.cc +++ b/plugins/wasm-cpp/extensions/request_block/plugin.cc @@ -168,7 +168,7 @@ bool PluginRootContext::parsePluginConfig(const json& configuration, LOG_WARN("failed to parse configuration for block_bodys."); return false; } - // compatiable + // compatible if (!JsonArrayIterate( configuration, "block_bodies", [&](const json& item) -> bool { auto body = JsonValueAs(item); diff --git a/plugins/wasm-go/extensions/ai-proxy/main.go b/plugins/wasm-go/extensions/ai-proxy/main.go index 57c29b50f..6f05120b9 100644 --- a/plugins/wasm-go/extensions/ai-proxy/main.go +++ b/plugins/wasm-go/extensions/ai-proxy/main.go @@ -138,11 +138,11 @@ func parseOverrideRuleConfig(json gjson.Result, global config.PluginConfig, plug pluginConfig.FromJson(json) if err := pluginConfig.Validate(); err != nil { - log.Errorf("overriden rule config is invalid: %v", err) + log.Errorf("overridden rule config is invalid: %v", err) return err } if err := pluginConfig.Complete(); err != nil { - log.Errorf("failed to apply overriden rule config: %v", err) + log.Errorf("failed to apply overridden rule config: %v", err) return err } diff --git a/plugins/wasm-go/extensions/ai-proxy/provider/provider.go b/plugins/wasm-go/extensions/ai-proxy/provider/provider.go index 56301d500..e530901f2 100644 --- a/plugins/wasm-go/extensions/ai-proxy/provider/provider.go +++ b/plugins/wasm-go/extensions/ai-proxy/provider/provider.go @@ -577,7 +577,7 @@ func (c *ProviderConfig) FromJson(json gjson.Result) { if compatible := json.Get("qwenEnableCompatible"); compatible.Exists() { c.qwenEnableCompatible = compatible.Bool() } else { - // Default use official compatiable mode + // Default use official compatible mode c.qwenEnableCompatible = true } c.qwenDomain = json.Get("qwenDomain").String() diff --git a/plugins/wasm-go/extensions/ai-search/main.go b/plugins/wasm-go/extensions/ai-search/main.go index b8b730d05..76cf8f928 100644 --- a/plugins/wasm-go/extensions/ai-search/main.go +++ b/plugins/wasm-go/extensions/ai-search/main.go @@ -201,7 +201,7 @@ func parseConfig(json gjson.Result, config *Config) error { config.engine = append(config.engine, searchEngine) internetExists = true default: - return fmt.Errorf("unkown search engine:%s", e.Get("type").String()) + return fmt.Errorf("unknown search engine:%s", e.Get("type").String()) } } searchRewriteJson := json.Get("searchRewrite") @@ -271,7 +271,7 @@ func parseConfig(json gjson.Result, config *Config) error { config.searchRewrite = searchRewrite } if len(config.engine) == 0 { - return fmt.Errorf("no avaliable search engine found") + return fmt.Errorf("no available search engine found") } log.Debugf("ai search enabled, config: %#v", config) return nil @@ -529,7 +529,7 @@ func executeSearch(ctx wrapper.HttpContext, config Config, queryIndex int, body if err != nil { log.Errorf("modify request message content failed, err:%v, body:%s", err, body) } else { - log.Debugf("modifeid body:%s", modifiedBody) + log.Debugf("modified body:%s", modifiedBody) proxywasm.ReplaceHttpRequestBody(modifiedBody) if config.needReference { ctx.SetContext("References", strings.Join(formattedReferences, "\n\n")) diff --git a/plugins/wasm-go/extensions/ai-security-guard/README.md b/plugins/wasm-go/extensions/ai-security-guard/README.md index 02fa6a25e..120dffd6f 100644 --- a/plugins/wasm-go/extensions/ai-security-guard/README.md +++ b/plugins/wasm-go/extensions/ai-security-guard/README.md @@ -15,12 +15,12 @@ description: 阿里云内容安全检测 ## 配置说明 | Name | Type | Requirement | Default | Description | | ------------ | ------------ | ------------ | ------------ | ------------ | -| `serviceName` | string | requried | - | 服务名 | -| `servicePort` | string | requried | - | 服务端口 | -| `serviceHost` | string | requried | - | 阿里云内容安全endpoint的域名 | -| `accessKey` | string | requried | - | 阿里云AK | -| `secretKey` | string | requried | - | 阿里云SK | -| `action` | string | requried | - | 阿里云ai安全业务接口 | +| `serviceName` | string | required | - | 服务名 | +| `servicePort` | string | required | - | 服务端口 | +| `serviceHost` | string | required | - | 阿里云内容安全endpoint的域名 | +| `accessKey` | string | required | - | 阿里云AK | +| `secretKey` | string | required | - | 阿里云SK | +| `action` | string | required | - | 阿里云ai安全业务接口 | | `securityToken` | string | optional | - | 阿里云安全令牌(用于临时凭证) | | `checkRequest` | bool | optional | false | 检查提问内容是否合规 | | `checkResponse` | bool | optional | false | 检查大模型的回答内容是否合规,生效时会使流式响应变为非流式 | diff --git a/plugins/wasm-go/extensions/ai-security-guard/README_EN.md b/plugins/wasm-go/extensions/ai-security-guard/README_EN.md index 0127c55a0..ae62e8237 100644 --- a/plugins/wasm-go/extensions/ai-security-guard/README_EN.md +++ b/plugins/wasm-go/extensions/ai-security-guard/README_EN.md @@ -16,12 +16,12 @@ Plugin Priority: `300` ## Configuration | Name | Type | Requirement | Default | Description | | ------------ | ------------ | ------------ | ------------ | ------------ | -| `serviceName` | string | requried | - | service name | -| `servicePort` | string | requried | - | service port | -| `serviceHost` | string | requried | - | Host of Aliyun content security service endpoint | -| `accessKey` | string | requried | - | Aliyun accesskey | -| `secretKey` | string | requried | - | Aliyun secretkey | -| `action` | string | requried | - | Aliyun ai guardrails business interface | +| `serviceName` | string | required | - | service name | +| `servicePort` | string | required | - | service port | +| `serviceHost` | string | required | - | Host of Aliyun content security service endpoint | +| `accessKey` | string | required | - | Aliyun accesskey | +| `secretKey` | string | required | - | Aliyun secretkey | +| `action` | string | required | - | Aliyun ai guardrails business interface | | `checkRequest` | bool | optional | false | check if the input is legal | | `checkResponse` | bool | optional | false | check if the output is legal | | `requestCheckService` | string | optional | llm_query_moderation | Aliyun yundun service name for input check | diff --git a/plugins/wasm-go/extensions/ai-transformer/README.md b/plugins/wasm-go/extensions/ai-transformer/README.md index 28dd8abdd..8cd63b67b 100644 --- a/plugins/wasm-go/extensions/ai-transformer/README.md +++ b/plugins/wasm-go/extensions/ai-transformer/README.md @@ -16,13 +16,13 @@ AI 请求响应转换插件,通过LLM对请求/响应的header以及body进行 ## 配置说明 | Name | Type | Requirement | Default | Description | | :- | :- | :- | :- | :- | -| request.enable | bool | requried | - | 是否在request阶段开启转换 | -| request.prompt | string | requried | - | request阶段转换使用的prompt | -| response.enable | string | requried | - | 是否在response阶段开启转换 | -| response.prompt | string | requried | - | response阶段转换使用的prompt | -| provider.serviceName | string | requried | - | DNS类型的服务名,目前仅支持通义千问 | -| provider.domain | string | requried | - | LLM服务域名 | -| provider.apiKey | string | requried | - | 阿里云dashscope服务的API Key | +| request.enable | bool | required | - | 是否在request阶段开启转换 | +| request.prompt | string | required | - | request阶段转换使用的prompt | +| response.enable | string | required | - | 是否在response阶段开启转换 | +| response.prompt | string | required | - | response阶段转换使用的prompt | +| provider.serviceName | string | required | - | DNS类型的服务名,目前仅支持通义千问 | +| provider.domain | string | required | - | LLM服务域名 | +| provider.apiKey | string | required | - | 阿里云dashscope服务的API Key | ## 配置示例 ```yaml diff --git a/test/e2e/conformance/utils/envoy/envoy.go b/test/e2e/conformance/utils/envoy/envoy.go index 47459efdc..fad425ef1 100644 --- a/test/e2e/conformance/utils/envoy/envoy.go +++ b/test/e2e/conformance/utils/envoy/envoy.go @@ -193,7 +193,7 @@ func awaitConvergence(t *testing.T, threshold int, maxTimeToConsistency time.Dur select { // Capture the overall timeout case <-to: - t.Fatalf("timeout while waiting after %d attempts, %d/%d sucessess", attempts, successes, threshold) + t.Fatalf("timeout while waiting after %d attempts, %d/%d successes", attempts, successes, threshold) // And the per-try delay case <-time.After(delay): } diff --git a/test/e2e/conformance/utils/http/http.go b/test/e2e/conformance/utils/http/http.go index 624b7bed8..765d31779 100644 --- a/test/e2e/conformance/utils/http/http.go +++ b/test/e2e/conformance/utils/http/http.go @@ -288,7 +288,7 @@ func awaitConvergence(t *testing.T, threshold int, maxTimeToConsistency time.Dur select { // Capture the overall timeout case <-to: - t.Fatalf("timeout while waiting after %d attempts, %d/%d sucessess", attempts, successes, threshold) + t.Fatalf("timeout while waiting after %d attempts, %d/%d successes", attempts, successes, threshold) // And the per-try delay case <-time.After(delay): }