jl-ecms-client 0.2.3__py3-none-any.whl → 0.2.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.
- {jl_ecms_client-0.2.3.dist-info → jl_ecms_client-0.2.7.dist-info}/METADATA +1 -1
- {jl_ecms_client-0.2.3.dist-info → jl_ecms_client-0.2.7.dist-info}/RECORD +23 -21
- mirix/client/client.py +5 -15
- mirix/client/constants.py +60 -0
- mirix/client/utils.py +34 -0
- mirix/schemas/agent.py +6 -5
- mirix/schemas/block.py +1 -1
- mirix/schemas/cloud_file_mapping.py +1 -1
- mirix/schemas/episodic_memory.py +2 -2
- mirix/schemas/knowledge_vault.py +2 -2
- mirix/schemas/memory.py +1 -1
- mirix/schemas/message.py +1 -1
- mirix/schemas/mirix_request.py +1 -1
- mirix/schemas/mirix_response.py +1 -1
- mirix/schemas/organization.py +5 -5
- mirix/schemas/procedural_memory.py +2 -2
- mirix/schemas/providers.py +1 -1
- mirix/schemas/resource_memory.py +2 -2
- mirix/schemas/semantic_memory.py +2 -2
- mirix/schemas/tool.py +1 -1
- {jl_ecms_client-0.2.3.dist-info → jl_ecms_client-0.2.7.dist-info}/WHEEL +0 -0
- {jl_ecms_client-0.2.3.dist-info → jl_ecms_client-0.2.7.dist-info}/licenses/LICENSE +0 -0
- {jl_ecms_client-0.2.3.dist-info → jl_ecms_client-0.2.7.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
jl_ecms_client-0.2.
|
|
1
|
+
jl_ecms_client-0.2.7.dist-info/licenses/LICENSE,sha256=8fOrt8t-9Lb_RKUa_xmj1_bVzbbluGEXERWSfM7rXfY,10758
|
|
2
2
|
mirix/client/__init__.py,sha256=QOjO6HJdl5CBK9QrSvAILmlCWfoobt8CNBnRWsoZFBs,2383
|
|
3
|
-
mirix/client/client.py,sha256=
|
|
3
|
+
mirix/client/client.py,sha256=9RK7BP5Fjonn5wKfUK5WK2fZS5--1mtdbmO50gQmdNs,88727
|
|
4
|
+
mirix/client/constants.py,sha256=6NVFu3yZqm1HW6vKA1HCpNc8l-ds6yGPyUGf-tqXJ78,2011
|
|
4
5
|
mirix/client/remote_client.py,sha256=P0sTbGlqeuT_cIvGh243NK1Uf4a2JgNkQLdLvN950HQ,42646
|
|
6
|
+
mirix/client/utils.py,sha256=xPAvR3slBQ5srOFLtYTqpL3PeD5n0YsxBRR1sLgKBdY,786
|
|
5
7
|
mirix/helpers/__init__.py,sha256=2QXDAywb0wF3JNLC7GgMDJb_kQpwvlb6ZCnjuLmOfPw,78
|
|
6
8
|
mirix/helpers/converters.py,sha256=WuYkra4c9-JRC2lRo7LmmFMH42qf3k6ox3OGOYlDQLk,13504
|
|
7
9
|
mirix/helpers/datetime_helpers.py,sha256=7U5ZJkE0cLki4sG8ukIHZSAoFfQpLWQu2kFekETy6Zg,2633
|
|
@@ -9,33 +11,33 @@ mirix/helpers/json_helpers.py,sha256=2iq1Lyxa8Ofes38QHAOBZHE7I2jS65h-zkAXWJzpm3k
|
|
|
9
11
|
mirix/helpers/message_helpers.py,sha256=xOn2Uwx5XK4C1ahYKmFe9ak7QjE5vcPVuZBcLDYxkZA,2571
|
|
10
12
|
mirix/helpers/tool_rule_solver.py,sha256=LM9YuugmYtxxtcrD7GakbCNvmnuLK4Zp5KV8vA-UNSA,6542
|
|
11
13
|
mirix/schemas/__init__.py,sha256=HPrtil4I9_KC2u6eJZpBJ2dbl_YxOj_ZeYnKYq3RSGM,24
|
|
12
|
-
mirix/schemas/agent.py,sha256=
|
|
13
|
-
mirix/schemas/block.py,sha256=
|
|
14
|
-
mirix/schemas/cloud_file_mapping.py,sha256=
|
|
14
|
+
mirix/schemas/agent.py,sha256=SYiLURW1PYAHSXAaBOx8N8kaP_5Qt7ujWVxf2uA4BDM,15854
|
|
15
|
+
mirix/schemas/block.py,sha256=NhqaSCOHKACHb77F77NhET-Sy8bZqSJJnenQaC7pBR4,5145
|
|
16
|
+
mirix/schemas/cloud_file_mapping.py,sha256=i_5N41hNt0rEl-fvnGoPggLMbFdEk97wI71qQTjHKIg,977
|
|
15
17
|
mirix/schemas/embedding_config.py,sha256=aHySSdkn5BeL_i6UQLuyDmjo40FCWvKW1Yfc01hQYak,4050
|
|
16
18
|
mirix/schemas/enums.py,sha256=7Z4Wotyndp_eghhIvSdjFA3nMp_Vh_pcK1A_MrkBFRA,1357
|
|
17
19
|
mirix/schemas/environment_variables.py,sha256=mSL5U2NYxJHO4fb2dF3YgPyINgYgelsSzMqQ6nsjzng,2573
|
|
18
|
-
mirix/schemas/episodic_memory.py,sha256=
|
|
20
|
+
mirix/schemas/episodic_memory.py,sha256=KXr1hHXEqceF5wjMDpAN6MMkRthY-GBnFUcW_QDYUTg,6330
|
|
19
21
|
mirix/schemas/file.py,sha256=J92aWus84jPoF71wRtKIvoAPSdIDt4McEM6yDWzHiqg,2064
|
|
20
22
|
mirix/schemas/health.py,sha256=zT6mYovvD17iJRuu2rcaQQzbEEYrkwvAE9TB7iU824c,139
|
|
21
|
-
mirix/schemas/knowledge_vault.py,sha256=
|
|
23
|
+
mirix/schemas/knowledge_vault.py,sha256=i9qOXp7D8tOgjpRlThDIBDBB4TvOtO7fpSCgaLZW3Lg,6316
|
|
22
24
|
mirix/schemas/llm_config.py,sha256=ZTJtqlD-J8wsEx4_aAMbqHaL0vxDrDjsgwD5RK07zcs,7256
|
|
23
|
-
mirix/schemas/memory.py,sha256=
|
|
24
|
-
mirix/schemas/message.py,sha256=
|
|
25
|
+
mirix/schemas/memory.py,sha256=ORWX_qxQBirsHN9vTlr3d_UYLiUB9tlP8DnIh_obIfA,11991
|
|
26
|
+
mirix/schemas/message.py,sha256=_alOnt4BjdBw92Etg_i4vUhcWwdvD-54r5yuuydPBkc,53990
|
|
25
27
|
mirix/schemas/mirix_base.py,sha256=DMkOMZw1mw8Vte8yCGK9xAhqgY2O2CO6uYD9pgf9e6A,3859
|
|
26
28
|
mirix/schemas/mirix_message.py,sha256=WQHdA1dhLiwh0I3y710JMZx42fFmFkXBKdQdl1XdiDY,15334
|
|
27
29
|
mirix/schemas/mirix_message_content.py,sha256=xdgTM5AkkONe4mjgcZNuKkbKk_fEY4rqzobD7cvy5cA,6815
|
|
28
|
-
mirix/schemas/mirix_request.py,sha256=
|
|
29
|
-
mirix/schemas/mirix_response.py,sha256=
|
|
30
|
-
mirix/schemas/organization.py,sha256=
|
|
31
|
-
mirix/schemas/procedural_memory.py,sha256=
|
|
32
|
-
mirix/schemas/providers.py,sha256=
|
|
33
|
-
mirix/schemas/resource_memory.py,sha256=
|
|
30
|
+
mirix/schemas/mirix_request.py,sha256=A2CwbKaIQcc1KchT0U3Ro82mBe6RerpDPFguDN_JFCo,1399
|
|
31
|
+
mirix/schemas/mirix_response.py,sha256=w_hTYJs_cpBdx1mWfezzbiV49U4MWHKEfwFrYSMAVR0,7444
|
|
32
|
+
mirix/schemas/organization.py,sha256=tHjE4CmboPJV8OMZ1BfGuFanMJKCED5rh1IBpNQhGTc,1120
|
|
33
|
+
mirix/schemas/procedural_memory.py,sha256=XdX0tfX3LLRXngEP7c3Y2A6KEx7b9dY_ADKOrCdSqQg,5509
|
|
34
|
+
mirix/schemas/providers.py,sha256=PNXCRGw2UqAwNgk3y2xqXa9bbH9ySVInLeU8qftTca4,30552
|
|
35
|
+
mirix/schemas/resource_memory.py,sha256=0w6tRynshimSviPd7fkXG77KqCxEBeuHsnjpYXILTVQ,4907
|
|
34
36
|
mirix/schemas/sandbox_config.py,sha256=X89bm-6QCE7n-ugQ7GyNfan6ZxKXU1UOwdWP0_PXnc4,4460
|
|
35
|
-
mirix/schemas/semantic_memory.py,sha256=
|
|
37
|
+
mirix/schemas/semantic_memory.py,sha256=vpDs9X1h6BRaAWnGkF0Il6oiYqosbmxahFh1OFb8WA0,5993
|
|
36
38
|
mirix/schemas/source.py,sha256=9Qe-E15sDXcopd3UPW0-sC3lFHIjlV44t_lV7KxkCWY,3050
|
|
37
39
|
mirix/schemas/step.py,sha256=msWn5uBdaR3dYmjTuCwmvq3Mm-kP0Ha8e3-2sfCvG1Y,1826
|
|
38
|
-
mirix/schemas/tool.py,sha256=
|
|
40
|
+
mirix/schemas/tool.py,sha256=ypkDYr8dikfyUU7tgnEF-CCam97TYYbTtaJ3K6PTebg,10487
|
|
39
41
|
mirix/schemas/tool_rule.py,sha256=uwyrOX38Vtp-6V1CbHnvBI3DzmWpW2zy7UPtYPmewus,6877
|
|
40
42
|
mirix/schemas/usage.py,sha256=QX7uIaK7-GgrZDMgeot-1ae2n-ol0yif3E7JsLF0Sxk,1166
|
|
41
43
|
mirix/schemas/user.py,sha256=9ywAkPX__q3Ja4lfs-YIiCKQkFmE3-poIimt0owGz_E,2476
|
|
@@ -45,7 +47,7 @@ mirix/schemas/openai/chat_completion_response.py,sha256=1hF0Gaxvd03oBdKupz37qk_2
|
|
|
45
47
|
mirix/schemas/openai/chat_completions.py,sha256=PfC4MOiADLW_BfgmUohqK033VB4IO5fLIR1416C1DCE,3616
|
|
46
48
|
mirix/schemas/openai/embedding_response.py,sha256=WKIZpXab1Av7v6sxKG8feW3ZtpQUNosmLVSuhXYa_xU,357
|
|
47
49
|
mirix/schemas/openai/openai.py,sha256=gXfYwdGRJ-co15zVKw3lua0iZL_lJBBo03XMWsw1uTI,8394
|
|
48
|
-
jl_ecms_client-0.2.
|
|
49
|
-
jl_ecms_client-0.2.
|
|
50
|
-
jl_ecms_client-0.2.
|
|
51
|
-
jl_ecms_client-0.2.
|
|
50
|
+
jl_ecms_client-0.2.7.dist-info/METADATA,sha256=T7mM1EjJebIwmHGR_8Ma5ln6dKEUfaY1fRsGOUPFO2Q,10843
|
|
51
|
+
jl_ecms_client-0.2.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
52
|
+
jl_ecms_client-0.2.7.dist-info/top_level.txt,sha256=hQ_Eh5KYzEGkhtEyWHdBYJ5iCom6_nlj0zQ6-v0WDIY,6
|
|
53
|
+
jl_ecms_client-0.2.7.dist-info/RECORD,,
|
mirix/client/client.py
CHANGED
|
@@ -9,8 +9,6 @@ from urllib.parse import urlparse
|
|
|
9
9
|
|
|
10
10
|
import requests
|
|
11
11
|
|
|
12
|
-
import mirix.utils
|
|
13
|
-
|
|
14
12
|
if TYPE_CHECKING:
|
|
15
13
|
try:
|
|
16
14
|
from composio import ActionType
|
|
@@ -34,12 +32,7 @@ from mirix.constants import (
|
|
|
34
32
|
from mirix.functions.functions import parse_source_code
|
|
35
33
|
from mirix.interface import QueuingInterface
|
|
36
34
|
from mirix.orm.errors import NoResultFound
|
|
37
|
-
from mirix.schemas.agent import
|
|
38
|
-
AgentState,
|
|
39
|
-
AgentType,
|
|
40
|
-
CreateAgent,
|
|
41
|
-
CreateMetaAgent,
|
|
42
|
-
)
|
|
35
|
+
from mirix.schemas.agent import AgentState, AgentType, CreateAgent, CreateMetaAgent
|
|
43
36
|
from mirix.schemas.block import Block, BlockUpdate, CreateBlock, Human, Persona
|
|
44
37
|
from mirix.schemas.embedding_config import EmbeddingConfig
|
|
45
38
|
|
|
@@ -53,11 +46,7 @@ from mirix.schemas.environment_variables import (
|
|
|
53
46
|
from mirix.schemas.file import FileMetadata
|
|
54
47
|
from mirix.schemas.file import FileMetadata as PydanticFileMetadata
|
|
55
48
|
from mirix.schemas.llm_config import LLMConfig
|
|
56
|
-
from mirix.schemas.memory import
|
|
57
|
-
ArchivalMemorySummary,
|
|
58
|
-
Memory,
|
|
59
|
-
RecallMemorySummary,
|
|
60
|
-
)
|
|
49
|
+
from mirix.schemas.memory import ArchivalMemorySummary, Memory, RecallMemorySummary
|
|
61
50
|
from mirix.schemas.message import Message, MessageCreate
|
|
62
51
|
from mirix.schemas.mirix_message_content import (
|
|
63
52
|
CloudFileContent,
|
|
@@ -77,7 +66,8 @@ from mirix.schemas.sandbox_config import (
|
|
|
77
66
|
)
|
|
78
67
|
from mirix.schemas.tool import Tool, ToolCreate, ToolUpdate
|
|
79
68
|
from mirix.schemas.tool_rule import BaseToolRule
|
|
80
|
-
from mirix.schemas.user import User as PydanticUser
|
|
69
|
+
from mirix.schemas.user import User as PydanticUser
|
|
70
|
+
from mirix.schemas.user import UserCreate
|
|
81
71
|
|
|
82
72
|
|
|
83
73
|
def create_client():
|
|
@@ -461,7 +451,7 @@ class LocalClient(AbstractClient):
|
|
|
461
451
|
from mirix.server.server import SyncServer
|
|
462
452
|
|
|
463
453
|
# set logging levels
|
|
464
|
-
|
|
454
|
+
# DEBUG flag not needed for LocalClient (server-side only)
|
|
465
455
|
logging.getLogger().setLevel(logging.CRITICAL)
|
|
466
456
|
|
|
467
457
|
# save default model config
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Client-side constants - minimal set needed by schemas and client code.
|
|
3
|
+
|
|
4
|
+
These are the constants required by the client package (schemas, helpers, client).
|
|
5
|
+
The full server constants module (mirix.constants) imports from here and adds
|
|
6
|
+
additional server-only constants.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
# Embedding constants
|
|
10
|
+
MAX_EMBEDDING_DIM = 4096 # maximum supported embedding size - do NOT change or else DBs will need to be reset
|
|
11
|
+
DEFAULT_EMBEDDING_CHUNK_SIZE = 300
|
|
12
|
+
MIN_CONTEXT_WINDOW = 4096
|
|
13
|
+
|
|
14
|
+
# Memory limits
|
|
15
|
+
CORE_MEMORY_BLOCK_CHAR_LIMIT: int = 5000
|
|
16
|
+
|
|
17
|
+
# Function/Tool constants
|
|
18
|
+
FUNCTION_RETURN_CHAR_LIMIT = 60000 # ~300 words
|
|
19
|
+
TOOL_CALL_ID_MAX_LEN = 29
|
|
20
|
+
|
|
21
|
+
# Tool module names
|
|
22
|
+
COMPOSIO_TOOL_TAG_NAME = "composio"
|
|
23
|
+
MIRIX_CORE_TOOL_MODULE_NAME = "mirix.functions.function_sets.base"
|
|
24
|
+
MIRIX_MEMORY_TOOL_MODULE_NAME = "mirix.functions.function_sets.memory_tools"
|
|
25
|
+
MIRIX_EXTRA_TOOL_MODULE_NAME = "mirix.functions.function_sets.extras"
|
|
26
|
+
|
|
27
|
+
# Message defaults
|
|
28
|
+
DEFAULT_MESSAGE_TOOL = "send_message"
|
|
29
|
+
DEFAULT_MESSAGE_TOOL_KWARG = "message"
|
|
30
|
+
|
|
31
|
+
# LLM model token limits
|
|
32
|
+
LLM_MAX_TOKENS = {
|
|
33
|
+
"DEFAULT": 8192,
|
|
34
|
+
## OpenAI models: https://platform.openai.com/docs/models/overview
|
|
35
|
+
"chatgpt-4o-latest": 128000,
|
|
36
|
+
"gpt-4o-2024-08-06": 128000,
|
|
37
|
+
"gpt-4-turbo-preview": 128000,
|
|
38
|
+
"gpt-4o": 128000,
|
|
39
|
+
"gpt-3.5-turbo-instruct": 16385,
|
|
40
|
+
"gpt-4-0125-preview": 128000,
|
|
41
|
+
"gpt-3.5-turbo-0125": 16385,
|
|
42
|
+
"gpt-4-turbo-2024-04-09": 128000,
|
|
43
|
+
"gpt-4-turbo": 8192,
|
|
44
|
+
"gpt-4o-2024-05-13": 128000,
|
|
45
|
+
"gpt-4o-mini": 128000,
|
|
46
|
+
"gpt-4o-mini-2024-07-18": 128000,
|
|
47
|
+
"gpt-4-1106-preview": 128000,
|
|
48
|
+
"gpt-4": 8192,
|
|
49
|
+
"gpt-4-32k": 32768,
|
|
50
|
+
"gpt-4-0613": 8192,
|
|
51
|
+
"gpt-4-32k-0613": 32768,
|
|
52
|
+
"gpt-4-0314": 8192, # legacy
|
|
53
|
+
"gpt-4-32k-0314": 32768, # legacy
|
|
54
|
+
"gpt-3.5-turbo-1106": 16385,
|
|
55
|
+
"gpt-3.5-turbo": 4096,
|
|
56
|
+
"gpt-3.5-turbo-16k": 16385,
|
|
57
|
+
"gpt-3.5-turbo-0613": 4096, # legacy
|
|
58
|
+
"gpt-3.5-turbo-16k-0613": 16385, # legacy
|
|
59
|
+
"gpt-3.5-turbo-0301": 4096, # legacy
|
|
60
|
+
}
|
mirix/client/utils.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Lightweight utilities for Mirix client package.
|
|
3
|
+
|
|
4
|
+
Contains only essential utility functions needed by the client,
|
|
5
|
+
without heavy dependencies.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import json
|
|
9
|
+
from datetime import datetime, timezone
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def get_utc_time() -> datetime:
|
|
13
|
+
"""Get the current UTC time"""
|
|
14
|
+
return datetime.now(timezone.utc)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def json_dumps(data, indent=2):
|
|
18
|
+
"""
|
|
19
|
+
JSON serializer that handles datetime objects.
|
|
20
|
+
|
|
21
|
+
Args:
|
|
22
|
+
data: Data to serialize
|
|
23
|
+
indent: JSON indentation level
|
|
24
|
+
|
|
25
|
+
Returns:
|
|
26
|
+
str: JSON string
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
def safe_serializer(obj):
|
|
30
|
+
if isinstance(obj, datetime):
|
|
31
|
+
return obj.isoformat()
|
|
32
|
+
raise TypeError(f"Type {type(obj)} not serializable")
|
|
33
|
+
|
|
34
|
+
return json.dumps(data, indent=indent, default=safe_serializer, ensure_ascii=False)
|
mirix/schemas/agent.py
CHANGED
|
@@ -3,7 +3,7 @@ from typing import Any, Dict, List, Optional, Union
|
|
|
3
3
|
|
|
4
4
|
from pydantic import BaseModel, Field, field_validator
|
|
5
5
|
|
|
6
|
-
from mirix.constants import DEFAULT_EMBEDDING_CHUNK_SIZE
|
|
6
|
+
from mirix.client.constants import DEFAULT_EMBEDDING_CHUNK_SIZE
|
|
7
7
|
from mirix.helpers import ToolRulesSolver
|
|
8
8
|
from mirix.schemas.block import CreateBlock
|
|
9
9
|
from mirix.schemas.embedding_config import EmbeddingConfig
|
|
@@ -14,7 +14,8 @@ from mirix.schemas.mirix_base import OrmMetadataBase
|
|
|
14
14
|
from mirix.schemas.openai.chat_completion_response import UsageStatistics
|
|
15
15
|
from mirix.schemas.tool import Tool
|
|
16
16
|
from mirix.schemas.tool_rule import ToolRule
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
# Removed create_random_username import - server generates names if not provided
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
class AgentType(str, Enum):
|
|
@@ -108,9 +109,9 @@ class AgentState(OrmMetadataBase, validate_assignment=True):
|
|
|
108
109
|
|
|
109
110
|
class CreateAgent(BaseModel, validate_assignment=True): #
|
|
110
111
|
# all optional as server can generate defaults
|
|
111
|
-
name: str = Field(
|
|
112
|
-
|
|
113
|
-
description="The name of the agent.",
|
|
112
|
+
name: Optional[str] = Field(
|
|
113
|
+
None,
|
|
114
|
+
description="The name of the agent. If not provided, server will generate one.",
|
|
114
115
|
)
|
|
115
116
|
|
|
116
117
|
# memory creation
|
mirix/schemas/block.py
CHANGED
|
@@ -3,7 +3,7 @@ from typing import Optional
|
|
|
3
3
|
from pydantic import BaseModel, Field, model_validator
|
|
4
4
|
from typing_extensions import Self
|
|
5
5
|
|
|
6
|
-
from mirix.constants import CORE_MEMORY_BLOCK_CHAR_LIMIT
|
|
6
|
+
from mirix.client.constants import CORE_MEMORY_BLOCK_CHAR_LIMIT
|
|
7
7
|
from mirix.schemas.mirix_base import MirixBase
|
|
8
8
|
|
|
9
9
|
# block of the LLM context
|
mirix/schemas/episodic_memory.py
CHANGED
|
@@ -3,10 +3,10 @@ from typing import Any, Dict, List, Optional
|
|
|
3
3
|
|
|
4
4
|
from pydantic import Field, field_validator
|
|
5
5
|
|
|
6
|
-
from mirix.
|
|
6
|
+
from mirix.client.utils import get_utc_time
|
|
7
|
+
from mirix.client.constants import MAX_EMBEDDING_DIM
|
|
7
8
|
from mirix.schemas.embedding_config import EmbeddingConfig
|
|
8
9
|
from mirix.schemas.mirix_base import MirixBase
|
|
9
|
-
from mirix.utils import get_utc_time
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class EpisodicEventBase(MirixBase):
|
mirix/schemas/knowledge_vault.py
CHANGED
|
@@ -3,10 +3,10 @@ from typing import Any, Dict, List, Optional
|
|
|
3
3
|
|
|
4
4
|
from pydantic import Field, field_validator
|
|
5
5
|
|
|
6
|
-
from mirix.
|
|
6
|
+
from mirix.client.utils import get_utc_time
|
|
7
|
+
from mirix.client.constants import MAX_EMBEDDING_DIM
|
|
7
8
|
from mirix.schemas.embedding_config import EmbeddingConfig
|
|
8
9
|
from mirix.schemas.mirix_base import MirixBase
|
|
9
|
-
from mirix.utils import get_utc_time
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class KnowledgeVaultItemBase(MirixBase):
|
mirix/schemas/memory.py
CHANGED
|
@@ -7,7 +7,7 @@ from pydantic import BaseModel, Field
|
|
|
7
7
|
if TYPE_CHECKING:
|
|
8
8
|
from mirix.schemas.agent import AgentState
|
|
9
9
|
|
|
10
|
-
from mirix.constants import CORE_MEMORY_BLOCK_CHAR_LIMIT
|
|
10
|
+
from mirix.client.constants import CORE_MEMORY_BLOCK_CHAR_LIMIT
|
|
11
11
|
from mirix.schemas.block import Block
|
|
12
12
|
from mirix.schemas.message import Message
|
|
13
13
|
from mirix.schemas.openai.chat_completion_request import Tool
|
mirix/schemas/message.py
CHANGED
|
@@ -10,7 +10,7 @@ from typing import Any, Dict, List, Literal, Optional, Union
|
|
|
10
10
|
|
|
11
11
|
from pydantic import BaseModel, Field, field_validator
|
|
12
12
|
|
|
13
|
-
from mirix.constants import (
|
|
13
|
+
from mirix.client.constants import (
|
|
14
14
|
DEFAULT_MESSAGE_TOOL,
|
|
15
15
|
DEFAULT_MESSAGE_TOOL_KWARG,
|
|
16
16
|
TOOL_CALL_ID_MAX_LEN,
|
mirix/schemas/mirix_request.py
CHANGED
|
@@ -2,7 +2,7 @@ from typing import List
|
|
|
2
2
|
|
|
3
3
|
from pydantic import BaseModel, Field
|
|
4
4
|
|
|
5
|
-
from mirix.constants import DEFAULT_MESSAGE_TOOL, DEFAULT_MESSAGE_TOOL_KWARG
|
|
5
|
+
from mirix.client.constants import DEFAULT_MESSAGE_TOOL, DEFAULT_MESSAGE_TOOL_KWARG
|
|
6
6
|
from mirix.schemas.message import MessageCreate
|
|
7
7
|
|
|
8
8
|
|
mirix/schemas/mirix_response.py
CHANGED
|
@@ -5,10 +5,10 @@ from typing import List, Union
|
|
|
5
5
|
|
|
6
6
|
from pydantic import BaseModel, Field
|
|
7
7
|
|
|
8
|
+
from mirix.client.utils import json_dumps
|
|
8
9
|
from mirix.schemas.enums import MessageStreamStatus
|
|
9
10
|
from mirix.schemas.mirix_message import MirixMessage, MirixMessageUnion
|
|
10
11
|
from mirix.schemas.usage import MirixUsageStatistics
|
|
11
|
-
from mirix.utils import json_dumps
|
|
12
12
|
|
|
13
13
|
# TODO: consider moving into own file
|
|
14
14
|
|
mirix/schemas/organization.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import uuid
|
|
1
2
|
from datetime import datetime
|
|
2
3
|
from typing import Optional
|
|
3
|
-
import uuid
|
|
4
4
|
|
|
5
5
|
from pydantic import Field
|
|
6
6
|
|
|
7
|
+
from mirix.client.utils import get_utc_time
|
|
7
8
|
from mirix.schemas.mirix_base import MirixBase
|
|
8
|
-
from mirix.utils import create_random_username, get_utc_time
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class OrganizationBase(MirixBase):
|
|
@@ -22,9 +22,9 @@ class Organization(OrganizationBase):
|
|
|
22
22
|
default_factory=_generate_org_id,
|
|
23
23
|
description="The unique identifier of the organization.",
|
|
24
24
|
)
|
|
25
|
-
name: str = Field(
|
|
26
|
-
|
|
27
|
-
description="The name of the organization.",
|
|
25
|
+
name: Optional[str] = Field(
|
|
26
|
+
None,
|
|
27
|
+
description="The name of the organization. Server will generate if not provided.",
|
|
28
28
|
json_schema_extra={"default": "SincereYogurt"},
|
|
29
29
|
)
|
|
30
30
|
created_at: Optional[datetime] = Field(
|
|
@@ -3,10 +3,10 @@ from typing import Any, Dict, List, Optional
|
|
|
3
3
|
|
|
4
4
|
from pydantic import Field, field_validator
|
|
5
5
|
|
|
6
|
-
from mirix.
|
|
6
|
+
from mirix.client.utils import get_utc_time
|
|
7
|
+
from mirix.client.constants import MAX_EMBEDDING_DIM
|
|
7
8
|
from mirix.schemas.embedding_config import EmbeddingConfig
|
|
8
9
|
from mirix.schemas.mirix_base import MirixBase
|
|
9
|
-
from mirix.utils import get_utc_time
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class ProceduralMemoryItemBase(MirixBase):
|
mirix/schemas/providers.py
CHANGED
|
@@ -3,7 +3,7 @@ from typing import List, Optional
|
|
|
3
3
|
|
|
4
4
|
from pydantic import Field, model_validator
|
|
5
5
|
|
|
6
|
-
from mirix.constants import LLM_MAX_TOKENS, MIN_CONTEXT_WINDOW
|
|
6
|
+
from mirix.client.constants import LLM_MAX_TOKENS, MIN_CONTEXT_WINDOW
|
|
7
7
|
from mirix.llm_api.azure_openai import (
|
|
8
8
|
get_azure_chat_completions_endpoint,
|
|
9
9
|
get_azure_embeddings_endpoint,
|
mirix/schemas/resource_memory.py
CHANGED
|
@@ -3,10 +3,10 @@ from typing import Any, Dict, List, Optional
|
|
|
3
3
|
|
|
4
4
|
from pydantic import Field, field_validator
|
|
5
5
|
|
|
6
|
-
from mirix.constants import MAX_EMBEDDING_DIM
|
|
6
|
+
from mirix.client.constants import MAX_EMBEDDING_DIM
|
|
7
7
|
from mirix.schemas.embedding_config import EmbeddingConfig
|
|
8
8
|
from mirix.schemas.mirix_base import MirixBase
|
|
9
|
-
from mirix.utils import get_utc_time
|
|
9
|
+
from mirix.client.utils import get_utc_time
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class ResourceMemoryItemBase(MirixBase):
|
mirix/schemas/semantic_memory.py
CHANGED
|
@@ -3,10 +3,10 @@ from typing import Any, Dict, List, Optional
|
|
|
3
3
|
|
|
4
4
|
from pydantic import Field, field_validator
|
|
5
5
|
|
|
6
|
-
from mirix.constants import MAX_EMBEDDING_DIM
|
|
6
|
+
from mirix.client.constants import MAX_EMBEDDING_DIM
|
|
7
7
|
from mirix.schemas.embedding_config import EmbeddingConfig
|
|
8
8
|
from mirix.schemas.mirix_base import MirixBase
|
|
9
|
-
from mirix.utils import get_utc_time
|
|
9
|
+
from mirix.client.utils import get_utc_time
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class SemanticMemoryItemBase(MirixBase):
|
mirix/schemas/tool.py
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|