Skip to content

Commit c14b41e

Browse files
authored
Merge pull request #25 from zhangw/chroma-telemetry-disable
disable the posthog telemetry mechnism that may raise the connection error
2 parents 3b01635 + 7b2e1b0 commit c14b41e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

coagent/db_handler/vector_db_handler/chroma_handler.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ def __init__(self, path: str, collection_name: str = ''):
1616
@param path: path of data
1717
@collection_name: name of collection
1818
'''
19-
self.client = chromadb.PersistentClient(path)
19+
settings = chromadb.get_settings()
20+
# disable the posthog telemetry mechnism that may raise the connection error, such as
21+
# "requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='us-api.i.posthog.com', port 443)"
22+
settings.anonymized_telemetry = False
23+
self.client = chromadb.PersistentClient(path, settings)
2024
self.client.heartbeat()
2125

2226
if collection_name:

0 commit comments

Comments
 (0)