This commit is contained in:
Adil Hafeez 2025-06-05 20:17:07 -07:00
parent a5bdd9c04f
commit b1233da268
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
5 changed files with 7 additions and 2 deletions

View file

@ -801,7 +801,7 @@ static_resources:
- endpoint:
address:
socket_address:
address: 0.0.0.0
address: host.docker.internal
port_value: 9091
hostname: localhost

View file

@ -9,7 +9,7 @@ stdout_logfile_maxbytes=0
stderr_logfile_maxbytes=0
[program:envoy]
command=/bin/sh -c "python /app/config_generator.py && envsubst < /etc/envoy/envoy.yaml > /etc/envoy.env_sub.yaml && envoy -c /etc/envoy.env_sub.yaml 2>&1 | tee /var/log//envoy.log"
command=/bin/sh -c "python /app/config_generator.py && envsubst < /etc/envoy/envoy.yaml > /etc/envoy.env_sub.yaml && envoy -c /etc/envoy.env_sub.yaml --component-log-level wasm:debug 2>&1 | tee /var/log//envoy.log"
stdout_logfile=/dev/stdout
redirect_stderr=true
stdout_logfile_maxbytes=0

View file

@ -59,6 +59,7 @@ def docker_start_archgw_detached(
volume_mappings = [
f"{arch_config_file}:/app/arch_config.yaml:ro",
"/Users/adilhafeez/src/intelligent-prompt-gateway/crates/target/wasm32-wasip1/release:/etc/envoy/proxy-wasm-plugins:ro",
]
volume_mappings_args = [
item for volume in volume_mappings for item in ("-v", volume)

View file

@ -6,6 +6,7 @@ use std::fmt::Display;
pub mod providers;
pub enum Provider {
Arch,
Mistral,
Deepseek,
Groq,
@ -18,6 +19,7 @@ pub enum Provider {
impl From<&str> for Provider {
fn from(value: &str) -> Self {
match value.to_lowercase().as_str() {
"arch" => Provider::Arch,
"mistral" => Provider::Mistral,
"deepseek" => Provider::Deepseek,
"groq" => Provider::Groq,
@ -33,6 +35,7 @@ impl From<&str> for Provider {
impl Display for Provider {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Provider::Arch => write!(f, "Arch"),
Provider::Mistral => write!(f, "Mistral"),
Provider::Deepseek => write!(f, "Deepseek"),
Provider::Groq => write!(f, "Groq"),

View file

@ -139,6 +139,7 @@ impl ChatCompletionsRequest {
pub fn to_bytes(&self, provider: Provider) -> Result<Vec<u8>> {
match provider {
Provider::OpenAI
| Provider::Arch
| Provider::Deepseek
| Provider::Mistral
| Provider::Groq