unique_toolkit 0.8.27__tar.gz → 0.8.29__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.
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/CHANGELOG.md +5 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/PKG-INFO +6 -1
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/pyproject.toml +1 -1
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/app/schemas.py +4 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/app/unique_settings.py +17 -11
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/chat/functions.py +467 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/chat/schemas.py +70 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/chat/service.py +569 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/LICENSE +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/README.md +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/__init__.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/_common/_base_service.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/_common/_time_utils.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/_common/default_language_model.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/_common/endpoint_builder.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/_common/exception.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/_common/token/image_token_counting.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/_common/token/token_counting.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/_common/validate_required_values.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/_common/validators.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/app/__init__.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/app/dev_util.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/app/init_logging.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/app/init_sdk.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/app/performance/async_tasks.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/app/performance/async_wrapper.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/app/verification.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/chat/__init__.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/chat/constants.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/chat/state.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/chat/utils.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/content/__init__.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/content/constants.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/content/functions.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/content/schemas.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/content/service.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/content/utils.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/debug_info_manager/debug_info_manager.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/embedding/__init__.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/embedding/constants.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/embedding/functions.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/embedding/schemas.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/embedding/service.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/embedding/utils.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evals/config.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evals/context_relevancy/prompts.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evals/context_relevancy/schema.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evals/context_relevancy/service.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evals/evaluation_manager.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evals/exception.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evals/hallucination/constants.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evals/hallucination/hallucination_evaluation.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evals/hallucination/prompts.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evals/hallucination/service.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evals/hallucination/utils.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evals/output_parser.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evals/schemas.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evals/tests/test_context_relevancy_service.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evals/tests/test_output_parser.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evaluators/__init__.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evaluators/config.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evaluators/constants.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evaluators/context_relevancy/constants.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evaluators/context_relevancy/prompts.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evaluators/context_relevancy/service.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evaluators/context_relevancy/utils.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evaluators/exception.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evaluators/hallucination/constants.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evaluators/hallucination/prompts.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evaluators/hallucination/service.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evaluators/hallucination/utils.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evaluators/output_parser.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/evaluators/schemas.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/framework_utilities/__init__.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/framework_utilities/langchain/client.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/framework_utilities/langchain/history.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/framework_utilities/openai/__init__.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/framework_utilities/openai/client.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/framework_utilities/openai/message_builder.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/framework_utilities/utils.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/history_manager/history_construction_with_contents.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/history_manager/history_manager.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/history_manager/loop_token_reducer.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/history_manager/utils.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/language_model/__init__.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/language_model/builder.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/language_model/constants.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/language_model/functions.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/language_model/infos.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/language_model/prompt.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/language_model/reference.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/language_model/schemas.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/language_model/service.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/language_model/utils.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/postprocessor/postprocessor_manager.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/protocols/support.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/reference_manager/reference_manager.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/short_term_memory/__init__.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/short_term_memory/constants.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/short_term_memory/functions.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/short_term_memory/persistent_short_term_memory_manager.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/short_term_memory/schemas.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/short_term_memory/service.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/smart_rules/__init__.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/smart_rules/compile.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/thinking_manager/thinking_manager.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/tools/config.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/tools/factory.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/tools/mcp/__init__.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/tools/mcp/manager.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/tools/mcp/models.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/tools/mcp/tool_wrapper.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/tools/schemas.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/tools/test/test_mcp_manager.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/tools/test/test_tool_progress_reporter.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/tools/tool.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/tools/tool_manager.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/tools/tool_progress_reporter.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/tools/utils/execution/execution.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/tools/utils/source_handling/schema.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/tools/utils/source_handling/source_formatting.py +0 -0
- {unique_toolkit-0.8.27 → unique_toolkit-0.8.29}/unique_toolkit/tools/utils/source_handling/tests/test_source_formatting.py +0 -0
|
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
## [0.8.29] - 2025-08-27
|
|
8
|
+
- Include `MessageExecution` and `MessageLog` in toolkit
|
|
9
|
+
|
|
10
|
+
## [0.8.28] - 2025-08-28
|
|
11
|
+
- Fix paths for `sdk_url` and `openai_proxy` for localhost
|
|
7
12
|
|
|
8
13
|
## [0.8.27] - 2025-08-28
|
|
9
14
|
- Fixed function "create_async" in language_model.functions : "user_id" argument should be optional.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: unique_toolkit
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.29
|
|
4
4
|
Summary:
|
|
5
5
|
License: Proprietary
|
|
6
6
|
Author: Martin Fadler
|
|
@@ -114,6 +114,11 @@ All notable changes to this project will be documented in this file.
|
|
|
114
114
|
|
|
115
115
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
116
116
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
117
|
+
## [0.8.29] - 2025-08-27
|
|
118
|
+
- Include `MessageExecution` and `MessageLog` in toolkit
|
|
119
|
+
|
|
120
|
+
## [0.8.28] - 2025-08-28
|
|
121
|
+
- Fix paths for `sdk_url` and `openai_proxy` for localhost
|
|
117
122
|
|
|
118
123
|
## [0.8.27] - 2025-08-28
|
|
119
124
|
- Fixed function "create_async" in language_model.functions : "user_id" argument should be optional.
|
|
@@ -196,6 +196,10 @@ class ChatEventPayload(BaseModel):
|
|
|
196
196
|
default_factory=list,
|
|
197
197
|
description="A list of MCP servers with tools available for the chat session.",
|
|
198
198
|
)
|
|
199
|
+
message_execution_id: str | None = Field(
|
|
200
|
+
default=None,
|
|
201
|
+
description="The message execution id for triggering the chat event. Originates from the message execution service.",
|
|
202
|
+
)
|
|
199
203
|
|
|
200
204
|
@field_validator("raw_scope_rules", mode="before")
|
|
201
205
|
def validate_scope_rules(cls, value: dict[str, Any] | None) -> UniqueQL | None:
|
|
@@ -2,7 +2,7 @@ import os
|
|
|
2
2
|
from logging import getLogger
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from typing import Self, TypeVar
|
|
5
|
-
from urllib.parse import urlparse, urlunparse
|
|
5
|
+
from urllib.parse import ParseResult, urlparse, urlunparse
|
|
6
6
|
|
|
7
7
|
import unique_sdk
|
|
8
8
|
from platformdirs import user_config_dir
|
|
@@ -99,22 +99,28 @@ class UniqueApi(BaseSettings):
|
|
|
99
99
|
)
|
|
100
100
|
)
|
|
101
101
|
|
|
102
|
-
def
|
|
102
|
+
def base_path(self) -> tuple[ParseResult, str]:
|
|
103
103
|
parsed = urlparse(self.base_url)
|
|
104
|
+
base_path = "/public/chat/"
|
|
104
105
|
|
|
105
|
-
path = "/public/chat"
|
|
106
106
|
if parsed.hostname and (
|
|
107
|
-
"qa.unique" in parsed.hostname
|
|
107
|
+
"gateway.qa.unique" in parsed.hostname
|
|
108
|
+
or "gateway.unique" in parsed.hostname
|
|
108
109
|
):
|
|
109
|
-
|
|
110
|
-
return urlunparse(parsed._replace(path=path, query=None, fragment=None))
|
|
110
|
+
base_path = "/public/chat-gen2/"
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
path = "/public/chat/openai-proxy/"
|
|
115
|
-
if parsed.hostname and "qa.unique" in parsed.hostname:
|
|
116
|
-
path = "/public/chat-gen2/openai-proxy/"
|
|
112
|
+
if parsed.hostname and "localhost" in parsed.hostname:
|
|
113
|
+
base_path = "/public/"
|
|
117
114
|
|
|
115
|
+
return parsed, base_path
|
|
116
|
+
|
|
117
|
+
def sdk_url(self) -> str:
|
|
118
|
+
parsed, base_path = self.base_path()
|
|
119
|
+
return urlunparse(parsed._replace(path=base_path, query=None, fragment=None))
|
|
120
|
+
|
|
121
|
+
def openai_proxy_url(self) -> str:
|
|
122
|
+
parsed, base_path = self.base_path()
|
|
123
|
+
path = base_path + "openai-proxy/"
|
|
118
124
|
return urlunparse(parsed._replace(path=path, query=None, fragment=None))
|
|
119
125
|
|
|
120
126
|
|
|
@@ -15,6 +15,13 @@ from unique_toolkit.chat.schemas import (
|
|
|
15
15
|
ChatMessageAssessmentStatus,
|
|
16
16
|
ChatMessageAssessmentType,
|
|
17
17
|
ChatMessageRole,
|
|
18
|
+
MessageExecution,
|
|
19
|
+
MessageExecutionType,
|
|
20
|
+
MessageExecutionUpdateStatus,
|
|
21
|
+
MessageLog,
|
|
22
|
+
MessageLogDetails,
|
|
23
|
+
MessageLogStatus,
|
|
24
|
+
MessageLogUncitedReferences,
|
|
18
25
|
)
|
|
19
26
|
from unique_toolkit.content.schemas import ContentChunk, ContentReference
|
|
20
27
|
from unique_toolkit.content.utils import count_tokens
|
|
@@ -174,6 +181,26 @@ def map_references(references: list[ContentReference]) -> list[dict[str, Any]]:
|
|
|
174
181
|
]
|
|
175
182
|
|
|
176
183
|
|
|
184
|
+
def map_references_with_original_index(
|
|
185
|
+
references: list[ContentReference],
|
|
186
|
+
) -> list[dict[str, Any]]:
|
|
187
|
+
"""Maps ContentReference objects to dict format for MessageLog API (complete format).
|
|
188
|
+
|
|
189
|
+
This function includes all fields including originalIndex for APIs that support it.
|
|
190
|
+
"""
|
|
191
|
+
return [
|
|
192
|
+
{
|
|
193
|
+
"name": ref.name,
|
|
194
|
+
"url": ref.url,
|
|
195
|
+
"sequenceNumber": ref.sequence_number,
|
|
196
|
+
"sourceId": ref.source_id,
|
|
197
|
+
"source": ref.source,
|
|
198
|
+
"originalIndex": ref.original_index,
|
|
199
|
+
}
|
|
200
|
+
for ref in references
|
|
201
|
+
]
|
|
202
|
+
|
|
203
|
+
|
|
177
204
|
def _construct_message_modify_params(
|
|
178
205
|
user_id: str,
|
|
179
206
|
company_id: str,
|
|
@@ -887,3 +914,443 @@ async def stream_complete_with_references_async(
|
|
|
887
914
|
except Exception as e:
|
|
888
915
|
logger.error(f"Error streaming completion: {e}")
|
|
889
916
|
raise e
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
def create_message_log(
|
|
920
|
+
user_id: str,
|
|
921
|
+
company_id: str,
|
|
922
|
+
message_id: str,
|
|
923
|
+
text: str,
|
|
924
|
+
status: MessageLogStatus,
|
|
925
|
+
order: int,
|
|
926
|
+
details: MessageLogDetails | None = None,
|
|
927
|
+
uncited_references: MessageLogUncitedReferences | None = None,
|
|
928
|
+
references: list[ContentReference] | None = None,
|
|
929
|
+
) -> MessageLog:
|
|
930
|
+
"""Creates a message log synchronously.
|
|
931
|
+
|
|
932
|
+
Args:
|
|
933
|
+
user_id (str): The user ID.
|
|
934
|
+
company_id (str): The company ID.
|
|
935
|
+
message_id (str): The ID of the message this log belongs to.
|
|
936
|
+
text (str): The log text content.
|
|
937
|
+
status (MessageLogStatus): The status of this log entry.
|
|
938
|
+
order (int): The order/sequence number of this log entry.
|
|
939
|
+
details (MessageLogDetails | None): Additional details about this log entry.
|
|
940
|
+
uncited_references (MessageLogUncitedReferences | None): References that are not cited.
|
|
941
|
+
references (list[ContentReference] | None): List of references for this log.
|
|
942
|
+
|
|
943
|
+
Returns:
|
|
944
|
+
MessageLog: The created message log.
|
|
945
|
+
|
|
946
|
+
Raises:
|
|
947
|
+
Exception: If the creation fails.
|
|
948
|
+
|
|
949
|
+
"""
|
|
950
|
+
try:
|
|
951
|
+
message_log = unique_sdk.MessageLog.create(
|
|
952
|
+
user_id=user_id,
|
|
953
|
+
company_id=company_id,
|
|
954
|
+
messageId=message_id,
|
|
955
|
+
text=text,
|
|
956
|
+
status=status.value,
|
|
957
|
+
order=order,
|
|
958
|
+
details=details.model_dump() if details else None,
|
|
959
|
+
uncitedReferences=uncited_references.model_dump()
|
|
960
|
+
if uncited_references
|
|
961
|
+
else None,
|
|
962
|
+
references=map_references_with_original_index(references)
|
|
963
|
+
if references
|
|
964
|
+
else [], # type: ignore
|
|
965
|
+
)
|
|
966
|
+
return MessageLog(**message_log)
|
|
967
|
+
except Exception as e:
|
|
968
|
+
logger.error(f"Failed to create message log: {e}")
|
|
969
|
+
raise e
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
async def create_message_log_async(
|
|
973
|
+
user_id: str,
|
|
974
|
+
company_id: str,
|
|
975
|
+
message_id: str,
|
|
976
|
+
text: str,
|
|
977
|
+
status: MessageLogStatus,
|
|
978
|
+
order: int,
|
|
979
|
+
details: MessageLogDetails | None = None,
|
|
980
|
+
uncited_references: MessageLogUncitedReferences | None = None,
|
|
981
|
+
references: list[ContentReference] | None = None,
|
|
982
|
+
) -> MessageLog:
|
|
983
|
+
"""Creates a message log asynchronously.
|
|
984
|
+
|
|
985
|
+
Args:
|
|
986
|
+
user_id (str): The user ID.
|
|
987
|
+
company_id (str): The company ID.
|
|
988
|
+
message_id (str): The ID of the message this log belongs to.
|
|
989
|
+
text (str): The log text content.
|
|
990
|
+
status (MessageLogStatus): The status of this log entry.
|
|
991
|
+
order (int): The order/sequence number of this log entry.
|
|
992
|
+
details (MessageLogDetails | None): Additional details about this log entry.
|
|
993
|
+
uncited_references (MessageLogUncitedReferences | None): References that are not cited.
|
|
994
|
+
references (list[ContentReference] | None): List of references for this log.
|
|
995
|
+
|
|
996
|
+
Returns:
|
|
997
|
+
MessageLog: The created message log.
|
|
998
|
+
|
|
999
|
+
Raises:
|
|
1000
|
+
Exception: If the creation fails.
|
|
1001
|
+
|
|
1002
|
+
"""
|
|
1003
|
+
try:
|
|
1004
|
+
message_log = await unique_sdk.MessageLog.create_async(
|
|
1005
|
+
user_id=user_id,
|
|
1006
|
+
company_id=company_id,
|
|
1007
|
+
messageId=message_id,
|
|
1008
|
+
text=text,
|
|
1009
|
+
status=status.value,
|
|
1010
|
+
order=order,
|
|
1011
|
+
details=details.model_dump() if details else None,
|
|
1012
|
+
uncitedReferences=uncited_references.model_dump()
|
|
1013
|
+
if uncited_references
|
|
1014
|
+
else None,
|
|
1015
|
+
references=map_references_with_original_index(references)
|
|
1016
|
+
if references
|
|
1017
|
+
else [], # type: ignore
|
|
1018
|
+
)
|
|
1019
|
+
return MessageLog(**message_log)
|
|
1020
|
+
except Exception as e:
|
|
1021
|
+
logger.error(f"Failed to create message log: {e}")
|
|
1022
|
+
raise e
|
|
1023
|
+
|
|
1024
|
+
|
|
1025
|
+
def update_message_log(
|
|
1026
|
+
user_id: str,
|
|
1027
|
+
company_id: str,
|
|
1028
|
+
message_log_id: str,
|
|
1029
|
+
order: int,
|
|
1030
|
+
text: str | None = None,
|
|
1031
|
+
status: MessageLogStatus | None = None,
|
|
1032
|
+
details: MessageLogDetails | None = None,
|
|
1033
|
+
uncited_references: MessageLogUncitedReferences | None = None,
|
|
1034
|
+
references: list[ContentReference] | None = None,
|
|
1035
|
+
) -> MessageLog:
|
|
1036
|
+
"""Updates a message log synchronously.
|
|
1037
|
+
|
|
1038
|
+
Args:
|
|
1039
|
+
user_id (str): The user ID.
|
|
1040
|
+
company_id (str): The company ID.
|
|
1041
|
+
message_log_id (str): The ID of the message log to update.
|
|
1042
|
+
order (int): The order/sequence number (required).
|
|
1043
|
+
text (str | None): The updated log text content.
|
|
1044
|
+
status (MessageLogStatus | None): The updated status.
|
|
1045
|
+
details (MessageLogDetails | None): Updated additional details.
|
|
1046
|
+
uncited_references (MessageLogUncitedReferences | None): Updated uncited references.
|
|
1047
|
+
references (list[ContentReference] | None): Updated list of references.
|
|
1048
|
+
|
|
1049
|
+
Returns:
|
|
1050
|
+
MessageLog: The updated message log.
|
|
1051
|
+
|
|
1052
|
+
Raises:
|
|
1053
|
+
Exception: If the update fails.
|
|
1054
|
+
|
|
1055
|
+
"""
|
|
1056
|
+
try:
|
|
1057
|
+
message_log = unique_sdk.MessageLog.update(
|
|
1058
|
+
user_id=user_id,
|
|
1059
|
+
company_id=company_id,
|
|
1060
|
+
message_log_id=message_log_id,
|
|
1061
|
+
text=text,
|
|
1062
|
+
status=status.value if status else None,
|
|
1063
|
+
order=order,
|
|
1064
|
+
details=details.model_dump() if details else None,
|
|
1065
|
+
uncitedReferences=uncited_references.model_dump()
|
|
1066
|
+
if uncited_references
|
|
1067
|
+
else None,
|
|
1068
|
+
references=map_references_with_original_index(references)
|
|
1069
|
+
if references
|
|
1070
|
+
else [], # type: ignore
|
|
1071
|
+
)
|
|
1072
|
+
return MessageLog(**message_log)
|
|
1073
|
+
except Exception as e:
|
|
1074
|
+
logger.error(f"Failed to update message log: {e}")
|
|
1075
|
+
raise e
|
|
1076
|
+
|
|
1077
|
+
|
|
1078
|
+
async def update_message_log_async(
|
|
1079
|
+
user_id: str,
|
|
1080
|
+
company_id: str,
|
|
1081
|
+
message_log_id: str,
|
|
1082
|
+
order: int,
|
|
1083
|
+
text: str | None = None,
|
|
1084
|
+
status: MessageLogStatus | None = None,
|
|
1085
|
+
details: MessageLogDetails | None = None,
|
|
1086
|
+
uncited_references: MessageLogUncitedReferences | None = None,
|
|
1087
|
+
references: list[ContentReference] | None = None,
|
|
1088
|
+
) -> MessageLog:
|
|
1089
|
+
"""Updates a message log asynchronously.
|
|
1090
|
+
|
|
1091
|
+
Args:
|
|
1092
|
+
user_id (str): The user ID.
|
|
1093
|
+
company_id (str): The company ID.
|
|
1094
|
+
message_log_id (str): The ID of the message log to update.
|
|
1095
|
+
order (int): The order/sequence number (required).
|
|
1096
|
+
text (str | None): The updated log text content.
|
|
1097
|
+
status (MessageLogStatus | None): The updated status.
|
|
1098
|
+
details (MessageLogDetails | None): Updated additional details.
|
|
1099
|
+
uncited_references (MessageLogUncitedReferences | None): Updated uncited references.
|
|
1100
|
+
references (list[ContentReference] | None): Updated list of references.
|
|
1101
|
+
|
|
1102
|
+
Returns:
|
|
1103
|
+
MessageLog: The updated message log.
|
|
1104
|
+
|
|
1105
|
+
Raises:
|
|
1106
|
+
Exception: If the update fails.
|
|
1107
|
+
|
|
1108
|
+
"""
|
|
1109
|
+
try:
|
|
1110
|
+
message_log = await unique_sdk.MessageLog.update_async(
|
|
1111
|
+
user_id=user_id,
|
|
1112
|
+
company_id=company_id,
|
|
1113
|
+
message_log_id=message_log_id,
|
|
1114
|
+
text=text,
|
|
1115
|
+
status=status.value if status else None,
|
|
1116
|
+
order=order,
|
|
1117
|
+
details=details.model_dump() if details else None,
|
|
1118
|
+
uncitedReferences=uncited_references.model_dump()
|
|
1119
|
+
if uncited_references
|
|
1120
|
+
else None,
|
|
1121
|
+
references=map_references_with_original_index(references)
|
|
1122
|
+
if references
|
|
1123
|
+
else [], # type: ignore
|
|
1124
|
+
)
|
|
1125
|
+
return MessageLog(**message_log)
|
|
1126
|
+
except Exception as e:
|
|
1127
|
+
logger.error(f"Failed to update message log: {e}")
|
|
1128
|
+
raise e
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
def create_message_execution(
|
|
1132
|
+
user_id: str,
|
|
1133
|
+
company_id: str,
|
|
1134
|
+
message_id: str,
|
|
1135
|
+
chat_id: str,
|
|
1136
|
+
type: MessageExecutionType = MessageExecutionType.DEEP_RESEARCH,
|
|
1137
|
+
seconds_remaining: int | None = None,
|
|
1138
|
+
percentage_completed: int | None = None,
|
|
1139
|
+
) -> MessageExecution:
|
|
1140
|
+
"""Creates a message execution synchronously.
|
|
1141
|
+
|
|
1142
|
+
Args:
|
|
1143
|
+
user_id (str): The user ID.
|
|
1144
|
+
company_id (str): The company ID.
|
|
1145
|
+
message_id (str): The ID of the message this execution belongs to.
|
|
1146
|
+
chat_id (str): The chat ID.
|
|
1147
|
+
type (MessageExecutionType): The type of execution. Defaults to DEEP_RESEARCH.
|
|
1148
|
+
seconds_remaining (int | None): Estimated seconds remaining for completion.
|
|
1149
|
+
percentage_completed (int | None): Percentage of completion (0-100).
|
|
1150
|
+
|
|
1151
|
+
Returns:
|
|
1152
|
+
MessageExecution: The created message execution.
|
|
1153
|
+
|
|
1154
|
+
Raises:
|
|
1155
|
+
Exception: If the creation fails.
|
|
1156
|
+
|
|
1157
|
+
"""
|
|
1158
|
+
try:
|
|
1159
|
+
message_execution = unique_sdk.MessageExecution.create(
|
|
1160
|
+
user_id=user_id,
|
|
1161
|
+
company_id=company_id,
|
|
1162
|
+
messageId=message_id,
|
|
1163
|
+
chatId=chat_id,
|
|
1164
|
+
type=type.value,
|
|
1165
|
+
secondsRemaining=seconds_remaining,
|
|
1166
|
+
percentageCompleted=percentage_completed,
|
|
1167
|
+
)
|
|
1168
|
+
return MessageExecution(**message_execution)
|
|
1169
|
+
except Exception as e:
|
|
1170
|
+
logger.error(f"Failed to create message execution: {e}")
|
|
1171
|
+
raise e
|
|
1172
|
+
|
|
1173
|
+
|
|
1174
|
+
async def create_message_execution_async(
|
|
1175
|
+
user_id: str,
|
|
1176
|
+
company_id: str,
|
|
1177
|
+
message_id: str,
|
|
1178
|
+
chat_id: str,
|
|
1179
|
+
type: MessageExecutionType = MessageExecutionType.DEEP_RESEARCH,
|
|
1180
|
+
seconds_remaining: int | None = None,
|
|
1181
|
+
percentage_completed: int | None = None,
|
|
1182
|
+
) -> MessageExecution:
|
|
1183
|
+
"""Creates a message execution asynchronously.
|
|
1184
|
+
|
|
1185
|
+
Args:
|
|
1186
|
+
user_id (str): The user ID.
|
|
1187
|
+
company_id (str): The company ID.
|
|
1188
|
+
message_id (str): The ID of the message this execution belongs to.
|
|
1189
|
+
chat_id (str): The chat ID.
|
|
1190
|
+
type (MessageExecutionType): The type of execution. Defaults to DEEP_RESEARCH.
|
|
1191
|
+
seconds_remaining (int | None): Estimated seconds remaining for completion.
|
|
1192
|
+
percentage_completed (int | None): Percentage of completion (0-100).
|
|
1193
|
+
|
|
1194
|
+
Returns:
|
|
1195
|
+
MessageExecution: The created message execution.
|
|
1196
|
+
|
|
1197
|
+
Raises:
|
|
1198
|
+
Exception: If the creation fails.
|
|
1199
|
+
|
|
1200
|
+
"""
|
|
1201
|
+
try:
|
|
1202
|
+
message_execution = await unique_sdk.MessageExecution.create_async(
|
|
1203
|
+
user_id=user_id,
|
|
1204
|
+
company_id=company_id,
|
|
1205
|
+
messageId=message_id,
|
|
1206
|
+
chatId=chat_id,
|
|
1207
|
+
type=type.value,
|
|
1208
|
+
secondsRemaining=seconds_remaining,
|
|
1209
|
+
percentageCompleted=percentage_completed,
|
|
1210
|
+
)
|
|
1211
|
+
return MessageExecution(**message_execution)
|
|
1212
|
+
except Exception as e:
|
|
1213
|
+
logger.error(f"Failed to create message execution: {e}")
|
|
1214
|
+
raise e
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
def get_message_execution(
|
|
1218
|
+
user_id: str,
|
|
1219
|
+
company_id: str,
|
|
1220
|
+
message_id: str,
|
|
1221
|
+
) -> MessageExecution:
|
|
1222
|
+
"""Gets a message execution by message ID synchronously.
|
|
1223
|
+
|
|
1224
|
+
Args:
|
|
1225
|
+
user_id (str): The user ID.
|
|
1226
|
+
company_id (str): The company ID.
|
|
1227
|
+
message_id (str): The ID of the message to get execution for.
|
|
1228
|
+
|
|
1229
|
+
Returns:
|
|
1230
|
+
MessageExecution: The message execution.
|
|
1231
|
+
|
|
1232
|
+
Raises:
|
|
1233
|
+
Exception: If the retrieval fails.
|
|
1234
|
+
|
|
1235
|
+
"""
|
|
1236
|
+
try:
|
|
1237
|
+
message_execution = unique_sdk.MessageExecution.get(
|
|
1238
|
+
user_id=user_id,
|
|
1239
|
+
company_id=company_id,
|
|
1240
|
+
messageId=message_id,
|
|
1241
|
+
)
|
|
1242
|
+
return MessageExecution(**message_execution)
|
|
1243
|
+
except Exception as e:
|
|
1244
|
+
logger.error(f"Failed to get message execution: {e}")
|
|
1245
|
+
raise e
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
async def get_message_execution_async(
|
|
1249
|
+
user_id: str,
|
|
1250
|
+
company_id: str,
|
|
1251
|
+
message_id: str,
|
|
1252
|
+
) -> MessageExecution:
|
|
1253
|
+
"""Gets a message execution by message ID asynchronously.
|
|
1254
|
+
|
|
1255
|
+
Args:
|
|
1256
|
+
user_id (str): The user ID.
|
|
1257
|
+
company_id (str): The company ID.
|
|
1258
|
+
message_id (str): The ID of the message to get execution for.
|
|
1259
|
+
|
|
1260
|
+
Returns:
|
|
1261
|
+
MessageExecution: The message execution.
|
|
1262
|
+
|
|
1263
|
+
Raises:
|
|
1264
|
+
Exception: If the retrieval fails.
|
|
1265
|
+
|
|
1266
|
+
"""
|
|
1267
|
+
try:
|
|
1268
|
+
message_execution = await unique_sdk.MessageExecution.get_async(
|
|
1269
|
+
user_id=user_id,
|
|
1270
|
+
company_id=company_id,
|
|
1271
|
+
messageId=message_id,
|
|
1272
|
+
)
|
|
1273
|
+
return MessageExecution(**message_execution)
|
|
1274
|
+
except Exception as e:
|
|
1275
|
+
logger.error(f"Failed to get message execution: {e}")
|
|
1276
|
+
raise e
|
|
1277
|
+
|
|
1278
|
+
|
|
1279
|
+
def update_message_execution(
|
|
1280
|
+
user_id: str,
|
|
1281
|
+
company_id: str,
|
|
1282
|
+
message_id: str,
|
|
1283
|
+
status: MessageExecutionUpdateStatus,
|
|
1284
|
+
seconds_remaining: int | None = None,
|
|
1285
|
+
percentage_completed: int | None = None,
|
|
1286
|
+
) -> MessageExecution:
|
|
1287
|
+
"""Updates a message execution synchronously.
|
|
1288
|
+
|
|
1289
|
+
Args:
|
|
1290
|
+
user_id (str): The user ID.
|
|
1291
|
+
company_id (str): The company ID.
|
|
1292
|
+
message_id (str): The ID of the message to update execution for.
|
|
1293
|
+
status (MessageExecutionUpdateStatus): The updated status (COMPLETED or FAILED).
|
|
1294
|
+
seconds_remaining (int | None): Updated estimated seconds remaining.
|
|
1295
|
+
percentage_completed (int | None): Updated percentage of completion (0-100).
|
|
1296
|
+
|
|
1297
|
+
Returns:
|
|
1298
|
+
MessageExecution: The updated message execution.
|
|
1299
|
+
|
|
1300
|
+
Raises:
|
|
1301
|
+
Exception: If the update fails.
|
|
1302
|
+
|
|
1303
|
+
"""
|
|
1304
|
+
try:
|
|
1305
|
+
message_execution = unique_sdk.MessageExecution.update(
|
|
1306
|
+
user_id=user_id,
|
|
1307
|
+
company_id=company_id,
|
|
1308
|
+
messageId=message_id,
|
|
1309
|
+
status=status.value,
|
|
1310
|
+
secondsRemaining=seconds_remaining,
|
|
1311
|
+
percentageCompleted=percentage_completed,
|
|
1312
|
+
)
|
|
1313
|
+
return MessageExecution(**message_execution)
|
|
1314
|
+
except Exception as e:
|
|
1315
|
+
logger.error(f"Failed to update message execution: {e}")
|
|
1316
|
+
raise e
|
|
1317
|
+
|
|
1318
|
+
|
|
1319
|
+
async def update_message_execution_async(
|
|
1320
|
+
user_id: str,
|
|
1321
|
+
company_id: str,
|
|
1322
|
+
message_id: str,
|
|
1323
|
+
status: MessageExecutionUpdateStatus,
|
|
1324
|
+
seconds_remaining: int | None = None,
|
|
1325
|
+
percentage_completed: int | None = None,
|
|
1326
|
+
) -> MessageExecution:
|
|
1327
|
+
"""Updates a message execution asynchronously.
|
|
1328
|
+
|
|
1329
|
+
Args:
|
|
1330
|
+
user_id (str): The user ID.
|
|
1331
|
+
company_id (str): The company ID.
|
|
1332
|
+
message_id (str): The ID of the message to update execution for.
|
|
1333
|
+
status (MessageExecutionUpdateStatus): The updated status (COMPLETED or FAILED).
|
|
1334
|
+
seconds_remaining (int | None): Updated estimated seconds remaining.
|
|
1335
|
+
percentage_completed (int | None): Updated percentage of completion (0-100).
|
|
1336
|
+
|
|
1337
|
+
Returns:
|
|
1338
|
+
MessageExecution: The updated message execution.
|
|
1339
|
+
|
|
1340
|
+
Raises:
|
|
1341
|
+
Exception: If the update fails.
|
|
1342
|
+
|
|
1343
|
+
"""
|
|
1344
|
+
try:
|
|
1345
|
+
message_execution = await unique_sdk.MessageExecution.update_async(
|
|
1346
|
+
user_id=user_id,
|
|
1347
|
+
company_id=company_id,
|
|
1348
|
+
messageId=message_id,
|
|
1349
|
+
status=status.value,
|
|
1350
|
+
secondsRemaining=seconds_remaining,
|
|
1351
|
+
percentageCompleted=percentage_completed,
|
|
1352
|
+
)
|
|
1353
|
+
return MessageExecution(**message_execution)
|
|
1354
|
+
except Exception as e:
|
|
1355
|
+
logger.error(f"Failed to update message execution: {e}")
|
|
1356
|
+
raise e
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
2
|
from enum import StrEnum
|
|
3
|
+
from typing import Literal
|
|
3
4
|
|
|
4
5
|
from humps import camelize
|
|
5
6
|
from openai.types.chat import (
|
|
@@ -161,3 +162,72 @@ class ChatMessageAssessment(BaseModel):
|
|
|
161
162
|
is_visible: bool
|
|
162
163
|
created_at: datetime | None = None
|
|
163
164
|
updated_at: datetime | None = None
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
class MessageLogStatus(StrEnum):
|
|
168
|
+
RUNNING = "RUNNING"
|
|
169
|
+
COMPLETED = "COMPLETED"
|
|
170
|
+
FAILED = "FAILED"
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
class MessageExecutionStatus(StrEnum):
|
|
174
|
+
PENDING = "PENDING"
|
|
175
|
+
RUNNING = "RUNNING"
|
|
176
|
+
COMPLETED = "COMPLETED"
|
|
177
|
+
FAILED = "FAILED"
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class MessageExecutionType(StrEnum):
|
|
181
|
+
DEEP_RESEARCH = "DEEP_RESEARCH"
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
class MessageExecutionUpdateStatus(StrEnum):
|
|
185
|
+
COMPLETED = "COMPLETED"
|
|
186
|
+
FAILED = "FAILED"
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
class MessageLogUncitedReferences(BaseModel):
|
|
190
|
+
model_config = model_config
|
|
191
|
+
data: list[ContentReference]
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
class MessageLogEvent(BaseModel):
|
|
195
|
+
model_config = model_config
|
|
196
|
+
type: Literal["WebSearch", "InternalSearch"]
|
|
197
|
+
text: str
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
class MessageLogDetails(BaseModel):
|
|
201
|
+
model_config = model_config
|
|
202
|
+
data: list[MessageLogEvent] | None = None
|
|
203
|
+
status: str | None = Field(
|
|
204
|
+
default=None, description="Overarching status of the current message log"
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
class MessageLog(BaseModel):
|
|
209
|
+
model_config = model_config
|
|
210
|
+
|
|
211
|
+
message_log_id: str | None = None
|
|
212
|
+
message_id: str | None = None
|
|
213
|
+
status: MessageLogStatus
|
|
214
|
+
text: str | None = None
|
|
215
|
+
details: MessageLogDetails | None = None
|
|
216
|
+
uncited_references: MessageLogUncitedReferences | None = None
|
|
217
|
+
order: int
|
|
218
|
+
references: list[ContentReference] | None = None
|
|
219
|
+
created_at: datetime | None = None
|
|
220
|
+
updated_at: datetime | None = None
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
class MessageExecution(BaseModel):
|
|
224
|
+
model_config = model_config
|
|
225
|
+
|
|
226
|
+
message_execution_id: str | None = None
|
|
227
|
+
message_id: str | None = None
|
|
228
|
+
status: MessageExecutionStatus
|
|
229
|
+
type: MessageExecutionType = MessageExecutionType.DEEP_RESEARCH
|
|
230
|
+
seconds_remaining: int | None = None
|
|
231
|
+
percentage_completed: int | None = None
|
|
232
|
+
created_at: datetime | None = None
|
|
233
|
+
updated_at: datetime | None = None
|