diff --git a/all-in-one/scripts/config-template/ai-gateway.sh b/all-in-one/scripts/config-template/ai-gateway.sh index 1ceae9d..d80fcf8 100644 --- a/all-in-one/scripts/config-template/ai-gateway.sh +++ b/all-in-one/scripts/config-template/ai-gateway.sh @@ -137,29 +137,6 @@ spec: priority: 100 url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/ai-proxy:2.0.0" >"$WASM_PLUGIN_CONFIG_FOLDER/ai-proxy.internal.yaml" -AI_STATISTICS_MATCH_RULES="" -for i in "${GENERATED_INGRESSES[@]}" -do - AI_STATISTICS_MATCH_RULES="$AI_STATISTICS_MATCH_RULES - - config: - attributes: - - apply_to_log: true - key: question - value: messages.@reverse.0.content - value_source: request_body - - apply_to_log: true - key: answer - rule: append - value: choices.0.delta.content - value_source: response_streaming_body - - apply_to_log: true - key: answer - value: choices.0.message.content - value_source: response_body - configDisable: false - ingress: - - $i" -done echo -e "\ apiVersion: extensions.higress.io/v1alpha1 kind: WasmPlugin @@ -176,9 +153,10 @@ metadata: namespace: higress-system resourceVersion: \"1\" spec: - defaultConfigDisable: true + defaultConfig: + use_default_attributes: true + defaultConfigDisable: false failStrategy: FAIL_OPEN - matchRules:$AI_STATISTICS_MATCH_RULES phase: UNSPECIFIED_PHASE priority: 900 url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/ai-statistics:2.0.0" >"$WASM_PLUGIN_CONFIG_FOLDER/ai-statistics-1.0.0.yaml"