mirror of
https://github.com/katanemo/plano.git
synced 2026-05-08 23:32:43 +02:00
Rename bolt_config to arch_config (#100)
Signed-off-by: José Ulises Niño Rivera <junr03@users.noreply.github.com>
This commit is contained in:
parent
2207021b9c
commit
b0ce5eca93
9 changed files with 64 additions and 65 deletions
|
|
@ -51,7 +51,7 @@ def generate_full_config(module):
|
|||
|
||||
|
||||
def replace_prompt_targets_in_config(file_path, new_prompt_targets):
|
||||
# Load the existing bolt_config.yaml
|
||||
# Load the existing arch_config.yaml
|
||||
with open(file_path, 'r') as file:
|
||||
config_data = yaml.safe_load(file)
|
||||
|
||||
|
|
@ -59,20 +59,20 @@ def replace_prompt_targets_in_config(file_path, new_prompt_targets):
|
|||
config_data['prompt_targets'] = new_prompt_targets
|
||||
|
||||
# Write the updated config back to the YAML file
|
||||
with open("bolt_config.yaml", 'w+') as file:
|
||||
with open("arch_config.yaml", 'w+') as file:
|
||||
yaml.dump(config_data, file, sort_keys=False)
|
||||
|
||||
print(f"Updated prompt_targets in bolt_config.yaml")
|
||||
print(f"Updated prompt_targets in arch_config.yaml")
|
||||
|
||||
|
||||
# Main execution
|
||||
if __name__ == "__main__":
|
||||
# Path to the existing bolt_config.yaml two directories up
|
||||
bolt_config_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../bolt_config.yaml'))
|
||||
# Path to the existing arch_config.yaml two directories up
|
||||
arch_config_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../arch_config.yaml'))
|
||||
|
||||
# Generate new prompt_targets from the functions module
|
||||
new_config = generate_full_config(functions)
|
||||
new_prompt_targets = new_config['prompt_targets']
|
||||
|
||||
# Replace the prompt_targets in the existing bolt_config.yaml
|
||||
replace_prompt_targets_in_config(bolt_config_path, new_prompt_targets)
|
||||
# Replace the prompt_targets in the existing arch_config.yaml
|
||||
replace_prompt_targets_in_config(arch_config_path, new_prompt_targets)
|
||||
|
|
|
|||
|
|
@ -5,15 +5,15 @@ services:
|
|||
context: ../../
|
||||
dockerfile: config_generator/Dockerfile
|
||||
volumes:
|
||||
- ../../envoyfilter/envoy.template.yaml:/usr/src/app/envoy.template.yaml
|
||||
- ./bolt_config.yaml:/usr/src/app/bolt_config.yaml
|
||||
- ../../arch/envoy.template.yaml:/usr/src/app/envoy.template.yaml
|
||||
- ./arch_config.yaml:/usr/src/app/arch_config.yaml
|
||||
- ./generated:/usr/src/app/out
|
||||
|
||||
bolt:
|
||||
arch:
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: envoyfilter/Dockerfile
|
||||
hostname: bolt
|
||||
dockerfile: arch/Dockerfile
|
||||
hostname: arch
|
||||
ports:
|
||||
- "10000:10000"
|
||||
- "19901:9901"
|
||||
|
|
@ -40,7 +40,7 @@ services:
|
|||
retries: 20
|
||||
volumes:
|
||||
- ~/.cache/huggingface:/root/.cache/huggingface
|
||||
- ./bolt_config.yaml:/root/bolt_config.yaml
|
||||
- ./arch_config.yaml:/root/arch_config.yaml
|
||||
|
||||
api_server:
|
||||
build:
|
||||
|
|
@ -109,7 +109,7 @@ services:
|
|||
- "18080:8080"
|
||||
environment:
|
||||
- OPENAI_API_KEY=${OPENAI_API_KEY:?error}
|
||||
- CHAT_COMPLETION_ENDPOINT=http://bolt:10000/v1
|
||||
- CHAT_COMPLETION_ENDPOINT=http://arch:10000/v1
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus
|
||||
|
|
|
|||
|
|
@ -18,6 +18,6 @@ scrape_configs:
|
|||
scheme: http
|
||||
static_configs:
|
||||
- targets:
|
||||
- bolt:9901
|
||||
- arch:9901
|
||||
params:
|
||||
format: ['prometheus']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue