diff --git a/crates/prompt_gateway/src/stream_context.rs b/crates/prompt_gateway/src/stream_context.rs index fc35877f..678eedab 100644 --- a/crates/prompt_gateway/src/stream_context.rs +++ b/crates/prompt_gateway/src/stream_context.rs @@ -338,8 +338,7 @@ impl StreamContext { ARCH_INTERNAL_CLUSTER_NAME, &path, headers, - // Some(tool_params_json_str.as_bytes()), - None, + Some(tool_params_json_str.as_bytes()), vec![], Duration::from_secs(5), ); diff --git a/demos/acm_k8s/arch_config_openshift.yaml b/demos/acm_k8s/arch_config_openshift.yaml index 45fd9ae1..53352db4 100644 --- a/demos/acm_k8s/arch_config_openshift.yaml +++ b/demos/acm_k8s/arch_config_openshift.yaml @@ -15,6 +15,10 @@ endpoints: endpoint: host.docker.internal:8001 connect_timeout: 0.005s http_host: localhost + local_proxy_service: + endpoint: host.docker.internal:8002 + connect_timeout: 0.005s + http_host: localhost llm_providers: - name: gpt-4o-mini @@ -72,9 +76,6 @@ prompt_targets: http_method: GET name: acm_service path: /apis/policy.open-cluster-management.io/v1/namespaces/default/policies/{policy_name} - http_headers: - accept: application/yaml - content-type: application/yaml parameters: - name: policy_name in_path: true @@ -84,6 +85,28 @@ prompt_targets: system_prompt: | You are a helpful assistant. You are given response in json. Show name of the policies and key details in readable format. + - name: createPolicy + description: Creates a policy in the default namespace + endpoint: + http_method: POST + name: local_proxy_service + path: /create_policy + parameters: + - name: policy_name + description: The name of the policy to retrieve + required: true + type: str + - name: remediationAction + description: The remediation action for the policy + required: true + type: str + - name: namespace + description: The namespace for the policy + required: true + type: str + system_prompt: | + You are a helpful assistant. You are given response in json for create policy operation. Show the result of the operation that is readable. + - name: default_target default: true description: This is the default target for all unmatched prompts. diff --git a/demos/acm_k8s/docker-compose_openshift.yaml b/demos/acm_k8s/docker-compose_openshift.yaml index bba9ff00..86d95364 100644 --- a/demos/acm_k8s/docker-compose_openshift.yaml +++ b/demos/acm_k8s/docker-compose_openshift.yaml @@ -12,6 +12,16 @@ services: volumes: - ./arch_config_openshift.yaml:/app/arch_config.yaml + acm_service_put_policy: + build: + context: acm_service_put_policy + ports: + - "8002:80" + extra_hosts: + - "host.docker.internal:host-gateway" + environment: + - ACM_SERVER=http://host.docker.internal:8001 + jaeger: build: context: ../shared/jaeger