expectedparrot / edsl

Design, conduct and analyze results of AI-powered surveys and experiments. Simulate social science and market research with large numbers of AI agents and LLMs.
https://docs.expectedparrot.com
MIT License
187 stars 19 forks source link

Trouble connecting to some Azure models #972

Closed johnjosephhorton closed 2 months ago

johnjosephhorton commented 2 months ago

@zer0dss I don't know if it's something more systematic, but I'm having trouble connecting to some Azure models:

from edsl import Question, Model, Scenario, Agent
q = Question('likert_five', question_name = """happy_raining""", question_text = """I'm only happy when it rains.""", question_options = ['Strongly disagree', 'Disagree', 'Neutral', 'Agree', 'Strongly agree'])
scenario = Scenario({})
agent = Agent(traits = {})
m = Model('Meta-Llama-3-1-70B-Instruct-tgxw')
results = q.by(m).by(agent).by(scenario).run()

Error:

Attempt 1 failed with exception 'LanguageModelBadResponseError':Cannot connect to host meta-llama-3-1-70b-instruct-tgxw.eastus.models.ai.azure.com:443 ssl:default [nodename nor servname provided, or not known] now waiting 1.00 seconds before retrying.Parameters: start=1.0, max=60.0, max_attempts=5.
zer0dss commented 2 months ago

@johnjosephhorton I can't replicate the issue. Do you have the AZURE_ENDPOINT_URL_AND_KEY env variable set? A test value for it is available on slack channel (same location as the AWS message)

johnjosephhorton commented 2 months ago

yeah - I re-ran just now and it was fine. Might have been an azure issue.