Skip to content

Commit

Permalink
1. add changelog
Browse files Browse the repository at this point in the history
2. remain completions of anthropic only in the unsupported api
  • Loading branch information
liverpool8056 committed Apr 9, 2024
1 parent f42525e commit e4f69d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions changelog/unreleased/kong/analytics-for-anthropic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
message: |
**AI-proxy-plugin**: Fix the bug that the route_type `/llm/v1/chat` does not include the analytics in the responses.
scope: Plugin
type: bug_fix
3 changes: 1 addition & 2 deletions kong/llm/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ local logging_schema = {
}

local UNSUPPORTED_LOG_STATISTICS = {
["llm/v1/completions"] = { "anthropic", "azure", "cohere", "llama2", },
["llm/v1/chat"] = { "cohere", "llama2", }
["llm/v1/completions"] = { "anthropic" },
}

_M.config_schema = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ for _, strategy in helpers.all_strategies() do if strategy ~= "cassandra" then
-- check this is in the 'kong' response format
assert.equals(json.error.message, "request format not recognised")
end)
end)

describe("anthropic llm/v1/completions", function()
it("good request", function()
Expand Down Expand Up @@ -521,6 +522,5 @@ for _, strategy in helpers.all_strategies() do if strategy ~= "cassandra" then
end)
end)
end)
end)

end end

0 comments on commit e4f69d9

Please sign in to comment.