Conversation
|
@lyft/network-team @rshriram |
4049585 to
35dc4a4
Compare
mattklein123
left a comment
There was a problem hiding this comment.
so awesome, just a small comment.
| const Json::ObjectPtr& abort = json_config.getObject("abort"); | ||
| json_config.validateSchema(Json::Schema::FAULT_HTTP_FILTER_SCHEMA); | ||
|
|
||
| const Json::ObjectPtr& abort = json_config.getObject("abort", true); |
There was a problem hiding this comment.
no reference here and next line (you are storing reference to temporary).
| const std::string& stats_prefix, | ||
| Server::Instance& server) { | ||
| if (type != HttpFilterType::Decoder || name != "buffer") { | ||
| return nullptr; |
There was a problem hiding this comment.
silly question: is the name check necessary here? Is there a possibility that the code that instantiates filters calls this factory method without matching the name?
There was a problem hiding this comment.
If so, shouldn't every filter be checking the name?
There was a problem hiding this comment.
actually, I take it back.. Everything is checking for the name.
| const std::string& stat_prefix, | ||
| Server::Instance& server) { | ||
| if (type != HttpFilterType::Both || name != "http_dynamo_filter") { | ||
| return nullptr; |
There was a problem hiding this comment.
If this pattern is needed, then I think fault and rate limit are missing the name checks.
There was a problem hiding this comment.
They are checked in config/http/(fault.cc/ratelimit.cc)
envoyproxy#405) non-reentrant). Signed-off-by: John Plevyak <jplevyak@gmail.com>
envoyproxy#405) non-reentrant). Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Move proxy_on_delete() call out of proxy_done() call from the VM (make (envoyproxy#405) non-reentrant). Signed-off-by: John Plevyak <jplevyak@gmail.com> * Simplify Wasm shutdown. (envoyproxy#410) Signed-off-by: John Plevyak <jplevyak@gmail.com> Co-authored-by: John Plevyak <jplevyak@gmail.com>
…ward_proxy_filter.rst (envoyproxy#405) * feat(dynamic_forward_proxy_filter): first draft * fix(dynamic_forward_proxy_filter): revision * fix(dynamic_forward_proxy_filter): compile problem * fix(dynamic_forward_proxy_filter): compile problem * fix(dynamic_forward_proxy_filter): improve coherence Co-authored-by: 李景炤 <kinso@lijingzhaos-MacBook-Pro.local>
Description: previously onError was not delivering the callback all the way to the platform. This PR wires functionality all the way and also converts envoy_error to EnvoyError. Risk Level: med - implementing core functionality Testing: built locally Signed-off-by: Jose Nino <jnino@lyft.com> Signed-off-by: JP Simard <jp@jpsim.com>
Description: previously onError was not delivering the callback all the way to the platform. This PR wires functionality all the way and also converts envoy_error to EnvoyError. Risk Level: med - implementing core functionality Testing: built locally Signed-off-by: Jose Nino <jnino@lyft.com> Signed-off-by: JP Simard <jp@jpsim.com>
**Commit Message** This fixes the OpenAI chat completion response choices conversion, there could only be one choice as AWS Bedrock does not support N choices. The previous code translated multiple content blocks to multiple choices which was wrong and for converse response there could be only one text block, however there can be multiple content blocks for text and toolUse. **Related Issues/PRs (if applicable)** Fixes #405 **Special notes for reviewers (if applicable)** Tested with the real AWS Bedrock with converse response including both text and toolUse content blocks. This is an example of converse response and the previous code made wrong assumption that it is in the same content block: ```json { "message": { "role": "assistant", "content": [ { "text": "To get the weather information for Queens, NY, I'll need to use the get_weather function. Let me fetch that information for you." }, { "toolUse": { "toolUseId": "tooluse_qYVb7Vo1QpWkmbgCm1VTZg", "name": "get_weather", "input": { "city": "Queens", "state": "NY" } } } ] } } ``` --------- Signed-off-by: Dan Sun <dsun20@bloomberg.net>
-Breaks http configs into h/cc
-Increases tests coverage for http configs by adding server/config/http/config_test.cc
-Adds schema validation for applicable HTTP filters.
-Updates Fault Filter documentation to specify at least abort or delay must be specified in the config. The implementation has been updated to reflect expected behaviour.
-Added empty() method on JSON Objects.