dspy icon indicating copy to clipboard operation
dspy copied to clipboard

Azure OpenAI (1.12.0) `Completions.create() got an unexpected keyword argument 'api_base'` Error

Open msaleem18 opened this issue 5 months ago • 2 comments

I have been trying to use Azure OpenAI model (1.12.0) and i keep getting the Completions.create() got an unexpected keyword argument 'api_base'.

It looks like within the Azure OpenAI class: https://github.com/stanfordnlp/dspy/blob/c2d639fb1c1dafa7d6a12b3fe730b3564580fbfe/dsp/modules/azure_openai.py#L110

depending on the version, the 'api_base' parameter should be 'azure_endpoint' for the new versions.

Wondering if anyone else is having this issue?

Appreciate the help and advice

msaleem18 avatar Mar 06 '24 17:03 msaleem18

Seeing the same issue. Seems like there's logic to handle it here but it's not propagated downstream.

chaitanya-parsana avatar Mar 06 '24 19:03 chaitanya-parsana

Related PR, https://github.com/stanfordnlp/dspy/pull/584

insop avatar Mar 07 '24 02:03 insop

@insop with #584 merged, did you want to circle back to adding these kwargs now? related to #591

arnavsinghvi11 avatar Mar 09 '24 20:03 arnavsinghvi11

@insop with #584 merged, did you want to circle back to adding these kwargs now? related to #591

Thank you @arnavsinghvi11. Yes, I will add note to issue #591.

insop avatar Mar 09 '24 21:03 insop

@arnavsinghvi11 you can close this and I will work with #591

insop avatar Mar 09 '24 21:03 insop