deepset-ai / haystack

AI orchestration framework to build customizable, production-ready LLM applications. Connect components (models, vector DBs, file converters) to pipelines or agents that can interact with your data. With advanced retrieval methods, it's best suited for building RAG, question answering, semantic search or conversational agent chatbots.
https://haystack.deepset.ai
Apache License 2.0
17.72k stars 1.92k forks source link

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

Closed lbux closed 2 months ago

lbux commented 3 months ago

Related Issues

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

coveralls commented 3 months ago

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


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%
<!-- Total: 76 -->
Totals Coverage Status
Change from base Build 10388624662: 0.2%
Covered Lines: 7148
Relevant Lines: 7913

💛 - Coveralls
silvanocerza commented 2 months ago

@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.