Skip to content

Commit c31596f

Browse files
authored
fix userConnection initialization issue (Azure#33140)
* fix userConnection initialization issue fix userConnection initialization issue when using callfack in simulator of gen SDK. * add config chk when converting cfg to openai model
1 parent 7188477 commit c31596f

File tree

1 file changed

+2
-0
lines changed
  • sdk/ai/azure-ai-generative/azure/ai/generative/synthetic/simulator/simulator

1 file changed

+2
-0
lines changed

sdk/ai/azure-ai-generative/azure/ai/generative/synthetic/simulator/simulator/simulator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ def __init__(
3838
self.simulate_callback = simulate_callback
3939

4040
def _to_openai_chat_completion_model(self, config: "AzureOpenAIModelConfiguration"):
41+
if config == None:
42+
return None
4143
token_manager = PlainTokenManager(
4244
openapi_key=config.api_key,
4345
auth_header="api-key",

0 commit comments

Comments
 (0)