Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Expose default_headers and add kwargs for Azure Client #8244

Merged
merged 4 commits into from
Sep 10, 2024

Conversation

lbux
Copy link
Contributor

@lbux lbux commented Aug 15, 2024

Related Issues

Proposed Changes:

I explicitly chose to expose default_headers and add an optional azure_kwargs for the other more niche parameters that some users might find useful. This can be condensed into azure_kwargs if preferred.

How did you test it?

Tested with empty dictionary as we would need someone that uses an Azure Organizational Project with APIM to test.

Notes for the reviewer

As noted above, let me know whether exposing default_headers is the preferred way.

Checklist

@lbux lbux requested review from a team as code owners August 15, 2024 19:54
@lbux lbux requested review from dfokina and silvanocerza and removed request for a team August 15, 2024 19:54
@github-actions github-actions bot added topic:tests type:documentation Improvements on the docs labels Aug 15, 2024
@coveralls
Copy link
Collaborator

coveralls commented Aug 15, 2024

Pull Request Test Coverage Report for Build 10790357564

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 76 unchanged lines in 18 files lost coverage.
  • Overall coverage increased (+0.2%) to 90.332%

Files with Coverage Reduction New Missed Lines %
components/builders/chat_prompt_builder.py 1 98.51%
components/converters/output_adapter.py 1 98.48%
components/embedders/sentence_transformers_document_embedder.py 1 96.67%
components/embedders/sentence_transformers_text_embedder.py 1 96.15%
components/preprocessors/document_splitter.py 1 98.96%
components/routers/zero_shot_text_router.py 1 93.88%
components/routers/conditional_router.py 2 97.78%
core/component/component.py 2 97.93%
components/generators/azure.py 3 92.68%
components/generators/chat/azure.py 3 92.5%
Totals Coverage Status
Change from base Build 10388624662: 0.2%
Covered Lines: 7148
Relevant Lines: 7913

💛 - Coveralls

@silvanocerza
Copy link
Contributor

@lbux sorry for the late review. I decided to remove the kwargs argument as most of the AzureOpenAI arguments are already exposed, if we need to expose the others we can do it explicitly in future PRs.

@silvanocerza silvanocerza enabled auto-merge (squash) September 10, 2024 10:12
@silvanocerza silvanocerza merged commit 145ca89 into deepset-ai:main Sep 10, 2024
18 checks passed
silvanocerza added a commit that referenced this pull request Sep 10, 2024
* default_headers and azure_kwargs added

* update docstrings

* dont forget about chat generator

* Remove azure_kwargs argument

---------

Co-authored-by: Silvano Cerza <silvanocerza@gmail.com>
@lbux lbux deleted the azure_kwargs branch September 10, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:tests type:documentation Improvements on the docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Add support for Azure API Manager to Azure Generator/Chat
3 participants