Skip to content

Commit

Permalink
Solve pylint complains
Browse files Browse the repository at this point in the history
  • Loading branch information
Maclenn77 committed Dec 9, 2023
1 parent e303e75 commit c3e9f44
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/chroma_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ def __init__(self, api_key, path="tmp/chroma"):
self.api_key = api_key
self.client.heartbeat()

def get_collection(self, name):
"""Get a Chroma collection."""
try:
collection = self.client.get_collection(name=name)
return collection
except AttributeError:
return st.error("An error ocurred while getting the collection.")

def create_collection(self, name):
"""Create a Chroma collection."""
try:
Expand Down

0 comments on commit c3e9f44

Please sign in to comment.