haystack icon indicating copy to clipboard operation
haystack copied to clipboard

Add `max_retries` and `timeout` params to all `AzureOpenAI` classes

Open EdoardoAbatiTR opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

Currently all OpenAI related classes (e.g. OpenAIDocumentEmbedder, OpenAIChatGenerator) can be initialised by setting max_retries and timeout params.

The corresponding AzureOpenAI don't always have the same params.

Describe the solution you'd like

It would be nice to have these params in the AzureOpenAI classes

Describe alternatives you've considered

Subclass AzureOpenAI and create custom components.

Additional context

cc @anakin87 :)

EdoardoAbatiTR avatar Jun 27 '24 08:06 EdoardoAbatiTR

Thanks @EdoardoAbatiTR!

I'm also opening this for contributions. In case anyone is interested, let's discuss it here.

anakin87 avatar Jun 27 '24 09:06 anakin87

Hey,

I am new here. Can I assign this to myself?

nvzard avatar Jul 04 '24 12:07 nvzard

@nvzard feel free to work on this. Take a look at the guidelines for contributors.

I would suggest creating one PR for each component to be changed. E.g., start with AzureOpenAIGenerator and use OpenAIGenerator as an inspiration.

anakin87 avatar Jul 04 '24 12:07 anakin87

@anakin87 thanks for the references 😄

I've made the first PR for AzureOpenAIGenerator, let me know if I missed anything.

Pending: AzureOpenAIDocumentEmbedder, AzureOpenAITextEmbedder, AzureOpenAIChatGenerator

nvzard avatar Jul 05 '24 09:07 nvzard

Hi all, thank you for working on this :)

I think this got closed automatically because there was the "Fixes" keyword the previous PR, but it should stay open until the other classes are also updated

EdoardoAbatiTR avatar Jul 08 '24 11:07 EdoardoAbatiTR

Ok np @EdoardoAbatiTR, what other classes need to be updated?

vblagoje avatar Jul 08 '24 11:07 vblagoje

@vblagoje AzureOpenAIDocumentEmbedder, AzureOpenAITextEmbedder, AzureOpenAIChatGenerator are left. I'll open a separate PR for each.

I already have a PR for AzureOpenAIChatGenerator https://github.com/deepset-ai/haystack/pull/7988 and will open one for the rest of the classes as well.

nvzard avatar Jul 08 '24 12:07 nvzard

If it's okay for everyone. Can I take a couple of classes? I'm new to open-source, and would love to contribute.

ghost avatar Jul 08 '24 12:07 ghost

@kanjikinsmoke I already have started work for the other classes. I think there are other issues available to work on: https://github.com/deepset-ai/haystack/issues?q=is%3Aopen+is%3Aissue+label%3A%22Contributions+wanted%21%22

nvzard avatar Jul 08 '24 12:07 nvzard

@kanjikinsmoke we just talked this morning internally about few easy issues that you could potentially work on. I'll ping @julian-risch to get back to you soon

vblagoje avatar Jul 08 '24 12:07 vblagoje

~~This can be reopened since there is one last PR left to be merged: https://github.com/deepset-ai/haystack/pull/7993~~

nvzard avatar Jul 09 '24 04:07 nvzard