camel-ai 0.2.79a0__py3-none-any.whl → 0.2.79a1__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.
Potentially problematic release.
This version of camel-ai might be problematic. Click here for more details.
- camel/__init__.py +1 -1
- camel/agents/_utils.py +38 -0
- camel/agents/chat_agent.py +788 -255
- camel/memories/agent_memories.py +34 -0
- camel/memories/base.py +26 -0
- camel/memories/blocks/chat_history_block.py +115 -0
- camel/memories/context_creators/score_based.py +25 -384
- camel/messages/base.py +26 -0
- camel/models/azure_openai_model.py +113 -67
- camel/models/model_factory.py +17 -1
- camel/models/openai_compatible_model.py +62 -32
- camel/models/openai_model.py +61 -35
- camel/models/samba_model.py +34 -15
- camel/models/sglang_model.py +41 -11
- camel/societies/workforce/__init__.py +2 -0
- camel/societies/workforce/role_playing_worker.py +15 -11
- camel/societies/workforce/single_agent_worker.py +86 -364
- camel/societies/workforce/utils.py +2 -1
- camel/societies/workforce/workflow_memory_manager.py +772 -0
- camel/societies/workforce/workforce.py +96 -32
- camel/storages/vectordb_storages/oceanbase.py +5 -4
- camel/toolkits/file_toolkit.py +166 -0
- camel/toolkits/message_integration.py +15 -13
- camel/toolkits/terminal_toolkit/terminal_toolkit.py +112 -79
- camel/types/enums.py +1 -0
- camel/utils/context_utils.py +148 -2
- {camel_ai-0.2.79a0.dist-info → camel_ai-0.2.79a1.dist-info}/METADATA +1 -1
- {camel_ai-0.2.79a0.dist-info → camel_ai-0.2.79a1.dist-info}/RECORD +30 -29
- {camel_ai-0.2.79a0.dist-info → camel_ai-0.2.79a1.dist-info}/WHEEL +0 -0
- {camel_ai-0.2.79a0.dist-info → camel_ai-0.2.79a1.dist-info}/licenses/LICENSE +0 -0
camel/__init__.py
CHANGED
camel/agents/_utils.py
CHANGED
|
@@ -25,6 +25,44 @@ from camel.types.agents import ToolCallingRecord
|
|
|
25
25
|
logger = logging.getLogger(__name__)
|
|
26
26
|
|
|
27
27
|
|
|
28
|
+
def build_default_summary_prompt(conversation_text: str) -> str:
|
|
29
|
+
r"""Create the default prompt used for conversation summarization.
|
|
30
|
+
|
|
31
|
+
Args:
|
|
32
|
+
conversation_text (str): The conversation to be summarized.
|
|
33
|
+
|
|
34
|
+
Returns:
|
|
35
|
+
str: A formatted prompt instructing the model to produce a structured
|
|
36
|
+
markdown summary.
|
|
37
|
+
"""
|
|
38
|
+
template = textwrap.dedent(
|
|
39
|
+
"""\
|
|
40
|
+
Summarize the conversation below.
|
|
41
|
+
Produce markdown that strictly follows this outline and numbering:
|
|
42
|
+
|
|
43
|
+
Summary:
|
|
44
|
+
1. **Primary Request and Intent**:
|
|
45
|
+
2. **Key Concepts**:
|
|
46
|
+
3. **Errors and Fixes**:
|
|
47
|
+
4. **Problem Solving**:
|
|
48
|
+
5. **Pending Tasks**:
|
|
49
|
+
6. **Current Work**:
|
|
50
|
+
7. **Optional Next Step**:
|
|
51
|
+
|
|
52
|
+
Requirements:
|
|
53
|
+
- Use bullet lists under each section (`- item`). If a section has no
|
|
54
|
+
information, output `- None noted`.
|
|
55
|
+
- Keep the ordering, headings, and formatting as written above.
|
|
56
|
+
- Focus on concrete actions, findings, and decisions.
|
|
57
|
+
- Do not invent details that are not supported by the conversation.
|
|
58
|
+
|
|
59
|
+
Conversation:
|
|
60
|
+
{conversation_text}
|
|
61
|
+
"""
|
|
62
|
+
)
|
|
63
|
+
return template.format(conversation_text=conversation_text)
|
|
64
|
+
|
|
65
|
+
|
|
28
66
|
def generate_tool_prompt(tool_schema_list: List[Dict[str, Any]]) -> str:
|
|
29
67
|
r"""Generates a tool prompt based on the provided tool schema list.
|
|
30
68
|
|