Skip to content

Commit ee191b9

Browse files
authored
Sample Code Syntax Error in azure-openai-graders.md
error on model_config. The way os.environ , wrong and inconsistant, lead to error. azure_endpoint=os.environ["AZURE_ENDPOINT"], api_key=os.environ.get["AZURE_API_KEY"], azure_deployment=os.environ.get("AZURE_DEPLOYMENT_NAME"), api_version=os.environ.get("AZURE_API_VERSION"), another one is presume run in notebook, it print out the result, but it's using the accessing the wrong variable. sim_grader_evaluation = evaluate( data=data_file_name, evaluators={ "similarity": sim_grader }, ) evaluation <== wrong --- lastly, the data.jsonl mentioned is a JSONL, but given example is not a JSONL format.
1 parent df5a255 commit ee191b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/ai-foundry/concepts/evaluation-evaluators/azure-openai-graders.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ from dotenv import load_dotenv
3131
load_dotenv()
3232

3333
model_config = AzureOpenAIModelConfiguration(
34-
azure_endpoint=os.environ["AZURE_ENDPOINT"],
35-
api_key=os.environ.get["AZURE_API_KEY"],
34+
azure_endpoint=os.environ.get("AZURE_ENDPOINT"),
35+
api_key=os.environ.get("AZURE_API_KEY"),
3636
azure_deployment=os.environ.get("AZURE_DEPLOYMENT_NAME"),
3737
api_version=os.environ.get("AZURE_API_VERSION"),
3838
)
@@ -193,7 +193,7 @@ sim_grader_evaluation = evaluate(
193193
"similarity": sim_grader
194194
},
195195
)
196-
evaluation
196+
sim_grader_evaluation
197197
```
198198

199199
### Text similarity output

0 commit comments

Comments
 (0)