pixeltable 0.2.26__py3-none-any.whl → 0.5.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pixeltable/__init__.py +83 -19
- pixeltable/_query.py +1444 -0
- pixeltable/_version.py +1 -0
- pixeltable/catalog/__init__.py +7 -4
- pixeltable/catalog/catalog.py +2394 -119
- pixeltable/catalog/column.py +225 -104
- pixeltable/catalog/dir.py +38 -9
- pixeltable/catalog/globals.py +53 -34
- pixeltable/catalog/insertable_table.py +265 -115
- pixeltable/catalog/path.py +80 -17
- pixeltable/catalog/schema_object.py +28 -43
- pixeltable/catalog/table.py +1270 -677
- pixeltable/catalog/table_metadata.py +103 -0
- pixeltable/catalog/table_version.py +1270 -751
- pixeltable/catalog/table_version_handle.py +109 -0
- pixeltable/catalog/table_version_path.py +137 -42
- pixeltable/catalog/tbl_ops.py +53 -0
- pixeltable/catalog/update_status.py +191 -0
- pixeltable/catalog/view.py +251 -134
- pixeltable/config.py +215 -0
- pixeltable/env.py +736 -285
- pixeltable/exceptions.py +26 -2
- pixeltable/exec/__init__.py +7 -2
- pixeltable/exec/aggregation_node.py +39 -21
- pixeltable/exec/cache_prefetch_node.py +87 -109
- pixeltable/exec/cell_materialization_node.py +268 -0
- pixeltable/exec/cell_reconstruction_node.py +168 -0
- pixeltable/exec/component_iteration_node.py +25 -28
- pixeltable/exec/data_row_batch.py +11 -46
- pixeltable/exec/exec_context.py +26 -11
- pixeltable/exec/exec_node.py +35 -27
- pixeltable/exec/expr_eval/__init__.py +3 -0
- pixeltable/exec/expr_eval/evaluators.py +365 -0
- pixeltable/exec/expr_eval/expr_eval_node.py +413 -0
- pixeltable/exec/expr_eval/globals.py +200 -0
- pixeltable/exec/expr_eval/row_buffer.py +74 -0
- pixeltable/exec/expr_eval/schedulers.py +413 -0
- pixeltable/exec/globals.py +35 -0
- pixeltable/exec/in_memory_data_node.py +35 -27
- pixeltable/exec/object_store_save_node.py +293 -0
- pixeltable/exec/row_update_node.py +44 -29
- pixeltable/exec/sql_node.py +414 -115
- pixeltable/exprs/__init__.py +8 -5
- pixeltable/exprs/arithmetic_expr.py +79 -45
- pixeltable/exprs/array_slice.py +5 -5
- pixeltable/exprs/column_property_ref.py +40 -26
- pixeltable/exprs/column_ref.py +254 -61
- pixeltable/exprs/comparison.py +14 -9
- pixeltable/exprs/compound_predicate.py +9 -10
- pixeltable/exprs/data_row.py +213 -72
- pixeltable/exprs/expr.py +270 -104
- pixeltable/exprs/expr_dict.py +6 -5
- pixeltable/exprs/expr_set.py +20 -11
- pixeltable/exprs/function_call.py +383 -284
- pixeltable/exprs/globals.py +18 -5
- pixeltable/exprs/in_predicate.py +7 -7
- pixeltable/exprs/inline_expr.py +37 -37
- pixeltable/exprs/is_null.py +8 -4
- pixeltable/exprs/json_mapper.py +120 -54
- pixeltable/exprs/json_path.py +90 -60
- pixeltable/exprs/literal.py +61 -16
- pixeltable/exprs/method_ref.py +7 -6
- pixeltable/exprs/object_ref.py +19 -8
- pixeltable/exprs/row_builder.py +238 -75
- pixeltable/exprs/rowid_ref.py +53 -15
- pixeltable/exprs/similarity_expr.py +65 -50
- pixeltable/exprs/sql_element_cache.py +5 -5
- pixeltable/exprs/string_op.py +107 -0
- pixeltable/exprs/type_cast.py +25 -13
- pixeltable/exprs/variable.py +2 -2
- pixeltable/func/__init__.py +9 -5
- pixeltable/func/aggregate_function.py +197 -92
- pixeltable/func/callable_function.py +119 -35
- pixeltable/func/expr_template_function.py +101 -48
- pixeltable/func/function.py +375 -62
- pixeltable/func/function_registry.py +20 -19
- pixeltable/func/globals.py +6 -5
- pixeltable/func/mcp.py +74 -0
- pixeltable/func/query_template_function.py +151 -35
- pixeltable/func/signature.py +178 -49
- pixeltable/func/tools.py +164 -0
- pixeltable/func/udf.py +176 -53
- pixeltable/functions/__init__.py +44 -4
- pixeltable/functions/anthropic.py +226 -47
- pixeltable/functions/audio.py +148 -11
- pixeltable/functions/bedrock.py +137 -0
- pixeltable/functions/date.py +188 -0
- pixeltable/functions/deepseek.py +113 -0
- pixeltable/functions/document.py +81 -0
- pixeltable/functions/fal.py +76 -0
- pixeltable/functions/fireworks.py +72 -20
- pixeltable/functions/gemini.py +249 -0
- pixeltable/functions/globals.py +208 -53
- pixeltable/functions/groq.py +108 -0
- pixeltable/functions/huggingface.py +1088 -95
- pixeltable/functions/image.py +155 -84
- pixeltable/functions/json.py +8 -11
- pixeltable/functions/llama_cpp.py +31 -19
- pixeltable/functions/math.py +169 -0
- pixeltable/functions/mistralai.py +50 -75
- pixeltable/functions/net.py +70 -0
- pixeltable/functions/ollama.py +29 -36
- pixeltable/functions/openai.py +548 -160
- pixeltable/functions/openrouter.py +143 -0
- pixeltable/functions/replicate.py +15 -14
- pixeltable/functions/reve.py +250 -0
- pixeltable/functions/string.py +310 -85
- pixeltable/functions/timestamp.py +37 -19
- pixeltable/functions/together.py +77 -120
- pixeltable/functions/twelvelabs.py +188 -0
- pixeltable/functions/util.py +7 -2
- pixeltable/functions/uuid.py +30 -0
- pixeltable/functions/video.py +1528 -117
- pixeltable/functions/vision.py +26 -26
- pixeltable/functions/voyageai.py +289 -0
- pixeltable/functions/whisper.py +19 -10
- pixeltable/functions/whisperx.py +179 -0
- pixeltable/functions/yolox.py +112 -0
- pixeltable/globals.py +716 -236
- pixeltable/index/__init__.py +3 -1
- pixeltable/index/base.py +17 -21
- pixeltable/index/btree.py +32 -22
- pixeltable/index/embedding_index.py +155 -92
- pixeltable/io/__init__.py +12 -7
- pixeltable/io/datarows.py +140 -0
- pixeltable/io/external_store.py +83 -125
- pixeltable/io/fiftyone.py +24 -33
- pixeltable/io/globals.py +47 -182
- pixeltable/io/hf_datasets.py +96 -127
- pixeltable/io/label_studio.py +171 -156
- pixeltable/io/lancedb.py +3 -0
- pixeltable/io/pandas.py +136 -115
- pixeltable/io/parquet.py +40 -153
- pixeltable/io/table_data_conduit.py +702 -0
- pixeltable/io/utils.py +100 -0
- pixeltable/iterators/__init__.py +8 -4
- pixeltable/iterators/audio.py +207 -0
- pixeltable/iterators/base.py +9 -3
- pixeltable/iterators/document.py +144 -87
- pixeltable/iterators/image.py +17 -38
- pixeltable/iterators/string.py +15 -12
- pixeltable/iterators/video.py +523 -127
- pixeltable/metadata/__init__.py +33 -8
- pixeltable/metadata/converters/convert_10.py +2 -3
- pixeltable/metadata/converters/convert_13.py +2 -2
- pixeltable/metadata/converters/convert_15.py +15 -11
- pixeltable/metadata/converters/convert_16.py +4 -5
- pixeltable/metadata/converters/convert_17.py +4 -5
- pixeltable/metadata/converters/convert_18.py +4 -6
- pixeltable/metadata/converters/convert_19.py +6 -9
- pixeltable/metadata/converters/convert_20.py +3 -6
- pixeltable/metadata/converters/convert_21.py +6 -8
- pixeltable/metadata/converters/convert_22.py +3 -2
- pixeltable/metadata/converters/convert_23.py +33 -0
- pixeltable/metadata/converters/convert_24.py +55 -0
- pixeltable/metadata/converters/convert_25.py +19 -0
- pixeltable/metadata/converters/convert_26.py +23 -0
- pixeltable/metadata/converters/convert_27.py +29 -0
- pixeltable/metadata/converters/convert_28.py +13 -0
- pixeltable/metadata/converters/convert_29.py +110 -0
- pixeltable/metadata/converters/convert_30.py +63 -0
- pixeltable/metadata/converters/convert_31.py +11 -0
- pixeltable/metadata/converters/convert_32.py +15 -0
- pixeltable/metadata/converters/convert_33.py +17 -0
- pixeltable/metadata/converters/convert_34.py +21 -0
- pixeltable/metadata/converters/convert_35.py +9 -0
- pixeltable/metadata/converters/convert_36.py +38 -0
- pixeltable/metadata/converters/convert_37.py +15 -0
- pixeltable/metadata/converters/convert_38.py +39 -0
- pixeltable/metadata/converters/convert_39.py +124 -0
- pixeltable/metadata/converters/convert_40.py +73 -0
- pixeltable/metadata/converters/convert_41.py +12 -0
- pixeltable/metadata/converters/convert_42.py +9 -0
- pixeltable/metadata/converters/convert_43.py +44 -0
- pixeltable/metadata/converters/util.py +44 -18
- pixeltable/metadata/notes.py +21 -0
- pixeltable/metadata/schema.py +185 -42
- pixeltable/metadata/utils.py +74 -0
- pixeltable/mypy/__init__.py +3 -0
- pixeltable/mypy/mypy_plugin.py +123 -0
- pixeltable/plan.py +616 -225
- pixeltable/share/__init__.py +3 -0
- pixeltable/share/packager.py +797 -0
- pixeltable/share/protocol/__init__.py +33 -0
- pixeltable/share/protocol/common.py +165 -0
- pixeltable/share/protocol/operation_types.py +33 -0
- pixeltable/share/protocol/replica.py +119 -0
- pixeltable/share/publish.py +349 -0
- pixeltable/store.py +398 -232
- pixeltable/type_system.py +730 -267
- pixeltable/utils/__init__.py +40 -0
- pixeltable/utils/arrow.py +201 -29
- pixeltable/utils/av.py +298 -0
- pixeltable/utils/azure_store.py +346 -0
- pixeltable/utils/coco.py +26 -27
- pixeltable/utils/code.py +4 -4
- pixeltable/utils/console_output.py +46 -0
- pixeltable/utils/coroutine.py +24 -0
- pixeltable/utils/dbms.py +92 -0
- pixeltable/utils/description_helper.py +11 -12
- pixeltable/utils/documents.py +60 -61
- pixeltable/utils/exception_handler.py +36 -0
- pixeltable/utils/filecache.py +38 -22
- pixeltable/utils/formatter.py +88 -51
- pixeltable/utils/gcs_store.py +295 -0
- pixeltable/utils/http.py +133 -0
- pixeltable/utils/http_server.py +14 -13
- pixeltable/utils/iceberg.py +13 -0
- pixeltable/utils/image.py +17 -0
- pixeltable/utils/lancedb.py +90 -0
- pixeltable/utils/local_store.py +322 -0
- pixeltable/utils/misc.py +5 -0
- pixeltable/utils/object_stores.py +573 -0
- pixeltable/utils/pydantic.py +60 -0
- pixeltable/utils/pytorch.py +20 -20
- pixeltable/utils/s3_store.py +527 -0
- pixeltable/utils/sql.py +32 -5
- pixeltable/utils/system.py +30 -0
- pixeltable/utils/transactional_directory.py +4 -3
- pixeltable-0.5.7.dist-info/METADATA +579 -0
- pixeltable-0.5.7.dist-info/RECORD +227 -0
- {pixeltable-0.2.26.dist-info → pixeltable-0.5.7.dist-info}/WHEEL +1 -1
- pixeltable-0.5.7.dist-info/entry_points.txt +2 -0
- pixeltable/__version__.py +0 -3
- pixeltable/catalog/named_function.py +0 -36
- pixeltable/catalog/path_dict.py +0 -141
- pixeltable/dataframe.py +0 -894
- pixeltable/exec/expr_eval_node.py +0 -232
- pixeltable/ext/__init__.py +0 -14
- pixeltable/ext/functions/__init__.py +0 -8
- pixeltable/ext/functions/whisperx.py +0 -77
- pixeltable/ext/functions/yolox.py +0 -157
- pixeltable/tool/create_test_db_dump.py +0 -311
- pixeltable/tool/create_test_video.py +0 -81
- pixeltable/tool/doc_plugins/griffe.py +0 -50
- pixeltable/tool/doc_plugins/mkdocstrings.py +0 -6
- pixeltable/tool/doc_plugins/templates/material/udf.html.jinja +0 -135
- pixeltable/tool/embed_udf.py +0 -9
- pixeltable/tool/mypy_plugin.py +0 -55
- pixeltable/utils/media_store.py +0 -76
- pixeltable/utils/s3.py +0 -16
- pixeltable-0.2.26.dist-info/METADATA +0 -400
- pixeltable-0.2.26.dist-info/RECORD +0 -156
- pixeltable-0.2.26.dist-info/entry_points.txt +0 -3
- {pixeltable-0.2.26.dist-info → pixeltable-0.5.7.dist-info/licenses}/LICENSE +0 -0
pixeltable/config.py
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import logging
|
|
4
|
+
import os
|
|
5
|
+
import shutil
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
from typing import Any, ClassVar, TypeVar
|
|
8
|
+
|
|
9
|
+
import toml
|
|
10
|
+
|
|
11
|
+
from pixeltable import env, exceptions as excs
|
|
12
|
+
|
|
13
|
+
_logger = logging.getLogger('pixeltable')
|
|
14
|
+
|
|
15
|
+
T = TypeVar('T')
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Config:
|
|
19
|
+
"""
|
|
20
|
+
The (global) Pixeltable configuration, as loaded from `config.toml`. Provides methods for retrieving
|
|
21
|
+
configuration values, which can be set in the config file or as environment variables.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
__instance: ClassVar[Config | None] = None
|
|
25
|
+
|
|
26
|
+
__home: Path
|
|
27
|
+
__config_file: Path
|
|
28
|
+
__config_overrides: dict[str, Any]
|
|
29
|
+
__config_dict: dict[str, Any]
|
|
30
|
+
|
|
31
|
+
def __init__(self, config_overrides: dict[str, Any]) -> None:
|
|
32
|
+
assert self.__instance is None, 'Config is a singleton; use Config.get() to access the instance'
|
|
33
|
+
|
|
34
|
+
for var in config_overrides:
|
|
35
|
+
if var not in KNOWN_CONFIG_OVERRIDES:
|
|
36
|
+
raise excs.Error(f'Unrecognized configuration variable: {var}')
|
|
37
|
+
|
|
38
|
+
self.__config_overrides = config_overrides
|
|
39
|
+
|
|
40
|
+
self.__home = Path(self.lookup_env('pixeltable', 'home', str(Path.home() / '.pixeltable')))
|
|
41
|
+
if self.__home.exists() and not self.__home.is_dir():
|
|
42
|
+
raise excs.Error(f'Not a directory: {self.__home}')
|
|
43
|
+
if not self.__home.exists():
|
|
44
|
+
print(f'Creating a Pixeltable instance at: {self.__home}')
|
|
45
|
+
self.__home.mkdir()
|
|
46
|
+
|
|
47
|
+
self.__config_file = Path(self.lookup_env('pixeltable', 'config', str(self.__home / 'config.toml')))
|
|
48
|
+
|
|
49
|
+
self.__config_dict: dict[str, Any]
|
|
50
|
+
if os.path.isfile(self.__config_file):
|
|
51
|
+
with open(self.__config_file, 'r', encoding='utf-8') as stream:
|
|
52
|
+
try:
|
|
53
|
+
self.__config_dict = toml.load(stream)
|
|
54
|
+
except Exception as exc:
|
|
55
|
+
raise excs.Error(f'Could not read config file: {self.__config_file}') from exc
|
|
56
|
+
for section, section_dict in self.__config_dict.items():
|
|
57
|
+
if section not in KNOWN_CONFIG_OPTIONS:
|
|
58
|
+
raise excs.Error(f'Unrecognized section {section!r} in config file: {self.__config_file}')
|
|
59
|
+
for key in section_dict:
|
|
60
|
+
if key not in KNOWN_CONFIG_OPTIONS[section]:
|
|
61
|
+
raise excs.Error(f"Unrecognized option '{section}.{key}' in config file: {self.__config_file}")
|
|
62
|
+
else:
|
|
63
|
+
self.__config_dict = self.__create_default_config(self.__config_file)
|
|
64
|
+
with open(self.__config_file, 'w', encoding='utf-8') as stream:
|
|
65
|
+
try:
|
|
66
|
+
toml.dump(self.__config_dict, stream)
|
|
67
|
+
except Exception as exc:
|
|
68
|
+
raise excs.Error(f'Could not write config file: {self.__config_file}') from exc
|
|
69
|
+
_logger.info(f'Created default config file at: {self.__config_file}')
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def home(self) -> Path:
|
|
73
|
+
return self.__home
|
|
74
|
+
|
|
75
|
+
@property
|
|
76
|
+
def config_file(self) -> Path:
|
|
77
|
+
return self.__config_file
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def get(cls) -> Config:
|
|
81
|
+
cls.init({})
|
|
82
|
+
return cls.__instance
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def init(cls, config_overrides: dict[str, Any], reinit: bool = False) -> None:
|
|
86
|
+
if reinit:
|
|
87
|
+
cls.__instance = None
|
|
88
|
+
for cl in env._registered_clients.values():
|
|
89
|
+
cl.client_obj = None
|
|
90
|
+
if cls.__instance is None:
|
|
91
|
+
cls.__instance = cls(config_overrides)
|
|
92
|
+
elif len(config_overrides) > 0:
|
|
93
|
+
raise excs.Error(
|
|
94
|
+
'Pixeltable has already been initialized; cannot specify new config values in the same session'
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
@classmethod
|
|
98
|
+
def __create_default_config(cls, config_path: Path) -> dict[str, Any]:
|
|
99
|
+
free_disk_space_bytes = shutil.disk_usage(config_path.parent).free
|
|
100
|
+
# Default cache size is 1/5 of free disk space
|
|
101
|
+
file_cache_size_g = free_disk_space_bytes / 5 / (1 << 30)
|
|
102
|
+
return {'pixeltable': {'file_cache_size_g': round(file_cache_size_g, 1), 'hide_warnings': False}}
|
|
103
|
+
|
|
104
|
+
def lookup_env(self, section: str, key: str, default: Any = None) -> Any:
|
|
105
|
+
override_var = f'{section}.{key}'
|
|
106
|
+
env_var = f'{section.upper()}_{key.upper()}'
|
|
107
|
+
if override_var in self.__config_overrides:
|
|
108
|
+
return self.__config_overrides[override_var]
|
|
109
|
+
if env_var in os.environ and len(os.environ[env_var]) > 0:
|
|
110
|
+
return os.environ[env_var]
|
|
111
|
+
return default
|
|
112
|
+
|
|
113
|
+
def get_value(self, key: str, expected_type: type[T], section: str = 'pixeltable') -> T | None:
|
|
114
|
+
value: Any = self.lookup_env(section, key) # Try to get from environment first
|
|
115
|
+
# Next try the config file
|
|
116
|
+
if value is None:
|
|
117
|
+
# Resolve nested section dicts
|
|
118
|
+
lookup_elems = [*section.split('.'), key]
|
|
119
|
+
value = self.__config_dict
|
|
120
|
+
for el in lookup_elems:
|
|
121
|
+
if isinstance(value, dict):
|
|
122
|
+
if el not in value:
|
|
123
|
+
return None
|
|
124
|
+
value = value[el]
|
|
125
|
+
else:
|
|
126
|
+
return None
|
|
127
|
+
|
|
128
|
+
if value is None:
|
|
129
|
+
return None # Not specified
|
|
130
|
+
|
|
131
|
+
try:
|
|
132
|
+
if expected_type is bool and isinstance(value, str):
|
|
133
|
+
if value.lower() not in ('true', 'false'):
|
|
134
|
+
raise excs.Error(f"Invalid value for configuration parameter '{section}.{key}': {value}")
|
|
135
|
+
return value.lower() == 'true' # type: ignore[return-value]
|
|
136
|
+
return expected_type(value) # type: ignore[call-arg]
|
|
137
|
+
except (ValueError, TypeError) as exc:
|
|
138
|
+
raise excs.Error(f"Invalid value for configuration parameter '{section}.{key}': {value}") from exc
|
|
139
|
+
|
|
140
|
+
def get_string_value(self, key: str, section: str = 'pixeltable') -> str | None:
|
|
141
|
+
return self.get_value(key, str, section)
|
|
142
|
+
|
|
143
|
+
def get_int_value(self, key: str, section: str = 'pixeltable') -> int | None:
|
|
144
|
+
return self.get_value(key, int, section)
|
|
145
|
+
|
|
146
|
+
def get_float_value(self, key: str, section: str = 'pixeltable') -> float | None:
|
|
147
|
+
return self.get_value(key, float, section)
|
|
148
|
+
|
|
149
|
+
def get_bool_value(self, key: str, section: str = 'pixeltable') -> bool | None:
|
|
150
|
+
return self.get_value(key, bool, section)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
KNOWN_CONFIG_OPTIONS = {
|
|
154
|
+
'pixeltable': {
|
|
155
|
+
'home': 'Path to the Pixeltable home directory',
|
|
156
|
+
'config': 'Path to the Pixeltable config file',
|
|
157
|
+
'pgdata': 'Path to the Pixeltable postgres data directory',
|
|
158
|
+
'db': 'Postgres database name',
|
|
159
|
+
'file_cache_size_g': 'Size of the file cache in GB',
|
|
160
|
+
'time_zone': 'Default time zone for timestamps',
|
|
161
|
+
'hide_warnings': 'Hide warnings from the console',
|
|
162
|
+
'verbosity': 'Verbosity level for console output',
|
|
163
|
+
'api_key': 'API key for Pixeltable cloud',
|
|
164
|
+
'input_media_dest': 'Default destination URI for input media data',
|
|
165
|
+
'output_media_dest': 'Default destination URI for output (computed) media data',
|
|
166
|
+
'r2_profile': 'AWS config profile name used to access R2 storage',
|
|
167
|
+
's3_profile': 'AWS config profile name used to access S3 storage',
|
|
168
|
+
'b2_profile': 'AWS config profile name used to access Backblaze B2 storage',
|
|
169
|
+
'tigris_profile': 'AWS config profile name used to access Tigris object storage',
|
|
170
|
+
},
|
|
171
|
+
'anthropic': {'api_key': 'Anthropic API key'},
|
|
172
|
+
'azure': {'storage_account_name': 'Azure storage account name', 'storage_account_key': 'Azure storage account key'},
|
|
173
|
+
'bedrock': {'api_key': 'AWS Bedrock API key'},
|
|
174
|
+
'deepseek': {'api_key': 'Deepseek API key', 'rate_limit': 'Rate limit for Deepseek API requests'},
|
|
175
|
+
'fal': {'api_key': 'fal.ai API key', 'rate_limit': 'Rate limit for fal.ai API requests'},
|
|
176
|
+
'fireworks': {'api_key': 'Fireworks API key', 'rate_limit': 'Rate limit for Fireworks API requests'},
|
|
177
|
+
'gemini': {'api_key': 'Gemini API key', 'rate_limits': 'Per-model rate limits for Gemini API requests'},
|
|
178
|
+
'hf': {'auth_token': 'Hugging Face access token'},
|
|
179
|
+
'imagen': {'rate_limits': 'Per-model rate limits for Imagen API requests'},
|
|
180
|
+
'reve': {'api_key': 'Reve API key', 'rate_limit': 'Rate limit for Reve API requests (requests per minute)'},
|
|
181
|
+
'groq': {'api_key': 'Groq API key', 'rate_limit': 'Rate limit for Groq API requests'},
|
|
182
|
+
'label_studio': {'api_key': 'Label Studio API key', 'url': 'Label Studio server URL'},
|
|
183
|
+
'mistral': {'api_key': 'Mistral API key', 'rate_limit': 'Rate limit for Mistral API requests'},
|
|
184
|
+
'openai': {
|
|
185
|
+
'api_key': 'OpenAI API key',
|
|
186
|
+
'base_url': 'OpenAI API base URL',
|
|
187
|
+
'api_version': 'API version if using Azure OpenAI',
|
|
188
|
+
'rate_limits': 'Per-model rate limits for OpenAI API requests',
|
|
189
|
+
'max_connections': 'Maximum number of concurrent OpenAI API connections that can be established',
|
|
190
|
+
'max_keepalive_connections': 'Maximum number of keep-alive connections in the pool.'
|
|
191
|
+
' Must not exceed max_connections.',
|
|
192
|
+
},
|
|
193
|
+
'openrouter': {
|
|
194
|
+
'api_key': 'OpenRouter API key',
|
|
195
|
+
'site_url': 'Optional URL for your application (for OpenRouter analytics)',
|
|
196
|
+
'app_name': 'Optional name for your application (for OpenRouter analytics)',
|
|
197
|
+
'rate_limit': 'Rate limit for OpenRouter API requests',
|
|
198
|
+
},
|
|
199
|
+
'replicate': {'api_token': 'Replicate API token'},
|
|
200
|
+
'together': {
|
|
201
|
+
'api_key': 'Together API key',
|
|
202
|
+
'rate_limits': 'Per-model category rate limits for Together API requests',
|
|
203
|
+
},
|
|
204
|
+
'twelvelabs': {'api_key': 'TwelveLabs API key', 'rate_limit': 'Rate limit for TwelveLabs API requests'},
|
|
205
|
+
'veo': {'rate_limits': 'Per-model rate limits for Veo API requests'},
|
|
206
|
+
'voyage': {'api_key': 'Voyage AI API key', 'rate_limit': 'Rate limit for Voyage AI API requests'},
|
|
207
|
+
'pypi': {'api_key': 'PyPI API key (for internal use only)'},
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
KNOWN_CONFIG_OVERRIDES = {
|
|
212
|
+
f'{section}.{key}': info
|
|
213
|
+
for section, section_dict in KNOWN_CONFIG_OPTIONS.items()
|
|
214
|
+
for key, info in section_dict.items()
|
|
215
|
+
}
|