plano/arch
Salman Paracha 0e5ea3d6db
Salmanap/fix config generator (#124)
* fixed environment variables issue with build. Now llm provider access keys are being written correctly

* fixed and verified that keys are being properly set when archgw is booted up

* removing leaf reference to a staged config file. not needed anymore

* minor fixes to get the build in more stable state

* minor fixes based on feedback

---------

Co-authored-by: Salman Paracha <salmanparacha@MacBook-Pro-261.local>
2024-10-05 10:49:47 -07:00
..
grafana rename envoyfilter => arch (#91) 2024-09-27 16:41:39 -07:00
prometheus rename envoyfilter => arch (#91) 2024-09-27 16:41:39 -07:00
src Clean up Embeddings Store (#121) 2024-10-04 19:33:52 -07:00
tests Clean up Embeddings Store (#121) 2024-10-04 19:33:52 -07:00
tools Salmanap/fix config generator (#124) 2024-10-05 10:49:47 -07:00
arch_config_schema.yaml Add the ability to use LLM Providers from the Arch config (#112) 2024-10-03 10:57:01 -07:00
build_filter.sh rename envoyfilter => arch (#91) 2024-09-27 16:41:39 -07:00
Cargo.lock Add the ability to use LLM Providers from the Arch config (#112) 2024-10-03 10:57:01 -07:00
Cargo.toml Add the ability to use LLM Providers from the Arch config (#112) 2024-10-03 10:57:01 -07:00
docker-compose.yaml Salmanap/fix config generator (#124) 2024-10-05 10:49:47 -07:00
Dockerfile archgw cli (#117) 2024-10-03 18:21:27 -07:00
download_mistral_7b.sh rename envoyfilter => arch (#91) 2024-09-27 16:41:39 -07:00
envoy.template.yaml archgw cli (#117) 2024-10-03 18:21:27 -07:00
README.md rename envoyfilter => arch (#91) 2024-09-27 16:41:39 -07:00
requirements.txt simplify developer getting started experience (#102) 2024-10-01 10:02:23 -07:00
stage.env Salmanap/fix config generator (#124) 2024-10-05 10:49:47 -07:00

Envoy filter code for gateway

Add toolchain

$ rustup target add wasm32-wasi

Building

$ cargo build --target wasm32-wasi --release

Testing

$ cargo test

Using in Envoy

This example can be run with docker compose and has a matching Envoy configuration.

$ docker compose up

Examples

Direct response.

Send HTTP request to localhost:10000/hello:

$ curl localhost:10000/hello

Expected response:

HTTP/1.1 200 OK
content-length: 40
content-type: text/plain
custom-header: katanemo filter
date: Wed, 10 Jul 2024 16:59:43 GMT
server: envoy

Inline call.

Send HTTP request to localhost:10000/inline:

$ curl localhost:10000/hello
{
  "headers": {
    "Accept": "*/*",
    "Host": "localhost",
    "User-Agent": "curl/7.81.0",
    "X-Amzn-Trace-Id": "Root=1-637c4767-6e31776a0b407a0219b5b570",
    "X-Envoy-Expected-Rq-Timeout-Ms": "15000"
  }
}

Expected Envoy logs:

[...] wasm log http_auth_random: Access granted.