Skip to content

Commit

Permalink
feat: user can specify filename
Browse files Browse the repository at this point in the history
  • Loading branch information
Poiuy7312 committed Oct 24, 2023
1 parent f537790 commit 08c38ed
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions chasten/createchecks.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def is_valid_api_key(api_key):
return False


def generate_yaml_config(user_api_key, user_input: str) -> str:
def generate_yaml_config(file: Path, user_api_key, user_input: str) -> str:
try:
openai.api_key = user_api_key

Expand All @@ -107,8 +107,6 @@ def generate_yaml_config(user_api_key, user_input: str) -> str:
)

generated_yaml = response.choices[0].message["content"].strip()

file = Path("generated_checks.yml")
file.touch()

with open("generated_checks.yml", "w") as f:
Expand Down

0 comments on commit 08c38ed

Please sign in to comment.