Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
config.cpython-313.pyc98 linesDownload Raw Back to __pycache__
1�

2��j9J��r�%SSKrSSKrSSKrSSKJr SSKJr SSKJr SSK	J3r4JrJrJ
r
JrJrJr SSK	JrJrJr SSKJr SSKJr SS	KJr SSKrSS5KJr SSKJr SrSS
KJr \RB"\"5r#Sr$S1r%1Skr&0SS_SS_SS_SS_SS_SS_SS_SS_SS _S!S"_S#S$_S%S&_S'S(_S)S*_S+S,_S-S._S/S0_r'\
\(\(4\)S1'S2r*S3r+"S4S5\(\5r,"S6S7\5r-"S8S9\5r.\"S:S;S<9r/"S=S;\\5r0"S>S?\05r1\"S@5r2SA\(SB\\2SC\\24SDjr3SE\\4SC\(4SFjr5g!\ a SrN�f=f)G�N)�ABC)�Enum)�TopologicalSorter)�Optional�List�Any�Dict�Set�Iterable�Union)�Type�TypeVar�cast)�EnforceOverrides)�override)�Literal)�field_validator)�BaseSettingsF)�is_thin_clientaYou are using a deprecated configuration of Chroma.6 7If you do not have data you wish to migrate, you only need to change how you construct8your Chroma client. Please see the "New Clients" section of https://docs.trychroma.com/deployment/migration.9________________________________________________________________________________________________10 11If you do have data you wish to migrate, we have a migration tool you can use in order to12migrate your data to the new Chroma architecture.13Please `pip install chroma-migrate` and run `chroma-migrate` to migrate your data and then14change how you construct your Chroma client.15 16See https://docs.trychroma.com/deployment/migration for more information or join our discord at https://discord.gg/MMeYNTmh3x for help!�chroma_db_impl>	�rest�local�duckdb�17clickhouse�duckdb+parquet�chromadb.db.duckdb.DuckDB�chromadb.api.local.LocalAPI�!chromadb.db.clickhouse.Clickhouse�#chromadb.db.duckdb.PersistentDuckDBzchromadb.api.API�chroma_api_implzchromadb.api.ServerAPIz%chromadb.api.async_api.AsyncServerAPIz chromadb.auth.ClientAuthProvider�chroma_client_auth_providerz*chromadb.auth.ServerAuthenticationProvider�chroma_server_authn_providerz)chromadb.auth.ServerAuthorizationProvider�chroma_server_authz_providerzchromadb.db.system.SysDB�chroma_sysdb_implz-chromadb.execution.executor.abstract.Executor�chroma_executor_implzchromadb.ingest.Consumer�chroma_consumer_implzchromadb.ingest.Producer�chroma_producer_implzchromadb.quota.QuotaEnforcer�chroma_quota_enforcer_implz%chromadb.rate_limit.RateLimitEnforcer�chroma_rate_limit_enforcer_implz*chromadb.rate_limit.AsyncRateLimitEnforcer�%chroma_async_rate_limit_enforcer_implzchromadb.segment.SegmentManager�chroma_segment_manager_implz-chromadb.segment.distributed.SegmentDirectory�chroma_segment_directory_implz/chromadb.segment.distributed.MemberlistProvider�chroma_memberlist_provider_implz1chromadb.telemetry.product.ProductTelemetryClient�chroma_product_telemetry_impl�_abstract_type_keys�default_tenant�default_databasec��\rSrSrSrSrSrg)�18APIVersion�Wz/api/v1z/api/v2�N)�__name__�19__module__�__qualname__�__firstlineno__�V1�V2�__static_attributes__r5��UD:\code\apps\devtools\python\user_packages\Python313\site-packages\chromadb/config.pyr3r3Ws��	�B�	�Br=r3c� �\rSrSrSrSrSrSrg)�RoutingMode�_a�20Routing mode for the segment directory21 22node - Assign based on the node name, used in production with multi-node settings with the assumption that23there is one query service pod per node. This is useful for when there is a disk based cache on the24node that we want to route to.25 26id - Assign based on the member id, used in development and testing environments where the node name is not27guaranteed to be unique. (I.e a local development kubernetes env). Or when there are multiple query service28pods per node.29�node�idr5N)r6r7r8r9�__doc__�NODE�IDr<r5r=r>r@r@_s��30��D�	
�Br=r@c���\rSrSr%Sr\\S'Sr\\S'Sr\	\31\S'\"SSS	9\S32\
S\	\334Sj55rS
r\34\S'Sr\\S'Sr\\S'Sr\	\\S'Sr\	\\\4\S'Sr\	\35\S'Sr\	\\S'Sr\	\\\4\S'\R6r\	\\S'/r\\\S'Sr\	\ \S'Sr!\	\36\S'Sr"\	\37\S'Sr#\\S'Sr$\\S 'S!r%\38\S"'Sr&\	\\S#'Sr'\\S$'Sr(\	\\S%'Sr)\	\\S&'Sr*\	\\S''\R6S(/\R6S)3S(/\R6S*3S(/\RVS(/\RVS)3S(/\RVS*3S(/0r,\\\\4\S+'Sr-\\S,'Sr.\	\\S-'Sr/\	\\S.'Sr0\	\\S/'Sr1\	\\S0'Sr2\	\\S1'Sr3\	\\S2'S3r4\\S4'\4r5\\S5'S6r6\\S7'Sr7\	\\S8'S9r8\	\\S:'0r9\\\4\S;'Sr:\	\\S<'S=r;\<S>\S?'S@r=\<SA\SB'SCr>\\SD'\?R�rA\?\SE'SFrB\\SG'SHrC\\SI'SJrD\\SK'SrE\	\39\SL'SMrF\\SN'SMrG\\SO'SMrH\\SP'SQrI\\SR'SSrJ\\ST'SUrK\40\SV'SJrL\\SW'SXrM\41\SY'SrN\	\\SZ'SrO\	\\S['S\rP\\S]'S^rQ\\S_'S`rR\\Sa'SbrS\42\Sc'SbrT\43\Sd'SerU\44\Sf'SrV\	\\Sg'ShrW\\Si'Sj\S\
4SkjrXSj\S\
4SljrYSmSnSoSp.rZSqr[g)r�Settings�p��environmentz!chromadb.api.rust.RustBindingsAPIr N�chroma_server_nofile�before)�mode�v�returnc�Z�[U[5(aUR5S:XagU$)NrJ)�45isinstance�str�strip)�clsrOs  r>�empty_str_to_none�Settings.empty_str_to_none|s%���a����!�'�'�)�r�/���r=�(�chroma_server_thread_pool_size�default�	tenant_id�topic_namespace�chroma_server_host�chroma_server_headers�chroma_server_http_portF�chroma_server_ssl_enabled�chroma_server_ssl_verify�chroma_server_api_default_path� chroma_server_cors_allow_originsgD@�chroma_http_keepalive_secs�chroma_http_max_connections�%chroma_http_max_keepalive_connections�
is_persistentz./chroma�persist_directoryr�chroma_memory_limit_bytes�chroma_segment_cache_policy�allow_reset�"chroma_auth_token_transport_headerr!�chroma_client_auth_credentials�GETz46/heartbeatz/version�chroma_server_auth_ignore_paths�;chroma_overwrite_singleton_tenant_database_access_from_authr"�chroma_server_authn_credentials�$chroma_server_authn_credentials_filer#�chroma_server_authz_config�chroma_server_authz_config_filez*chromadb.telemetry.product.posthog.Posthogr.�chroma_telemetry_implT�anonymized_telemetry�chroma_otel_collection_endpoint�chromadb�chroma_otel_service_name�chroma_otel_collection_headers�chroma_otel_granularity�apply)�none�validater|�47migrations�md5)r��sha256�migrations_hash_algorithmzRchromadb.segment.impl.distributed.segment_directory.RendezvousHashSegmentDirectoryr,�%chroma_segment_directory_routing_modezTchromadb.segment.impl.distributed.segment_directory.CustomResourceMemberlistProviderr-zquery-service-memberlist�worker_memberlist_name�	localhost�chroma_coordinator_host�chroma_server_grpc_portz chromadb.db.impl.sqlite.SqliteDBr$r'r&z7chromadb.segment.impl.manager.local.LocalSegmentManagerr+z/chromadb.execution.executor.local.LocalExecutorr%��chroma_query_replication_factor�chroma_logservice_hosti���chroma_logservice_port�chroma_quota_provider_impl�"chroma_rate_limiting_provider_implz8chromadb.quota.simple_quota_enforcer.SimpleQuotaEnforcerr(z=chromadb.rate_limit.simple_rate_limit.SimpleRateLimitEnforcerr)zBchromadb.rate_limit.simple_rate_limit.SimpleAsyncRateLimitEnforcerr*��)chroma_logservice_request_timeout_seconds�$chroma_sysdb_request_timeout_seconds�<�$chroma_query_request_timeout_secondsrz9chromadb.ingest.impl.simple_policy.SimpleAssignmentPolicy�(chroma_collection_assignment_policy_impl�keyc�2�XnUc[SUS35eU$)zQReturn the value of a required config key, or raise an exception if it is not48setzMissing required config value '�')�49ValueError��selfr��vals   r>�require�Settings.require1s*���i���;��>�s�e�1�E�F�F��50r=c�x�[X5n[U[5(aU[;a[	[515eU$�N)�getattrrRrS�_legacy_config_valuesr��LEGACY_ERRORr�s   r>�__getitem__�Settings.__getitem__9s1���d� ���c�3���C�+@�$@��\�*�*��52r=z.envzutf-8�ignore)�env_file�env_file_encoding�extrar5)\r6r7r8r9rKrS�__annotations__r rLr�intr�classmethodrrVrYr[r\r]r^r	r_r`�boolrarr3r;rbrcrrd�floatrerfrgrhrirjrkrlr!rmr:rorpr"rqrrr#rsrtr.rurvrwryrzr{rrr�r,r@rFr�r-r�r�r�r$r'r&r+r%r�r�r�r�r�r(r)r*r�r�r�rr�r�r��model_configr<r5r=r>rHrHps���53�K���?�O�S�>�*.��(�3�-�.��+�(�;���#��(�3�-���<��+-�"�C�,��I�s��$�O�S�$�(,����
�,�6:��8�D��c��N�3�:�-1��X�c�]�1�05��x��~�5�;?��h�u�T�3�Y�'7�8�?�;E�=�=�"�H�Z�$8�H�24�$�d�3�i�4�26�����6�15���#��5�;?�)�8�C�=�?� �M�4��'��s�'�%&��s�&�15���#��5��K���9=�&���
�<�26���#��5�59�"�H�S�M�8��=�=�/�U�G��=�=�/��$�u�g��=�=�/��"�U�G��=�=�/�U�G��=�=�/��$�u�g��=�=�/��"�U�G�
=�#�T�#�t�C�y�.�%9��IN�?��M�37� �(�3�-�6�59�#�X�c�]�9�:>�(�(�3�-�>�37� �(�3�-�6�04����
�4�59�#�X�c�]�9�*V�!�3�U�!>��3�>�!%��$�%�57�#�X�c�]�7�.8��h�s�m�8�57�"�D��c��N�7�-1��X�c�]�1�8?�J��3�4�>�;@��w��7�?�*~�!�3�}�9D���)�;�G�,B�#�S�B�"<��C�<�#.��S�.�-1��X�c�]�1�?��s�?� B��#�B� B��#�B�	B� ���!R��#�Q�+,�#�S�,�"-��C�-�"'��C�'�04����
�4�8<�&���
�<�	C����54	H�$�S��55	M�*�3��67�-�s�6�01�(�#�1�02�(�#�2�%)�N�H�S�M�(�C�-�c���3��3���s��s��!'�W�x�X�Lr=rH�T�	Component)�boundc��\rSrSr%\S\S'S\S'\\S'SSjrS\\	S\	4S	jr56S\S4S57jrSSjrSS
jr
SSjrSrg)r�iF�
_dependencies�System�_system�_runningc�<�[5UlXlSUlg)NF)�setr�r�r�)r��systems  r>�__init__�Component.__init__Ks�� �U�������
r=�typerPc�r�URRU5nURRU5 U$)zZGet a Component instance of the given type, and register as a dependency of58that instance.)r��instancer��add)r�r��insts   r>r��Component.requirePs1���|�|�$�$�T�*�������t�$��r=c��UR$)z<Return the full set of components this component depends on.)r��r�s r>�dependencies�Component.dependenciesWs���!�!�!r=Nc�j�[RSURR35 SUlg)zOIdempotently stop this component's execution and free all associated59resources.zStopping component FN��logger�debug�	__class__r6r�r�s r>�stop�Component.stop[s*��	���*�4�>�>�+B�+B�*C�D�E���
r=c�j�[RSURR35 SUlg)z-Idempotently start this component's executionzStarting component TNr�r�s r>�start�Component.startas(�����*�4�>�>�+B�+B�*C�D�E���
r=c�\�[RSURR35 g)z_Reset this component's state to its initial blank state. Only intended to be60called from tests.zResetting component N)r�r�r�r6r�s r>�reset_state�Component.reset_statefs#��	���+�D�N�N�,C�,C�+D�E�Fr=)r�r�r�)r�r��rPN)r6r7r8r9r61r�r�r�r
r�r�r�r�r�r�r<r5r=r>r�r�FsU���{�#�#�
���N��62�D��G����"�c�+�.�"���63Gr=c��^�\rSrSr%\\S'\\\\4\S'S\4U4Sjjr	S\\64S\654SjrS\\4Sjr
\S
U4S	jj5r\S
U4S66jj5r\S
Sj5rSrU=r$)r�il�settings�67_instancesc	�`>�[(aUSS;a[S5e[HnXcM68[[5e USb<USS:wa3[69R
S5 USS:Xa[70R
S	5 US71b�[R"5S:wa�SSK	nURUR5upEUS72nXe:�a[R"SUS
U35 OsXd:�a7URURXe45 [73RSU35 O7Xd:a[74RSUSUS35 O[75RS5 Xl0Ul[&TU]QU5 g![ a(n[76R
SUSUSU35 SnANJSnAff=f)Nr )zchromadb.api.fastapi.FastAPIz'chromadb.api.async_fastapi.AsyncFastAPIaChroma is running in http-only client mode, and can only be run with 'chromadb.api.fastapi.FastAPI' or 'chromadb.api.async_fastapi.AsyncFastAPI' as the chroma_api_impl.             see https://docs.trychroma.com/guides#using-the-python-http-only-client for more information.rj�LRUzAFailed to set chroma_segment_cache_policy: Only LRU is available.rirzPFailed to set chroma_segment_cache_policy: chroma_memory_limit_bytes is require.rL�WindowszUchroma_server_nofile cannot be set to a value greater than the current hard limit of z. Keeping soft limit at zSet chroma_server_nofile to z&Failed to set chroma_server_nofile to z: z" nofile soft limit will remain at zchroma_server_nofile is set to z., but this is less than current soft limit of z'. chroma_server_nofile will not be set.zWchroma_server_nofile is not supported on Windows. chroma_server_nofile will not be set.)r�RuntimeError�_legacy_config_keysr�r�r��error�platformr��resource�	getrlimit�
RLIMIT_NOFILE�logging�warning�	setrlimit�info�	Exceptionr�r��superr�)	r�r�r�r��	curr_soft�	curr_hard�desired_soft�er�s	        �r>r��System.__init__ps�����>��)�*�3��#�k���77'�C��}�(� ��.�.�'�78
�2�3�?��6�7�5�@��L�L�S�
��3�4��9����f��79�*�+�7���� �I�-��'/�'9�'9�(�:P�:P�'Q�$�	�'�(>�?���+��O�O�o�py�oz�{S�T]�S^�_��"�-�� �*�*�$�2�2�\�4M�����&B�<�.�$Q�R�"�-��N�N�9�,��Gu�v�vA�Ah�i������m��!�
����
������!%�����D�\�N�RT�UV�TW�Wy�{D�zE�F�����s�15E;�;80F-�F(�(F-r�rPc��[R"U5(aR[U5nU[;a[	SU35e[UnUR81R
U5n[XA5nXR;a7U"U5nXPRU'UR(aUR5 URUn[[U5$)ztReturn an instance of the component type specified. If the system is running,82the component will be started as well.z"Cannot instantiate abstract type: )
�inspect�83isabstract�get_fqnr/r�r�r��	get_classr�r�r�rr�)r�r��type_fqnr��fqn�implr�s       r>r��System.instance�s������d�#�#��t�}�H��2�2� �#E�d�V�!L�M�M�%�h�/�C��-�-�'�'��,�C��S�'�D����&���:�D�$(�O�O�D�!��}�}��84�85�����t�$���A�t�}�r=c��[5nURR5H$nUR"U/UR	5Q76 M& UR5$)zQReturn the full set of all components and their dependencies in dependency86order.)rr��valuesr�r��static_order)r��sorter�	components   r>�87components�System.components�sO��0A�/B�����/�/�1�I��J�J�y�<�9�#9�#9�#;�<�2��"�"�$�$r=c�p>�[TU]5 UR5HnUR5 M gr�)r�r�r��r�r�r�s  �r>r��System.start�s'���
��
�����*�I��O�O��+r=c�>�[TU]5 [[UR	555HnUR5 M gr�)r�r��reversed�listr�r�s  �r>r��System.stop�s1���
����!�$�t���'8�"9�:�I��N�N��;r=c���URR(d[S5e[[	UR555HnUR
5 M g)zOReset the state of this system and all constituents in reverse dependency orderz�Resetting is not allowed by this configuration (to enable it, set `allow_reset` to `True` in your Settings() or include `ALLOW_RESET=TRUE` in your environment variables)N)r�rkr�r�rr�r�)r�r�s  r>r��System.reset_state�sM���}�}�(�(��|��
�"�$�t���'8�"9�:�I��!�!�#�;r=)r�r�r�)r6r7r8r9rHr�r	r
r�r�r�r�rr�rr�r�r�r<�
__classcell__)r�s@r>r�r�ls�������T�)�_�i�/�0�0�?��?�B�T�!�W����*%�H�Y�/�%�����88����89�$��$r=r��Cr�r�rPc��URSS5up#[R"U5n[XC5n[	[90[U5$)zIGiven a fully qualifed class name, import the module and return the class�.�)�rsplit�	importlib�
import_moduler�rr
r)r�r��module_name�91class_name�modulerUs      r>r�r��s@��!�j�j��a�0��K�
�
$�
$�[�
1�F�92�&�93%�C���Q����r=rUc�8�URSUR3$)z.Given a class, return its fully qualified namer)r7r6)rUs r>r�r��s���n�n�
�Q�s�|�|�n�-�-r=)6r94r�r��abcr�enumr�graphlibr�typingrrrr	r95rrr
rr�	overridesrr�typing_extensionsrr��pydanticr�pydantic_settingsrr�chromadb.is_thin_client�ImportError�	getLoggerr6r�r�r�r�r/rSr��DEFAULT_TENANT�DEFAULT_DATABASEr3r@rHr�r�r�rr��objectr�r5r=r>�<module>rs,�������&�B�B�B�&�&�&��%��$�*����6�96�	�	�8�	$��R�����97�� '��)�	'�98�/�'�,�->�
'�'�(E�'�1�2P�'�0�1O�'�� 3�'�4�5K�'�� 6�'�� 6�'�#�$@�'�,�-N�'� 1�2Y�!'�"&�'D�#'�$4�5T�%'�&6�7X�''�(8�9X�)'��T�#�s�(�^��."��%����d���$��"PY�|�PY�f�C�{�#��#G��%�#G�Lw$�Y�w$�t�C�L���3��d�1�g��$�q�'��.��f��.�#�.��w���N��s�!D+�+D6�5D6
codekingpro/portable-devtools · Team Ai