added strip() to env
Browse files- 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="
|
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}
|