forked from devopshobbies/devops-gpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelm.py
More file actions
15 lines (15 loc) · 735 Bytes
/
Copy pathhelm.py
File metadata and controls
15 lines (15 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from app.app_instance import app
from app.gpt_services import gpt_service
from app.services import (write_installation,edit_directory_generator,execute_pythonfile)
from app.models import (HelmTemplateGeneration,Output)
from app.prompt_generators import (helm_template_generator)
import os
@app.post("/api/Helm-template/")
async def Helm_template_generation(request:HelmTemplateGeneration) -> Output:
if os.environ.get("TEST"):
return Output(output='output')
generated_prompt = helm_template_generator(request)
output = gpt_service(generated_prompt)
edit_directory_generator("helm_generator",output)
execute_pythonfile("MyHelm","helm_generator")
return Output(output='output')