amrita_core 0.1.0__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.
- amrita_core/__init__.py +101 -0
- amrita_core/builtins/__init__.py +7 -0
- amrita_core/builtins/adapter.py +148 -0
- amrita_core/builtins/agent.py +415 -0
- amrita_core/builtins/tools.py +64 -0
- amrita_core/chatmanager.py +896 -0
- amrita_core/config.py +159 -0
- amrita_core/hook/event.py +90 -0
- amrita_core/hook/exception.py +14 -0
- amrita_core/hook/matcher.py +213 -0
- amrita_core/hook/on.py +14 -0
- amrita_core/libchat.py +189 -0
- amrita_core/logging.py +71 -0
- amrita_core/preset.py +166 -0
- amrita_core/protocol.py +101 -0
- amrita_core/tokenizer.py +115 -0
- amrita_core/tools/manager.py +163 -0
- amrita_core/tools/mcp.py +338 -0
- amrita_core/tools/models.py +353 -0
- amrita_core/types.py +274 -0
- amrita_core/utils.py +66 -0
- amrita_core-0.1.0.dist-info/METADATA +73 -0
- amrita_core-0.1.0.dist-info/RECORD +26 -0
- amrita_core-0.1.0.dist-info/WHEEL +5 -0
- amrita_core-0.1.0.dist-info/licenses/LICENSE +661 -0
- amrita_core-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
from amrita_core.tools.models import (
|
|
2
|
+
FunctionDefinitionSchema,
|
|
3
|
+
FunctionParametersSchema,
|
|
4
|
+
FunctionPropertySchema,
|
|
5
|
+
ToolFunctionSchema,
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
PROCESS_MESSAGE_TOOL = FunctionDefinitionSchema(
|
|
9
|
+
name="processing_message",
|
|
10
|
+
description="Describe what the agent is currently doing and express the agent's internal thoughts to the user. Use this when you need to communicate your current actions or internal reasoning to the user, not for general completion.",
|
|
11
|
+
parameters=FunctionParametersSchema(
|
|
12
|
+
type="object",
|
|
13
|
+
properties={
|
|
14
|
+
"content": FunctionPropertySchema(
|
|
15
|
+
description="Message content, describe in the tone of system instructions what you are doing or interacting with the user.",
|
|
16
|
+
type="string",
|
|
17
|
+
),
|
|
18
|
+
},
|
|
19
|
+
required=["content"],
|
|
20
|
+
),
|
|
21
|
+
)
|
|
22
|
+
PROCESS_MESSAGE = ToolFunctionSchema(
|
|
23
|
+
type="function",
|
|
24
|
+
function=PROCESS_MESSAGE_TOOL,
|
|
25
|
+
strict=True,
|
|
26
|
+
)
|
|
27
|
+
STOP_TOOL = ToolFunctionSchema(
|
|
28
|
+
type="function",
|
|
29
|
+
function=FunctionDefinitionSchema(
|
|
30
|
+
name="agent_stop",
|
|
31
|
+
description="Call this tool to indicate that you have gathered enough information and are ready to formulate the final answer to the user.\n"
|
|
32
|
+
+ " After calling this, you should NOT call any other tools, but directly provide the completion",
|
|
33
|
+
parameters=FunctionParametersSchema(
|
|
34
|
+
type="object",
|
|
35
|
+
properties={
|
|
36
|
+
"result": FunctionPropertySchema(
|
|
37
|
+
type="string",
|
|
38
|
+
description="Simply illustrate what you did during the chat task.(Optional)",
|
|
39
|
+
)
|
|
40
|
+
},
|
|
41
|
+
required=[],
|
|
42
|
+
),
|
|
43
|
+
),
|
|
44
|
+
strict=True,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
REASONING_TOOL = ToolFunctionSchema(
|
|
48
|
+
type="function",
|
|
49
|
+
function=FunctionDefinitionSchema(
|
|
50
|
+
name="think_and_reason",
|
|
51
|
+
description="Think about what you should do next, always call this tool to think when completing a tool call.",
|
|
52
|
+
parameters=FunctionParametersSchema(
|
|
53
|
+
type="object",
|
|
54
|
+
properties={
|
|
55
|
+
"content": FunctionPropertySchema(
|
|
56
|
+
description="What you should do next",
|
|
57
|
+
type="string",
|
|
58
|
+
),
|
|
59
|
+
},
|
|
60
|
+
required=["content"],
|
|
61
|
+
),
|
|
62
|
+
),
|
|
63
|
+
strict=True,
|
|
64
|
+
)
|