Skip to content
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

docs: Update opensearch retriever docstrings #1035

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
docs: Update OpenSearchEmbeddingRetriever metadata filter syntax
  • Loading branch information
kanenorman committed Aug 29, 2024
commit 6dfdb4407cd7fe8a77b53d4c24b951f653dbdafe
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,16 @@ def __init__(
For this `custom_query`, an example `run()` could be:

```python
retriever.run(query_embedding=embedding,
filters={"years": ["2019"], "quarters": ["Q1", "Q2"]})
retriever.run(
query_embedding=embedding,
filters={
"operator": "AND",
"conditions": [
{"field": "meta.years", "operator": "==", "value": "2019"},
{"field": "meta.quarters", "operator": "in", "value": ["Q1", "Q2"]},
],
},
)
```
:param raise_on_failure:
If `True`, raises an exception if the API call fails.
Expand Down Expand Up @@ -176,8 +184,16 @@ def run(
For this `custom_query`, an example `run()` could be:

```python
retriever.run(query_embedding=embedding,
filters={"years": ["2019"], "quarters": ["Q1", "Q2"]})
retriever.run(
query_embedding=embedding,
filters={
"operator": "AND",
"conditions": [
{"field": "meta.years", "operator": "==", "value": "2019"},
{"field": "meta.quarters", "operator": "in", "value": ["Q1", "Q2"]},
],
},
)
```

:returns:
Expand Down