@Test Could you add an issue at Pyrit github repo? Seems like an error from AzureOpenAIChatTarget while accessing your endpoint.
You might want to check using CURL if the endpoint is directly accessible and then print the values from above code before passing to the target for debugging. If the values are correct and it still fails, then there might be issue with the connect setup by pyrit. Thanks!!
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.