glchat-plugin 0.4.1__py3-none-any.whl → 0.4.2__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.
- glchat_plugin/pipeline/pipeline_handler.py +12 -7
- {glchat_plugin-0.4.1.dist-info → glchat_plugin-0.4.2.dist-info}/METADATA +1 -1
- {glchat_plugin-0.4.1.dist-info → glchat_plugin-0.4.2.dist-info}/RECORD +5 -5
- {glchat_plugin-0.4.1.dist-info → glchat_plugin-0.4.2.dist-info}/WHEEL +0 -0
- {glchat_plugin-0.4.1.dist-info → glchat_plugin-0.4.2.dist-info}/top_level.txt +0 -0
|
@@ -166,7 +166,7 @@ class PipelineHandler(PluginHandler):
|
|
|
166
166
|
if pipeline_type != instance._chatbot_configs[chatbot_organization_id].pipeline_type:
|
|
167
167
|
continue
|
|
168
168
|
|
|
169
|
-
await cls._build_plugin(instance, chatbot_id, preset.supported_models, plugin)
|
|
169
|
+
await cls._build_plugin(instance, chatbot_id, preset.supported_models, plugin, organization_id)
|
|
170
170
|
except Exception as e:
|
|
171
171
|
logger.warning(f"Failed when ainit pliugin {traceback.format_exc()}")
|
|
172
172
|
logger.warning(f"Error initializing plugin for chatbot `{chatbot_id}`: {e}")
|
|
@@ -186,7 +186,12 @@ class PipelineHandler(PluginHandler):
|
|
|
186
186
|
|
|
187
187
|
@classmethod
|
|
188
188
|
async def _build_plugin(
|
|
189
|
-
cls,
|
|
189
|
+
cls,
|
|
190
|
+
instance: "PipelineHandler",
|
|
191
|
+
chatbot_id: str,
|
|
192
|
+
supported_models: list[dict[str, Any]],
|
|
193
|
+
plugin: Plugin,
|
|
194
|
+
organization_id: str = DEFAULT_ORGANIZATION_ID,
|
|
190
195
|
) -> None:
|
|
191
196
|
"""Build a plugin for the given chatbot.
|
|
192
197
|
|
|
@@ -195,8 +200,8 @@ class PipelineHandler(PluginHandler):
|
|
|
195
200
|
chatbot_id (str): The chatbot ID.
|
|
196
201
|
supported_models (list[dict[str, Any]]): List of models (including config).
|
|
197
202
|
plugin (Plugin): The pipeline builder plugin instance.
|
|
203
|
+
organization_id (str): The organization ID.
|
|
198
204
|
"""
|
|
199
|
-
organization_id = plugin.organization_id
|
|
200
205
|
chatbot_organization_id = (chatbot_id, organization_id)
|
|
201
206
|
plugin.prompt_builder_catalogs = instance._chatbot_configs[chatbot_organization_id].prompt_builder_catalogs
|
|
202
207
|
plugin.lmrp_catalogs = instance._chatbot_configs[chatbot_organization_id].lmrp_catalogs
|
|
@@ -376,7 +381,7 @@ class PipelineHandler(PluginHandler):
|
|
|
376
381
|
return
|
|
377
382
|
|
|
378
383
|
# Use the existing _build_plugin method to rebuild the pipeline
|
|
379
|
-
await __class__._build_plugin(self, chatbot_id, [model_config], plugin)
|
|
384
|
+
await __class__._build_plugin(self, chatbot_id, [model_config], plugin, organization_id)
|
|
380
385
|
|
|
381
386
|
logger.info(f"Successfully rebuilt pipeline for chatbot `{chatbot_organization_id}` model `{model_id}`")
|
|
382
387
|
|
|
@@ -519,7 +524,7 @@ class PipelineHandler(PluginHandler):
|
|
|
519
524
|
)
|
|
520
525
|
|
|
521
526
|
supported_models = list(pipeline_info["config"].get("supported_models", {}).values())
|
|
522
|
-
await __class__._build_plugin(self, chatbot_id, supported_models, plugin)
|
|
527
|
+
await __class__._build_plugin(self, chatbot_id, supported_models, plugin, organization_id)
|
|
523
528
|
|
|
524
529
|
async def delete_chatbot(self, chatbot_id: str, organization_id: str = DEFAULT_ORGANIZATION_ID) -> None:
|
|
525
530
|
"""Delete a chatbot.
|
|
@@ -594,7 +599,7 @@ class PipelineHandler(PluginHandler):
|
|
|
594
599
|
self._builders.pop(chatbot_organization_id, None)
|
|
595
600
|
self._builders[chatbot_organization_id] = plugin
|
|
596
601
|
|
|
597
|
-
await __class__._build_plugin(self, chatbot_id, supported_models, plugin)
|
|
602
|
+
await __class__._build_plugin(self, chatbot_id, supported_models, plugin, organization_id)
|
|
598
603
|
except Exception as e:
|
|
599
604
|
logger.warning(f"Error updating chatbot `{chatbot_id}`: {e}")
|
|
600
605
|
|
|
@@ -746,7 +751,7 @@ class PipelineHandler(PluginHandler):
|
|
|
746
751
|
return
|
|
747
752
|
|
|
748
753
|
# Use the existing _build_plugin method to rebuild the plugin
|
|
749
|
-
await __class__._build_plugin(self, chatbot_id, supported_models, plugin)
|
|
754
|
+
await __class__._build_plugin(self, chatbot_id, supported_models, plugin, organization_id)
|
|
750
755
|
|
|
751
756
|
logger.info(f"Successfully rebuilt pipeline builder for chatbot `{chatbot_id}`")
|
|
752
757
|
|
|
@@ -8,7 +8,7 @@ glchat_plugin/handler/__init__.py,sha256=H5DJaAfwwtRsvMcOaEzHfGMQk25H7la0E7uPfks
|
|
|
8
8
|
glchat_plugin/handler/base_post_login_handler.py,sha256=48xSbe_LwTCjRY-lCuzWXqbnEr1ql8bAhQih1Xeh8f8,2835
|
|
9
9
|
glchat_plugin/pipeline/__init__.py,sha256=Sk-NfIGyA9VKIg0Bt5OHatNUYyWVPh9i5xhE5DFAfbo,41
|
|
10
10
|
glchat_plugin/pipeline/base_pipeline_preset_config.py,sha256=lbMH8y_HU3LrqtMYXLzQ2906ZkMXARKY5vBuIGvRVdA,2969
|
|
11
|
-
glchat_plugin/pipeline/pipeline_handler.py,sha256=
|
|
11
|
+
glchat_plugin/pipeline/pipeline_handler.py,sha256=Kp2LBqtVHzJ2twLaUvYXnL-1QGkqL_8h21IAR7FxBTI,34203
|
|
12
12
|
glchat_plugin/pipeline/pipeline_plugin.py,sha256=eBrg4THS0P49Mz4glEjrwqe1pxnvOn_UitJ9gOBVcac,4562
|
|
13
13
|
glchat_plugin/service/__init__.py,sha256=9T4qzyYL052qLqva5el1F575OTRNaaf9tb9UvW-leTc,47
|
|
14
14
|
glchat_plugin/service/base_rate_limiter_service.py,sha256=tgKwdr4EqnGo5iDRVJPnlg8W9q0hiUzfeewAtdW4IjU,1232
|
|
@@ -19,7 +19,7 @@ glchat_plugin/storage/base_anonymizer_storage.py,sha256=oFwovWrsjM7v1YjeN-4p-M3O
|
|
|
19
19
|
glchat_plugin/storage/base_chat_history_storage.py,sha256=YIGM8zv7s5BQ8O7W1LfaLyQW4SF9Bt3aolowsoDaQw8,11257
|
|
20
20
|
glchat_plugin/tools/__init__.py,sha256=OFotHbgQ8mZEbdlvlv5aVMdxfubPvkVWAcTwhIPdIqQ,542
|
|
21
21
|
glchat_plugin/tools/decorators.py,sha256=AvQBV18wzXWdC483RSSmpfh92zsqTyp8SzDLIkreIGU,3925
|
|
22
|
-
glchat_plugin-0.4.
|
|
23
|
-
glchat_plugin-0.4.
|
|
24
|
-
glchat_plugin-0.4.
|
|
25
|
-
glchat_plugin-0.4.
|
|
22
|
+
glchat_plugin-0.4.2.dist-info/METADATA,sha256=ESq6bUqzvyNim1Y_FggGMfTXbhQcDoYUbh_jRWBv8-M,2063
|
|
23
|
+
glchat_plugin-0.4.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
24
|
+
glchat_plugin-0.4.2.dist-info/top_level.txt,sha256=fzKSXmct5dY4CAKku4-mkdHX-QPAyQVvo8vpQj8qizY,14
|
|
25
|
+
glchat_plugin-0.4.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|