From 658c3cb49979d4a53f2de8234e6c5f18585660d7 Mon Sep 17 00:00:00 2001 From: Adil Hafeez Date: Mon, 18 Nov 2024 15:46:57 -0800 Subject: [PATCH] improve move --- arch/envoy.template.yaml | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/arch/envoy.template.yaml b/arch/envoy.template.yaml index 59c2c77d..4ae2c00b 100644 --- a/arch/envoy.template.yaml +++ b/arch/envoy.template.yaml @@ -321,23 +321,6 @@ static_resources: service_name: llm_gateway random_sampling: value: {{ arch_tracing.random_sampling }} - custom_tags: - - tag: user_prompt - metadata: - kind: - request: {} - metadata_key: - key: llm_filter - path: - - key: user_prompt - - tag: time_to_first_token - metadata: - kind: - request: {} - metadata_key: - key: llm_filter - path: - - key: time_to_first_token {% endif %} stat_prefix: arch_listener_http codec_type: AUTO @@ -389,28 +372,6 @@ static_resources: "@type": type.googleapis.com/envoy.extensions.compression.gzip.compressor.v3.Gzip memory_level: 3 window_bits: 10 - - name: envoy.filters.http.lua - typed_config: - '@type': type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua - default_source_code: - inline_string: | - function envoy_on_response(response_handle) - - local user_message = response_handle:headers():get("x-user-message") - if user_message then - response_handle:logInfo("setting x-user-message") - response_handle:streamInfo():dynamicMetadata():set("llm_filter", "user_prompt", user_message) - response_handle:headers():remove("x-user-message") - end - - local time_to_first_token = response_handle:headers():get("x-time-to-first-token") - if time_to_first_token then - response_handle:logInfo("setting x-time-to-first-token") - response_handle:streamInfo():dynamicMetadata():set("llm_filter", "time_to_first_token", time_to_first_token) - response_handle:headers():remove("x-time-to-first-token") - end - - end - name: envoy.filters.http.wasm typed_config: "@type": type.googleapis.com/udpa.type.v1.TypedStruct