From 748f3612705297e55332e86d9ad218db359f69b0 Mon Sep 17 00:00:00 2001 From: Antoine Jacquemin Date: Thu, 25 Apr 2024 18:59:02 +0200 Subject: [PATCH] fix(ai-proxy) fix missing __key__ --- .../39-ai-request-transformer/01-transformer_spec.lua | 7 +++++++ .../40-ai-response-transformer/01-transformer_spec.lua | 1 + 2 files changed, 8 insertions(+) diff --git a/spec/03-plugins/39-ai-request-transformer/01-transformer_spec.lua b/spec/03-plugins/39-ai-request-transformer/01-transformer_spec.lua index 9ccd084d031f..51d84a439924 100644 --- a/spec/03-plugins/39-ai-request-transformer/01-transformer_spec.lua +++ b/spec/03-plugins/39-ai-request-transformer/01-transformer_spec.lua @@ -9,6 +9,7 @@ local PLUGIN_NAME = "ai-request-transformer" local FORMATS = { openai = { + __key__ = "ai-request-transformer", route_type = "llm/v1/chat", model = { name = "gpt-4", @@ -25,6 +26,7 @@ local FORMATS = { }, }, cohere = { + __key__ = "ai-request-transformer", route_type = "llm/v1/chat", model = { name = "command", @@ -41,6 +43,7 @@ local FORMATS = { }, }, anthropic = { + __key__ = "ai-request-transformer", route_type = "llm/v1/chat", model = { name = "claude-2.1", @@ -57,6 +60,7 @@ local FORMATS = { }, }, azure = { + __key__ = "ai-request-transformer", route_type = "llm/v1/chat", model = { name = "gpt-4", @@ -73,6 +77,7 @@ local FORMATS = { }, }, llama2 = { + __key__ = "ai-request-transformer", route_type = "llm/v1/chat", model = { name = "llama2", @@ -90,6 +95,7 @@ local FORMATS = { }, }, mistral = { + __key__ = "ai-request-transformer", route_type = "llm/v1/chat", model = { name = "mistral", @@ -110,6 +116,7 @@ local FORMATS = { local OPENAI_NOT_JSON = { route_type = "llm/v1/chat", + __key__ = "ai-request-transformer", model = { name = "gpt-4", provider = "openai", diff --git a/spec/03-plugins/40-ai-response-transformer/01-transformer_spec.lua b/spec/03-plugins/40-ai-response-transformer/01-transformer_spec.lua index 6409fbcafefa..d436ad536440 100644 --- a/spec/03-plugins/40-ai-response-transformer/01-transformer_spec.lua +++ b/spec/03-plugins/40-ai-response-transformer/01-transformer_spec.lua @@ -8,6 +8,7 @@ local MOCK_PORT = helpers.get_available_port() local PLUGIN_NAME = "ai-response-transformer" local OPENAI_INSTRUCTIONAL_RESPONSE = { + __key__ = "ai-response-transformer", route_type = "llm/v1/chat", model = { name = "gpt-4",