aidev-bkplugin 2.0.2__tar.gz → 2.0.3__tar.gz
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.
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/PKG-INFO +2 -2
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/serializers/chat_completion.py +17 -1
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/pyproject.toml +2 -2
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/apps.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/constants.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/management/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/management/commands/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/management/commands/upgrade_sessions.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/migrations/0001_initial.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/migrations/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/models.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/openapi/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/openapi/urls.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/openapi/views.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/apigw/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/apigw/permissions.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/checkpoint/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/checkpoint/bk_django_saver.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/drf/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/drf/authentication.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/drf/decorators.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/drf/exception.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/drf/renderers.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/opentelemetry/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/opentelemetry/callback_handler.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/opentelemetry/config.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/opentelemetry/instrumentor.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/opentelemetry/otel_service.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/opentelemetry/span_utils.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/opentelemetry/utils.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/permissions.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/serializers/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/serializers/agent.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/services/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/services/agent_builder.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/services/agent_config.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/services/agent_execution.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/services/agent_helpers.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/services/agent_session.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/settings.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/urls.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/utils.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/views/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/views/agent.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/views/base.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/views/chat.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/views/chat_group.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/views/flow_agent.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/views/session.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/readme.md +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/conftest.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/packages/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/packages/opentelemetry/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/packages/opentelemetry/conftest.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/packages/opentelemetry/test_callback_handler.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/packages/opentelemetry/test_instrumentor.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/packages/opentelemetry/test_integration.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/services/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/services/agent/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/services/agent/conftest.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/services/agent/test_agent_config_fetcher.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/services/agent/test_builder.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/services/agent/test_session_manager.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/services/test_agui_handler.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/services/test_thread_chat_completion.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/settings.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/test_constants.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/views/__init__.py +0 -0
- {aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/views/test_chat_completion_serializer.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aidev-bkplugin
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.3
|
|
4
4
|
Summary: AiDev Agent Bkplugin builtin functions
|
|
5
5
|
Requires-Python: <3.12,>=3.11
|
|
6
|
-
Requires-Dist: aidev-agent>=2.0.
|
|
6
|
+
Requires-Dist: aidev-agent>=2.0.3
|
|
7
7
|
Requires-Dist: blueapps<5.0,>=4.15.1
|
|
8
8
|
Requires-Dist: django<5.0,>=4.2.28
|
|
9
9
|
Provides-Extra: opentelemetry
|
|
@@ -23,9 +23,25 @@ from aidev_bkplugin.services.agent_config import AgentConfigFetcher
|
|
|
23
23
|
from aidev_bkplugin.services.agent_execution import build_execute_kwargs
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
class ChatPromptContentField(serializers.Field):
|
|
27
|
+
"""chat_history.content 字段:兼容字符串与多模态列表。"""
|
|
28
|
+
|
|
29
|
+
default_error_messages = {"invalid": "content must be a string or list[dict]"}
|
|
30
|
+
|
|
31
|
+
def to_internal_value(self, data):
|
|
32
|
+
if isinstance(data, str):
|
|
33
|
+
return data
|
|
34
|
+
if isinstance(data, list) and all(isinstance(item, dict) for item in data):
|
|
35
|
+
return data
|
|
36
|
+
self.fail("invalid")
|
|
37
|
+
|
|
38
|
+
def to_representation(self, value):
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
|
|
26
42
|
class ChatPromptItemSerializer(serializers.Serializer):
|
|
27
43
|
role = serializers.CharField()
|
|
28
|
-
content =
|
|
44
|
+
content = ChatPromptContentField()
|
|
29
45
|
|
|
30
46
|
|
|
31
47
|
class ChatCompletionRequestSerializer(serializers.Serializer):
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "aidev-bkplugin"
|
|
3
|
-
version = "2.0.
|
|
3
|
+
version = "2.0.3"
|
|
4
4
|
description = "AiDev Agent Bkplugin builtin functions"
|
|
5
5
|
readme = "readme.md"
|
|
6
6
|
requires-python = "<3.12,>=3.11"
|
|
7
7
|
dependencies = [
|
|
8
|
-
"aidev-agent>=2.0.
|
|
8
|
+
"aidev-agent>=2.0.3",
|
|
9
9
|
"blueapps>=4.15.1, <5.0",
|
|
10
10
|
"django>=4.2.28,<5.0",
|
|
11
11
|
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/management/commands/__init__.py
RENAMED
|
File without changes
|
{aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/management/commands/upgrade_sessions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/checkpoint/__init__.py
RENAMED
|
File without changes
|
{aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/checkpoint/bk_django_saver.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/opentelemetry/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/opentelemetry/config.py
RENAMED
|
File without changes
|
{aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/opentelemetry/instrumentor.py
RENAMED
|
File without changes
|
{aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/opentelemetry/otel_service.py
RENAMED
|
File without changes
|
{aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/opentelemetry/span_utils.py
RENAMED
|
File without changes
|
{aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/aidev_bkplugin/packages/opentelemetry/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/packages/opentelemetry/test_callback_handler.py
RENAMED
|
File without changes
|
{aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/packages/opentelemetry/test_instrumentor.py
RENAMED
|
File without changes
|
{aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/packages/opentelemetry/test_integration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/services/agent/test_agent_config_fetcher.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidev_bkplugin-2.0.2 → aidev_bkplugin-2.0.3}/tests/views/test_chat_completion_serializer.py
RENAMED
|
File without changes
|