Skip to content

Commit

Permalink
Update docs of DeepsetCloudDocumentStore (#2460)
Browse files Browse the repository at this point in the history
* Update docs of DeepsetCloudDocumentStore

* Update Documentation & Code Style

* Update docstring

Co-authored-by: tstadel <60758086+tstadel@users.noreply.github.com>

* Update Documentation & Code Style

* move DEFAULT_API_ENDPOINT

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: tstadel <60758086+tstadel@users.noreply.github.com>
  • Loading branch information
3 people committed Apr 27, 2022
1 parent 7a1e0bb commit 766e753
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
9 changes: 6 additions & 3 deletions docs/_src/api/api/document_store.md
Original file line number Diff line number Diff line change
Expand Up @@ -3994,8 +3994,10 @@ See https://haystack.deepset.ai/components/document-store for more information.

- `api_key`: Secret value of the API key.
If not specified, will be read from DEEPSET_CLOUD_API_KEY environment variable.
- `workspace`: workspace in Deepset Cloud
- `index`: index to access within the Deepset Cloud workspace
See docs on how to generate an API key for your workspace: https://docs.cloud.deepset.ai/docs/connect-deepset-cloud-to-your-application
- `workspace`: workspace name in Deepset Cloud
- `index`: name of the index to access within the Deepset Cloud workspace. This equals typically the name of your pipeline.
You can run Pipeline.list_pipelines_on_deepset_cloud() to see all available ones.
- `duplicate_documents`: Handle duplicates document based on parameter options.
Parameter options : ( 'skip','overwrite','fail')
skip: Ignore the duplicates documents
Expand All @@ -4004,8 +4006,9 @@ fail: an error is raised if the document ID of the document being added already
exists.
- `api_endpoint`: The URL of the Deepset Cloud API.
If not specified, will be read from DEEPSET_CLOUD_API_ENDPOINT environment variable.
If DEEPSET_CLOUD_API_ENDPOINT environment variable is not specified either, defaults to "https://api.cloud.deepset.ai/api/v1".
- `similarity`: The similarity function used to compare document vectors. 'dot_product' is the default since it is
more performant with DPR embeddings. 'cosine' is recommended if you are using a Sentence BERT model.
more performant with DPR embeddings. 'cosine' is recommended if you are using a Sentence Transformer model.
- `label_index`: index for the evaluation set interface
- `return_embedding`: To return document embedding.

Expand Down
11 changes: 6 additions & 5 deletions haystack/document_stores/deepsetcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
from haystack.utils import DeepsetCloud


DEFAULT_API_ENDPOINT = f"DC_API_PLACEHOLDER/v1" # TODO

logger = logging.getLogger(__name__)


Expand All @@ -35,8 +33,10 @@ def __init__(
:param api_key: Secret value of the API key.
If not specified, will be read from DEEPSET_CLOUD_API_KEY environment variable.
:param workspace: workspace in Deepset Cloud
:param index: index to access within the Deepset Cloud workspace
See docs on how to generate an API key for your workspace: https://docs.cloud.deepset.ai/docs/connect-deepset-cloud-to-your-application
:param workspace: workspace name in Deepset Cloud
:param index: name of the index to access within the Deepset Cloud workspace. This equals typically the name of your pipeline.
You can run Pipeline.list_pipelines_on_deepset_cloud() to see all available ones.
:param duplicate_documents: Handle duplicates document based on parameter options.
Parameter options : ( 'skip','overwrite','fail')
skip: Ignore the duplicates documents
Expand All @@ -45,8 +45,9 @@ def __init__(
exists.
:param api_endpoint: The URL of the Deepset Cloud API.
If not specified, will be read from DEEPSET_CLOUD_API_ENDPOINT environment variable.
If DEEPSET_CLOUD_API_ENDPOINT environment variable is not specified either, defaults to "https://api.cloud.deepset.ai/api/v1".
:param similarity: The similarity function used to compare document vectors. 'dot_product' is the default since it is
more performant with DPR embeddings. 'cosine' is recommended if you are using a Sentence BERT model.
more performant with DPR embeddings. 'cosine' is recommended if you are using a Sentence Transformer model.
:param label_index: index for the evaluation set interface
:param return_embedding: To return document embedding.
Expand Down
2 changes: 1 addition & 1 deletion haystack/utils/deepsetcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from haystack.schema import Label, Document, Answer


DEFAULT_API_ENDPOINT = f"DC_API_PLACEHOLDER/v1" # TODO
DEFAULT_API_ENDPOINT = "https://api.cloud.deepset.ai/api/v1"


class PipelineStatus(Enum):
Expand Down

0 comments on commit 766e753

Please sign in to comment.