PraneshJs commited on
Commit
9d160b2
·
verified ·
1 Parent(s): 63cc413

added strip() to env

Browse files
Files changed (1) hide show
  1. azure_ai.py +4 -4
azure_ai.py CHANGED
@@ -5,9 +5,9 @@ from openai import AzureOpenAI
5
  load_dotenv()
6
 
7
  client = AzureOpenAI(
8
- api_version="2024-12-01-preview",
9
- azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"),
10
- api_key=os.getenv("AZURE_OPENAI_KEY")
11
  )
12
 
13
  def enhance_with_ai(repo_info):
@@ -29,7 +29,7 @@ def enhance_with_ai(repo_info):
29
  """
30
 
31
  response = client.chat.completions.create(
32
- model=os.getenv("AZURE_DEPLOYMENT_NAME"),
33
  messages=[
34
  {"role": "system", "content": "You are a helpful assistant that creates GitHub READMEs. You must follow the provided structure and include all necessary sections. Use necessary emojies and markdown formatting."},
35
  {"role": "user", "content": prompt}
 
5
  load_dotenv()
6
 
7
  client = AzureOpenAI(
8
+ api_version="2025-01-01-preview",
9
+ azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT").strip(),
10
+ api_key=os.getenv("AZURE_OPENAI_KEY").strip()
11
  )
12
 
13
  def enhance_with_ai(repo_info):
 
29
  """
30
 
31
  response = client.chat.completions.create(
32
+ model=os.getenv("AZURE_DEPLOYMENT_NAME").strip(),
33
  messages=[
34
  {"role": "system", "content": "You are a helpful assistant that creates GitHub READMEs. You must follow the provided structure and include all necessary sections. Use necessary emojies and markdown formatting."},
35
  {"role": "user", "content": prompt}