Repository: deepset-ai/haystack

Issue:
API Docs - `haystack.document_stores`



Discussion:

Resolving patch:
diff --git a/haystack/components/generators/azure.py b/haystack/components/generators/azure.py
--- a/haystack/components/generators/azure.py
+++ b/haystack/components/generators/azure.py
@@ -24,7 +24,7 @@ class AzureOpenAIGenerator(OpenAIGenerator):
     For more details on OpenAI models deployed on Azure, refer to the Microsoft
     [documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/).
 
-
+    Usage example:
     ```python
     from haystack.components.generators import AzureOpenAIGenerator
     from haystack.utils import Secret
@@ -34,21 +34,15 @@ class AzureOpenAIGenerator(OpenAIGenerator):
         azure_deployment="<this a model name, e.g. gpt-35-turbo>")
     response = client.run("What's Natural Language Processing? Be brief.")
     print(response)
+    ```
 
+    ```
     >> {'replies': ['Natural Language Processing (NLP) is a branch of artificial intelligence that focuses on
     >> the interaction between computers and human language. It involves enabling computers to understand, interpret,
     >> and respond to natural human language in a way that is both meaningful and useful.'], 'meta': [{'model':
     >> 'gpt-3.5-turbo-0613', 'index': 0, 'finish_reason': 'stop', 'usage': {'prompt_tokens': 16,
     >> 'completion_tokens': 49, 'total_tokens': 65}}]}
     ```
-
-     Key Features and Compatibility:
-         - **Primary Compatibility**: Designed to work seamlessly with gpt-4, gpt-3.5-turbo family of models.
-         - **Streaming Support**: Supports streaming responses from the OpenAI API.
-         - **Customizability**: Supports all parameters supported by the OpenAI API.
-
-     Input and Output Format:
-         - **String Format**: This component uses the strings for both input and output.
     """
 
     # pylint: disable=super-init-not-called
@@ -69,7 +63,7 @@ def __init__(
         :param api_version: The version of the API to use. Defaults to 2023-05-15
         :param azure_deployment: The deployment of the model, usually the model name.
         :param api_key: The API key to use for authentication.
-        :param azure_ad_token: Azure Active Directory token, see https://www.microsoft.com/en-us/security/business/identity-access/microsoft-entra-id
+        :param azure_ad_token: [Azure Active Directory token](https://www.microsoft.com/en-us/security/business/identity-access/microsoft-entra-id)
         :param organization: The Organization ID, defaults to `None`. See
         [production best practices](https://platform.openai.com/docs/guides/production-best-practices/setting-up-your-organization).
         :param streaming_callback: A callback function that is called when a new token is received from the stream.
diff --git a/haystack/components/generators/hugging_face_tgi.py b/haystack/components/generators/hugging_face_tgi.py
--- a/haystack/components/generators/hugging_face_tgi.py
+++ b/haystack/components/generators/hugging_face_tgi.py
@@ -24,7 +24,27 @@ class HuggingFaceTGIGenerator:
 
     This component is designed to seamlessly inference models deployed on the Text Generation Inference (TGI) backend.
     You can use this component for LLMs hosted on Hugging Face inference endpoints, the rate-limited
-    Inference API tier:
+    Inference API tier.
+
+    Key Features and Compatibility:
+     - Primary Compatibility: designed to work seamlessly with any non-based model deployed using the TGI
+       framework. For more information on TGI, visit [text-generation-inference](https://github.com/huggingface/text-generation-inference)
+
+    - Hugging Face Inference Endpoints: Supports inference of TGI chat LLMs deployed on Hugging Face
+       inference endpoints. For more details, refer to [inference-endpoints](https://huggingface.co/inference-endpoints)
+
+    - Inference API Support: supports inference of TGI LLMs hosted on the rate-limited Inference
+      API tier. Learn more about the Inference API at [inference-api](https://huggingface.co/inference-api).
+      Discover available chat models using the following command: `wget -qO- https://api-inference.huggingface.co/framework/text-generation-inference | grep chat`
+      and simply use the model ID as the model parameter for this component. You'll also need to provide a valid
+      Hugging Face API token as the token parameter.
+
+    - Custom TGI Endpoints: supports inference of TGI chat LLMs deployed on custom TGI endpoints. Anyone can
+      deploy their own TGI endpoint using the TGI framework. For more details, refer to [inference-endpoints](https://huggingface.co/inference-endpoints)
+
+     Input and Output Format:
+      - String Format: This component uses the str format for structuring both input and output,
+        ensuring coherent and contextually relevant responses in text generation scenarios.
 
     ```python
     from haystack.components.generators import HuggingFaceTGIGenerator
@@ -48,27 +68,6 @@ class HuggingFaceTGIGenerator:
     response = client.run("What's Natural Language Processing?")
     print(response)
     ```
-
-
-     Key Features and Compatibility:
-         - **Primary Compatibility**: Designed to work seamlessly with any non-chat model deployed using the TGI
-           framework. For more information on TGI, visit https://github.com/huggingface/text-generation-inference.
-         - **Hugging Face Inference Endpoints**: Supports inference of TGI chat LLMs deployed on Hugging Face
-           inference endpoints. For more details refer to https://huggingface.co/inference-endpoints.
-         - **Inference API Support**: Supports inference of TGI LLMs hosted on the rate-limited Inference
-           API tier. Learn more about the Inference API at: https://huggingface.co/inference-api
-           Discover available LLMs using the following command:
-           ```
-           wget -qO- https://api-inference.huggingface.co/framework/text-generation-inference
-           ```
-           And simply use the model ID as the model parameter for this component. You'll also need to provide a valid
-           Hugging Face API token as the token parameter.
-         - **Custom TGI Endpoints**: Supports inference of LLMs deployed on custom TGI endpoints. Anyone can
-           deploy their own TGI endpoint using the TGI framework. For more details refer
-           to https://huggingface.co/inference-endpoints.
-     Input and Output Format:
-         - **String Format**: This component uses the str format for structuring both input and output,
-           ensuring coherent and contextually relevant responses in text generation scenarios.
     """
 
     def __init__(
diff --git a/haystack/components/generators/openai.py b/haystack/components/generators/openai.py
--- a/haystack/components/generators/openai.py
+++ b/haystack/components/generators/openai.py
@@ -24,6 +24,14 @@ class OpenAIGenerator:
     For more details on the parameters supported by the OpenAI API, refer to the OpenAI
     [documentation](https://platform.openai.com/docs/api-reference/chat).
 
+    Key Features and Compatibility:
+     - Primary Compatibility: Designed to work seamlessly with gpt-4, gpt-3.5-turbo family of models.
+     - Streaming Support: Supports streaming responses from the OpenAI API.
+     - Customizability: Supports all parameters supported by the OpenAI API.
+
+     Input and Output Format:
+      - String Format: This component uses the strings for both input and output.
+
     ```python
     from haystack.components.generators import OpenAIGenerator
     client = OpenAIGenerator()
@@ -36,14 +44,6 @@ class OpenAIGenerator:
     >> 'gpt-3.5-turbo-0613', 'index': 0, 'finish_reason': 'stop', 'usage': {'prompt_tokens': 16,
     >> 'completion_tokens': 49, 'total_tokens': 65}}]}
     ```
-
-     Key Features and Compatibility:
-         - **Primary Compatibility**: Designed to work seamlessly with gpt-4, gpt-3.5-turbo family of models.
-         - **Streaming Support**: Supports streaming responses from the OpenAI API.
-         - **Customizability**: Supports all parameters supported by the OpenAI API.
-
-     Input and Output Format:
-         - **String Format**: This component uses the strings for both input and output.
     """
 
     def __init__(
@@ -57,8 +57,7 @@ def __init__(
         generation_kwargs: Optional[Dict[str, Any]] = None,
     ):
         """
-        Creates an instance of OpenAIGenerator. Unless specified otherwise in the `model`, this is for OpenAI's
-        GPT-3.5 model.
+        Creates an instance of OpenAIGenerator. Unless specified otherwise in the `model`, this is for OpenAI's GPT-3.5 model.
 
         :param api_key: The OpenAI API key.
         :param model: The name of the model to use.


Test patch: