Skip to content

Commit

Permalink
Translator.py now calls env API key
Browse files Browse the repository at this point in the history
  • Loading branch information
emshyu authored Nov 16, 2024
1 parent 66d634b commit 6a7177d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# load_dotenv()

client = AzureOpenAI(
api_key="", # Replace with your Azure API key
api_key=os.getenv("API_KEY"), # Replace with your Azure API key
api_version="2024-02-15-preview",
azure_endpoint="https://p4-tinv1.openai.azure.com/" # Replace with your Azure endpoint
)
Expand Down Expand Up @@ -86,4 +86,4 @@ def query_llm_robust(post: str) -> tuple[bool, str]:
# elif translation_language is not None and translation_language != "English":
# return (False, "Sorry, we are unable to provide an English Translation.")
# else:
# return (is_english, translation)
# return (is_english, translation)

0 comments on commit 6a7177d

Please sign in to comment.