From 3f4193116121e03d6f4e74e15dcd0a54d010ca51 Mon Sep 17 00:00:00 2001 From: VitalJoseph Date: Tue, 12 Dec 2023 15:53:00 -0500 Subject: [PATCH] fixed some mypy errors --- chasten/createchecks.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/chasten/createchecks.py b/chasten/createchecks.py index f4235f6..f9f2039 100644 --- a/chasten/createchecks.py +++ b/chasten/createchecks.py @@ -1,5 +1,6 @@ from pathlib import Path - +import openai +from cryptography.fernet import Fernet genscript = """ @@ -95,7 +96,7 @@ def generate_yaml_config(file: Path, user_api_key, user_input: str) -> str: + user_input ] - response = openai.ChatCompletion.create( + response = openai.ChatCompletion.create( # type: ignore model="gpt-3.5-turbo", messages=[ { @@ -113,5 +114,5 @@ def generate_yaml_config(file: Path, user_api_key, user_input: str) -> str: return generated_yaml - except openai.error.OpenAIError: + except openai.error.OpenAIError: # type: ignore return "[red][Error][/red] There was an issue with the API key. Make sure you input your API key correctly."