Skip to content

Commit f6907ba

Browse files
authored
style: fix admonition headings (#10000)
* admonition headings * update admonition info to note types
1 parent f3b180e commit f6907ba

File tree

124 files changed

+257
-376
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+257
-376
lines changed

docs-website/docs/concepts/device-management.mdx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ Haystack’s device management is built on the following abstractions:
2424

2525
With the above abstractions, Haystack can fully address any supported device that’s part of your local machine and can support the usage of multiple devices at the same time. Every component that supports local inference will internally handle the conversion of these generic representations to their backend-specific representations.
2626

27-
:::info
28-
Source Code
27+
:::info Source Code
2928

3029
Find the full code for the abstractions above in the Haystack GitHub [repo](https://github.com/deepset-ai/haystack/blob/6a776e672fb69cc4ee42df9039066200f1baf24e/haystack/utils/device.py).
3130
:::
@@ -82,14 +81,14 @@ class MyComponent(Component):
8281
self.model = AutoModel.from_pretrained("deepset/bert-base-cased-squad2", device=self.device.to_hf())
8382

8483
def to_dict(self):
85-
# Serialize the policy like any other (custom) data.
84+
# Serialize the policy like any other (custom) data.
8685
return default_to_dict(self,
8786
device=self.device.to_dict() if self.device else None,
8887
...)
89-
88+
9089
@classmethod
9190
def from_dict(cls, data):
92-
# Deserialize the device data inplace before passing
91+
# Deserialize the device data inplace before passing
9392
# it to the generic from_dict function.
9493
init_params = data["init_parameters"]
9594
init_params["device"] = ComponentDevice.from_dict(init_params["device"])
@@ -120,4 +119,4 @@ generator = HuggingFaceLocalGenerator(model="llama2", huggingface_pipeline_kwarg
120119
})
121120
```
122121

123-
In such cases, ensure that the parameter precedence and selection behavior is clearly documented. In the case of `HuggingFaceLocalGenerator`, the device map passed through the `huggingface_pipeline_kwargs` parameter overrides the explicit `device` parameter and is documented as such.
122+
In such cases, ensure that the parameter precedence and selection behavior is clearly documented. In the case of `HuggingFaceLocalGenerator`, the device map passed through the `huggingface_pipeline_kwargs` parameter overrides the explicit `device` parameter and is documented as such.

docs-website/docs/concepts/document-store.mdx

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,14 @@ description: "You can think of the Document Store as a database that stores your
99

1010
You can think of the Document Store as a database that stores your data and provides them to the Retriever at query time. Learn how to use Document Store in a pipeline or how to create your own.
1111

12-
Document Store is an object that stores your documents. In Haystack, a Document Store is different from a component, as it doesnt have the `run()` method. You can think of it as an interface to your database – you put the information there, or you can look through it. This means that a Document Store is not a piece of a pipeline but rather a tool that the components of a pipeline have access to and can interact with.
12+
Document Store is an object that stores your documents. In Haystack, a Document Store is different from a component, as it doesn't have the `run()` method. You can think of it as an interface to your database – you put the information there, or you can look through it. This means that a Document Store is not a piece of a pipeline but rather a tool that the components of a pipeline have access to and can interact with.
1313

14-
:::tip
15-
Work with Retrievers
14+
:::tip Work with Retrievers
1615

1716
The most common way to use a Document Store in Haystack is to fetch documents using a Retriever. A Document Store will often have a corresponding Retriever to get the most out of specific technologies. See more information in our [Retriever](../pipeline-components/retrievers.mdx) documentation.
1817
:::
1918

20-
:::info
21-
How to choose a Document Store?
19+
:::note How to choose a Document Store?
2220

2321
To learn about different types of Document Stores and their strengths and disadvantages, head to the [Choosing a Document Store](document-store/choosing-a-document-store.mdx) page.
2422
:::
@@ -40,7 +38,7 @@ See the installation and initialization details for each Document Store in the "
4038

4139
### Work with Documents
4240

43-
Convert your data into `Document` objects before writing them into a Document Store along with its metadata and document ID.
41+
Convert your data into `Document` objects before writing them into a Document Store along with its metadata and document ID.
4442

4543
The ID field is mandatory, so if you don’t choose a specific ID yourself, Haystack will do its best to come up with a unique ID based on the document’s information and assign it automatically. However, since Haystack uses the document’s contents to create an ID, two identical documents might have identical IDs. Keep it in mind as you update your documents, as the ID will not be updated automatically.
4644

@@ -61,14 +59,13 @@ To write documents into the `InMemoryDocumentStore`, simply call the `.write_doc
6159

6260
```python
6361
document_store.write_documents([
64-
Document(content="My name is Jean and I live in Paris."),
65-
Document(content="My name is Mark and I live in Berlin."),
62+
Document(content="My name is Jean and I live in Paris."),
63+
Document(content="My name is Mark and I live in Berlin."),
6664
Document(content="My name is Giorgio and I live in Rome.")
6765
])
6866
```
6967

70-
:::info
71-
`DocumentWriter`
68+
:::note `DocumentWriter`
7269

7370
See `DocumentWriter` component [docs](../pipeline-components/writers/documentwriter.mdx) to write your documents into a Document Store in a pipeline.
7471
:::
@@ -100,4 +97,4 @@ The `init` function should indicate all the specifics for the chosen database or
10097

10198
We also recommend having a custom corresponding Retriever to get the most out of a specific Document Store.
10299

103-
See [Creating Custom Document Stores](document-store/creating-custom-document-stores.mdx) page for more details.
100+
See [Creating Custom Document Stores](document-store/creating-custom-document-stores.mdx) page for more details.

docs-website/docs/concepts/document-store/choosing-a-document-store.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ Continue further down the article for a more complex explanation of the strength
5656

5757
Vector libraries are often included in the “vector database” category improperly, as they are limited to handling only vectors, are designed to work in-memory, and normally don’t have a clean way to store data on disk. Still, they are the way to go every time performance and speed are the top requirements for your AI application, as these libraries can use hardware resources very effectively.
5858

59-
> 🚧 In progress
60-
>
61-
> We are currently developing the support for vector libraries in Haystack.
59+
:::warning In progress
60+
61+
We are currently developing the support for vector libraries in Haystack.
62+
:::
6263

6364
#### Pure vector databases
6465

docs-website/docs/concepts/pipelines.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ Thanks to serialization, you can save and then load your pipelines. Serializatio
100100

101101
Haystack pipelines delegate the serialization to its components, so serializing a pipeline simply means serializing each component in the pipeline one after the other, along with their connections. The pipeline is serialized into a dictionary format, which acts as an intermediate format that you can then convert into the final format you want.
102102

103-
:::info
104-
Serialization formats
103+
:::info Serialization formats
105104

106105
Haystack only supports YAML format at this time. We'll be rolling out more formats gradually.
107106
:::

docs-website/docs/concepts/pipelines/serialization.mdx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ description: "Save your pipelines into a custom format and explore the serializa
99

1010
Save your pipelines into a custom format and explore the serialization options.
1111

12-
Serialization means converting a pipeline to a format that you can save on your disk and load later.
12+
Serialization means converting a pipeline to a format that you can save on your disk and load later.
1313

14-
:::info
15-
Serialization formats
14+
:::info Serialization formats
1615

1716
Haystack 2.0 only supports YAML format at this time. We will be rolling out more formats gradually.
1817
:::
@@ -28,7 +27,7 @@ pipe = Pipeline()
2827
print(pipe.dumps())
2928

3029
## Prints:
31-
##
30+
##
3231
## components: {}
3332
## connections: []
3433
## max_loops_allowed: 100
@@ -131,7 +130,7 @@ from haystack import component, default_from_dict, default_to_dict
131130
class SetIntersector:
132131
def __init__(self, intersect_with: set):
133132
self.intersect_with = intersect_with
134-
133+
135134
@component.output_types(result=set)
136135
def run(self, data: set):
137136
return data.intersect(self.intersect_with)
@@ -151,7 +150,7 @@ class SetIntersector:
151150

152151
Once a pipeline is available in its dictionary format, the last step of serialization is to convert that dictionary into a format you can store or send over the wire. Haystack supports YAML out of the box, but if you need a different format, you can write a custom Marshaller.
153152

154-
A `Marshaller` is a Python class responsible for converting text to a dictionary and a dictionary to text according to a certain format. Marshallers must respect the `Marshaller` [protocol](https://github.com/deepset-ai/haystack/blob/main/haystack/marshal/protocol.py), providing the methods `marshal` and `unmarshal`.
153+
A `Marshaller` is a Python class responsible for converting text to a dictionary and a dictionary to text according to a certain format. Marshallers must respect the `Marshaller` [protocol](https://github.com/deepset-ai/haystack/blob/main/haystack/marshal/protocol.py), providing the methods `marshal` and `unmarshal`.
155154

156155
This is the code for a custom TOML marshaller that relies on the `rtoml` library:
157156

@@ -182,4 +181,4 @@ pipe.dumps(TomlMarshaller())
182181

183182
## Additional References
184183

185-
:notebook: Tutorial: [Serializing LLM Pipelines](https://haystack.deepset.ai/tutorials/29_serializing_pipelines)
184+
:notebook: Tutorial: [Serializing LLM Pipelines](https://haystack.deepset.ai/tutorials/29_serializing_pipelines)

docs-website/docs/concepts/pipelines/visualizing-pipelines.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ You can visualize your pipelines as graphs to better understand how the componen
1313

1414
Haystack pipelines have `draw()` and `show()` methods that enable you to visualize the pipeline as a graph using Mermaid graphs.
1515

16-
:::info
17-
Data Privacy Notice
16+
:::note Data Privacy Notice
1817

1918
Exercise caution with sensitive data when using pipeline visualization.
2019

docs-website/docs/development/deployment.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: "Deploy your Haystack pipelines through various services such as Do
99

1010
Deploy your Haystack pipelines through various services such as Docker, Kubernetes, Ray, or a variety of Serverless options.
1111

12-
As a framework, Haystack is typically integrated into a variety of applications and environments, and there is no single, specific deployment strategy to follow. However, it is very common to make Haystack pipelines accessible through a service that can be easily called from other software systems.
12+
As a framework, Haystack is typically integrated into a variety of applications and environments, and there is no single, specific deployment strategy to follow. However, it is very common to make Haystack pipelines accessible through a service that can be easily called from other software systems.
1313

1414
These guides focus on tools and techniques that can be used to run Haystack pipelines in common scenarios. While these suggestions should not be considered the only way to do so, they should provide inspiration and the ability to customize them according to your needs.
1515

@@ -25,12 +25,11 @@ Here are the currently available guides on Haystack pipeline deployment:
2525

2626
Haystack can be easily integrated into any HTTP application, but if you don’t have one, you can use Hayhooks, a ready-made application that serves Haystack pipelines as REST endpoints. We’ll be using Hayhooks throughout this guide to streamline the code examples. Refer to the Hayhooks [documentation](hayhooks.mdx) to get details about how to run the server and deploy your pipelines.
2727

28-
:::note
29-
Looking to scale with confidence?
28+
:::note Looking to scale with confidence?
3029

3130
If your team needs **enterprise-grade support, best practices, and deployment guidance** to run Haystack in production, check out **Haystack Enterprise**.
3231

3332
📜 [Learn more about Haystack Enterprise](https://haystack.deepset.ai/blog/announcing-haystack-enterprise)
3433

3534
👉 [Get in touch with our team](https://www.deepset.ai/products-and-services/haystack-enterprise)
36-
:::
35+
:::

docs-website/docs/development/hayhooks.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ description: "Hayhooks is a web application you can use to serve Haystack pipeli
99

1010
Hayhooks is a web application you can use to serve Haystack pipelines through HTTP endpoints. This page provides an overview of the main features of Hayhooks.
1111

12-
:::info
13-
Hayhooks GitHub
12+
:::info Hayhooks GitHub
1413

1514
You can find the code and an in-depth explanation of the features in the [Hayhooks GitHub repository](https://github.com/deepset-ai/hayhooks).
1615
:::
@@ -238,10 +237,10 @@ To deploy a pipeline without listing it as an MCP Tool, set `skip_mcp = True` in
238237
class PipelineWrapper(BasePipelineWrapper):
239238
# This will skip the MCP Tool listing
240239
skip_mcp = True
241-
240+
242241
def setup(self) -> None:
243242
...
244-
243+
245244
def run_api(self, urls: List[str], question: str) -> str:
246245
...
247246
```
@@ -298,4 +297,4 @@ async def custom_middleware(request: Request, call_next):
298297

299298
if __name__ == "__main__":
300299
uvicorn.run("app:hayhooks", host=settings.host, port=settings.port)
301-
```
300+
```

docs-website/docs/development/logging.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ If Haystack detects a [structlog installation](https://www.structlog.org/en/stab
6666
To make development a more pleasurable experience, Haystack uses [structlog’s `ConsoleRender`](https://www.structlog.org/en/stable/console-output.html) by default to render structured logs as a nicely aligned and colorful output:
6767
<ClickableImage src="/img/e49a1f2-Screenshot_2024-02-27_at_16.13.51.png" alt="Python code snippet demonstrating basic logging setup with getLogger and a warning level log message output" />
6868

69-
:::tip
70-
Rich Formatting
69+
:::tip Rich Formatting
7170

7271
Install [_rich_](https://rich.readthedocs.io/en/stable/index.html) to beautify your logs even more!
7372
:::

docs-website/docs/document-stores/azureaisearchdocumentstore.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A Document Store for storing and retrieval from Azure AI Search Index.
1616

1717
[Azure AI Search](https://learn.microsoft.com/en-us/azure/search/search-what-is-azure-search) is an enterprise-ready search and retrieval system to build RAG-based applications on Azure, with native LLM integrations.
1818

19-
`AzureAISearchDocumentStore` supports semantic reranking and metadata/content filtering. The Document Store is useful for various tasks such as generating knowledge base insights (catalog or document search), information discovery (data exploration), RAG, and automation.
19+
`AzureAISearchDocumentStore` supports semantic reranking and metadata/content filtering. The Document Store is useful for various tasks such as generating knowledge base insights (catalog or document search), information discovery (data exploration), RAG, and automation.
2020

2121
### Initialization
2222

@@ -46,8 +46,7 @@ document_store.write_documents([
4646
print(document_store.count_documents())
4747
```
4848

49-
:::info
50-
Latency Notice
49+
:::info Latency Notice
5150

5251
Due to Azure search index latency, the document count returned in the example might be zero if executed immediately. To ensure accurate results, be mindful of this latency when retrieving documents from the search index.
5352
:::
@@ -60,4 +59,4 @@ The Haystack Azure AI Search integration includes three Retriever components. Ea
6059

6160
- [`AzureAISearchEmbeddingRetriever`](../pipeline-components/retrievers/azureaisearchembeddingretriever.mdx): This Retriever accepts the embeddings of a single query as input and returns a list of matching documents. The query must be embedded beforehand, which can be done using an [Embedder](../pipeline-components/embedders.mdx) component.
6261
- [`AzureAISearchBM25Retriever`](../pipeline-components/retrievers/azureaisearchbm25retriever.mdx): A keyword-based Retriever that retrieves documents matching a query from the Azure AI Search index.
63-
- [`AzureAISearchHybridRetriever`](../pipeline-components/retrievers/azureaisearchhybridretriever.mdx): This Retriever combines embedding-based retrieval and keyword search to find matching documents in the search index to get more relevant results.
62+
- [`AzureAISearchHybridRetriever`](../pipeline-components/retrievers/azureaisearchhybridretriever.mdx): This Retriever combines embedding-based retrieval and keyword search to find matching documents in the search index to get more relevant results.

0 commit comments

Comments
 (0)