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

Astra DB: Add integration usage tracking #568

Merged
merged 7 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion integrations/astra/examples/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
haystack-ai==2.0.0b4
sentence_transformers==2.2.2
openai==1.6.1
astrapy>=0.7.0
astrapy>=0.7.7
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@

from astrapy.api import APIRequestError
from astrapy.db import AstraDB
from haystack.version import __version__ as integration_version
from pydantic.dataclasses import dataclass

logger = logging.getLogger(__name__)

NON_INDEXED_FIELDS = ["metadata._node_content", "content"]
CALLER_NAME = "haystack"


@dataclass
Expand Down Expand Up @@ -64,7 +66,13 @@ def __init__(
self.namespace = namespace

# Build the Astra DB object
self._astra_db = AstraDB(api_endpoint=api_endpoint, token=token, namespace=namespace)
self._astra_db = AstraDB(
api_endpoint=api_endpoint,
token=token,
namespace=namespace,
caller_name=CALLER_NAME,
caller_version=integration_version,
)

try:
# Create and connect to the newly created collection
Expand Down