dspy icon indicating copy to clipboard operation
dspy copied to clipboard

Remove unused kwargs passed to requests sent through `AzureOpenAI`

Open Yummy2016 opened this issue 11 months ago • 1 comments

This commit is to remove unused kwargs that we include in the requests sent through AzureOpenAI class.

This seems to fix this issue: https://github.com/stanfordnlp/dspy/issues/543

Yummy2016 avatar Mar 06 '24 20:03 Yummy2016

@Yummy2016 thank you for the PR. Let me check the change, first.

This code was updated recently due to this issue, https://github.com/stanfordnlp/dspy/issues/521. I am using legacy openai.

insop avatar Mar 07 '24 00:03 insop

Thank you for the change. Let's merge this as many are hit the issue, @okhat.

(updated since previous note was not valid)

I tested with this PR and I still hit the issue https://github.com/stanfordnlp/dspy/issues/521. For my setup, I use llm_metric and teach lm that are all azure model and saw this error when I am using BootstrapFewShotWithRandomSearch

<function llm_metric at 0xxx> due to __init__() missing 2 required positional arguments: 'api_base' and 'api_version'.

But let's get this change in first, and I will figure out how to address https://github.com/stanfordnlp/dspy/issues/521

insop avatar Mar 07 '24 02:03 insop