-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix: enable vale workflow correctly to review documentation changes #10211
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
Changes from 11 commits
612cacc
d1b737f
98541aa
f7e2711
32e1025
201432f
8d1a70c
f43e0f4
d15b1bf
73bb025
1eb1c3a
baa554b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| extends: substitution | ||
| message: "Use '%s' instead of the abbreviation '%s'." | ||
| level: warning | ||
| ignorecase: true | ||
| action: | ||
| name: replace | ||
| swap: | ||
| '\bmisc\b': miscellaneous | ||
| '\bdoc\b': document |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| extends: existence | ||
| message: "Avoid 'please' in instructions—it can make actions seem optional. Use imperative instead." | ||
| level: warning | ||
| ignorecase: true | ||
| scope: text | ||
| tokens: | ||
| - please |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,13 @@ | ||
| extends: existence | ||
| message: "Prefer second person (e.g., 'you') instead of '%s'." | ||
| message: "Prefer second person ('you') instead of '%s'." | ||
| level: warning | ||
| nonword: true | ||
| scope: text | ||
| tokens: | ||
| - the user | ||
| - the customer | ||
| - the client | ||
| - he | ||
| - she | ||
| - his | ||
| - her | ||
| - '\bhe\b' | ||
| - '\bshe\b' | ||
| - '\bhis\b' | ||
| - '\bher\b' | ||
| - their system |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,11 @@ | ||
| extends: substitution | ||
| message: "'%s' is not the correct branding. Use '%s' instead." | ||
| level: error | ||
| ignorecase: true | ||
| ignorecase: false | ||
| swap: | ||
| Deepset: deepset | ||
| DEEPSET: deepset | ||
| Huggingface: Hugging Face | ||
| huggingface: Hugging Face | ||
| HuggingFace: Hugging Face | ||
| Haystack: Haystack # Pass-through to suppress errors from wrong variants | ||
| haystack: Haystack | ||
| Deepset Platform: deepset AI Platform | ||
| HAYSTACK: Haystack |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| extends: substitution | ||
| message: "Use '%s' instead of '%s'." | ||
| level: warning | ||
| ignorecase: true | ||
| action: | ||
| name: replace | ||
| swap: | ||
| drop-down list: list | ||
| drop-down: list | ||
| dropdown: list | ||
| radio button: option | ||
| radio buttons: options | ||
| text field: field | ||
| text fields: fields | ||
| text area: field | ||
| hyperlink: link | ||
| hyperlinks: links | ||
| pop-up menu: context menu | ||
| popup menu: context menu | ||
| push button: button | ||
| push buttons: buttons | ||
| list box: list | ||
| choice box: list | ||
| pull-down list: list | ||
| scroll bar: scroll |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| extends: capitalization | ||
| message: "Headings and titles should use title case (e.g., 'Create a Workspace in deepset Cloud')." | ||
| message: "Headings and titles should use title case." | ||
| level: warning | ||
| scope: heading | ||
| style: AP |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,7 @@ | ||
| extends: existence | ||
| message: "Spell out numbers zero through nine unless part of time, measurement, or list." | ||
| level: warning | ||
| message: "Consider spelling out numbers zero through nine (exceptions: time, measurements, lists with larger numbers)." | ||
| level: suggestion | ||
| scope: text | ||
| nonword: true | ||
| tokens: | ||
| - 1 | ||
| - 2 | ||
| - 3 | ||
| - 4 | ||
| - 5 | ||
| - 6 | ||
| - 7 | ||
| - 8 | ||
| - 9 | ||
| - '\b[1-9]\b' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| extends: existence | ||
| message: "Wrap parameter, class, or method names like '%s' in backticks." | ||
| level: warning | ||
| level: suggestion | ||
| scope: text | ||
| raw: | ||
| - '\b[a-zA-Z_][a-zA-Z0-9_]*\(\)' # Methods like pipeline() | ||
| - '\b[A-Z][a-zA-Z0-9]*\b' # Class names like MyClass | ||
| - '\b[a-zA-Z_][a-zA-Z0-9_]*\(\)' # Methods like pipeline(), run() | ||
| - '\b[a-z]+_[a-z_]+\b' # snake_case like max_length | ||
| - '\b[a-z]+[A-Z][a-zA-Z0-9]*\b' # camelCase like maxDepth |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| extends: substitution | ||
| message: "Write '%s' without a hyphen: '%s'." | ||
| level: warning | ||
| ignorecase: true | ||
| action: | ||
| name: replace | ||
| swap: | ||
| question-answering: question answering | ||
| document-retrieval: document retrieval |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| extends: existence | ||
| message: "Avoid '%s'—it's implied by the colon. Rephrase or remove." | ||
| level: suggestion | ||
| ignorecase: true | ||
| scope: text | ||
| tokens: | ||
| - the following | ||
| - as follows |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,3 +8,7 @@ tokens: | |
| - simply | ||
| - basically | ||
| - leverage | ||
| - very | ||
| - really | ||
| - extremely | ||
| - quite | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| extends: substitution | ||
| message: "Use '%s' instead of '%s'." | ||
| level: warning | ||
| ignorecase: true | ||
| action: | ||
| name: replace | ||
| swap: | ||
| utilize: use | ||
| utilizes: uses | ||
| utilizing: using | ||
| utilized: used | ||
| purchase: buy | ||
| purchases: buys | ||
| purchasing: buying | ||
| purchased: bought | ||
| assist: help | ||
| assists: helps | ||
| assisting: helping | ||
| assisted: helped | ||
| info: information | ||
| leverage: use | ||
| leverages: uses | ||
| leveraging: using | ||
| leveraged: used |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| --- | ||
| title: "CustomEmbedder" | ||
| id: customembedder | ||
| slug: "/customembedder" | ||
| description: "An embedder component for generating vector representations of text." | ||
| --- | ||
|
|
||
| # CustomEmbedder | ||
|
|
||
| An embedder component for generating vector representations of text using custom models. | ||
|
|
||
| <div className="key-value-table"> | ||
|
|
||
| | | | | ||
| | --- | --- | | ||
| | **Most common position in a pipeline** | Before a retriever | | ||
| | **Mandatory init variables** | `model_name`: The name of the embedding model to use | | ||
| | **Mandatory run variables** | `text`: The text to embed | | ||
| | **Output variables** | `embedding`: A list of floats representing the vector | | ||
| | **API reference** | [Embedders](/reference/embedders-api) | | ||
|
|
||
| </div> | ||
|
|
||
| ## Overview | ||
|
|
||
| `CustomEmbedder` generates dense vector representations of text. The user can configure the model and its parameters during initialization. | ||
|
|
||
| This component supports multiple embedding providers, e.g. OpenAI, Cohere, and local models. | ||
|
|
||
| ## Usage | ||
|
|
||
| ### On Its Own | ||
|
|
||
| ```python | ||
| from haystack.components.embedders import CustomEmbedder | ||
|
|
||
| embedder = CustomEmbedder(model_name="sentence-transformers/all-MiniLM-L6-v2") | ||
| result = embedder.run(text="What is haystack?") | ||
| print(result["embedding"]) | ||
| ``` | ||
|
|
||
| ### In a Pipeline | ||
|
|
||
| Please initialize the embedder before adding it to a pipeline: | ||
|
||
|
|
||
| ```python | ||
| from haystack import Pipeline | ||
| from haystack.components.embedders import CustomEmbedder | ||
| from haystack.components.retrievers import InMemoryEmbeddingRetriever | ||
|
|
||
| pipeline = Pipeline() | ||
| pipeline.add_component("embedder", CustomEmbedder(model_name="all-MiniLM-L6-v2")) | ||
| pipeline.add_component("retriever", InMemoryEmbeddingRetriever(document_store=store)) | ||
| pipeline.connect("embedder.embedding", "retriever.query_embedding") | ||
| ``` | ||
|
|
||
| ## Configuration | ||
|
|
||
| | Parameter | Type | Default | Description | | ||
| | --- | --- | --- | --- | | ||
| | `model_name` | `str` | Required | The embedding model to utilize | | ||
|
||
| | `batch_size` | `int` | `32` | Number of texts to process at once | | ||
|
|
||
| Export your configuration to a json file for reproducibility. | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [vale] reported by reviewdog 🐶
[Google.Latin] Use 'for example' instead of 'e.g. '.