camel-ai 0.1.6.8__py3-none-any.whl → 0.1.6.9__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/retrievers/auto_retriever.py +4 -1
- camel/retrievers/vector_retriever.py +6 -1
- {camel_ai-0.1.6.8.dist-info → camel_ai-0.1.6.9.dist-info}/METADATA +2 -2
- {camel_ai-0.1.6.8.dist-info → camel_ai-0.1.6.9.dist-info}/RECORD +6 -6
- {camel_ai-0.1.6.8.dist-info → camel_ai-0.1.6.9.dist-info}/WHEEL +0 -0
camel/__init__.py
CHANGED
|
@@ -181,6 +181,7 @@ class AutoRetriever:
|
|
|
181
181
|
top_k: int = DEFAULT_TOP_K_RESULTS,
|
|
182
182
|
similarity_threshold: float = DEFAULT_SIMILARITY_THRESHOLD,
|
|
183
183
|
return_detailed_info: bool = False,
|
|
184
|
+
max_characters: int = 500,
|
|
184
185
|
) -> dict[str, Sequence[Collection[str]]]:
|
|
185
186
|
r"""Executes the automatic vector retriever process using vector
|
|
186
187
|
storage.
|
|
@@ -198,6 +199,8 @@ class AutoRetriever:
|
|
|
198
199
|
return_detailed_info (bool, optional): Whether to return detailed
|
|
199
200
|
information including similarity score, content path and
|
|
200
201
|
metadata. Defaults to `False`.
|
|
202
|
+
max_characters (int): Max number of characters in each chunk.
|
|
203
|
+
Defaults to `500`.
|
|
201
204
|
|
|
202
205
|
Returns:
|
|
203
206
|
dict[str, Sequence[Collection[str]]]: By default, returns
|
|
@@ -262,7 +265,7 @@ class AutoRetriever:
|
|
|
262
265
|
storage=vector_storage_instance,
|
|
263
266
|
embedding_model=self.embedding_model,
|
|
264
267
|
)
|
|
265
|
-
vr.process(content)
|
|
268
|
+
vr.process(content=content, max_characters=max_characters)
|
|
266
269
|
else:
|
|
267
270
|
vr = VectorRetriever(
|
|
268
271
|
storage=vector_storage_instance,
|
|
@@ -76,6 +76,7 @@ class VectorRetriever(BaseRetriever):
|
|
|
76
76
|
self,
|
|
77
77
|
content: Union[str, Element],
|
|
78
78
|
chunk_type: str = "chunk_by_title",
|
|
79
|
+
max_characters: int = 500,
|
|
79
80
|
**kwargs: Any,
|
|
80
81
|
) -> None:
|
|
81
82
|
r"""Processes content from a file or URL, divides it into chunks by
|
|
@@ -87,6 +88,8 @@ class VectorRetriever(BaseRetriever):
|
|
|
87
88
|
string content or Element object.
|
|
88
89
|
chunk_type (str): Type of chunking going to apply. Defaults to
|
|
89
90
|
"chunk_by_title".
|
|
91
|
+
max_characters (int): Max number of characters in each chunk.
|
|
92
|
+
Defaults to `500`.
|
|
90
93
|
**kwargs (Any): Additional keyword arguments for content parsing.
|
|
91
94
|
"""
|
|
92
95
|
if isinstance(content, Element):
|
|
@@ -101,7 +104,9 @@ class VectorRetriever(BaseRetriever):
|
|
|
101
104
|
elements = [self.uio.create_element_from_text(text=content)]
|
|
102
105
|
if elements:
|
|
103
106
|
chunks = self.uio.chunk_elements(
|
|
104
|
-
chunk_type=chunk_type,
|
|
107
|
+
chunk_type=chunk_type,
|
|
108
|
+
elements=elements,
|
|
109
|
+
max_characters=max_characters,
|
|
105
110
|
)
|
|
106
111
|
if not elements:
|
|
107
112
|
warnings.warn(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: camel-ai
|
|
3
|
-
Version: 0.1.6.
|
|
3
|
+
Version: 0.1.6.9
|
|
4
4
|
Summary: Communicative Agents for AI Society Study
|
|
5
5
|
Home-page: https://www.camel-ai.org/
|
|
6
6
|
License: Apache-2.0
|
|
@@ -211,7 +211,7 @@ conda create --name camel python=3.10
|
|
|
211
211
|
conda activate camel
|
|
212
212
|
|
|
213
213
|
# Clone github repo
|
|
214
|
-
git clone -b v0.1.6.
|
|
214
|
+
git clone -b v0.1.6.9 https://github.com/camel-ai/camel.git
|
|
215
215
|
|
|
216
216
|
# Change directory into project directory
|
|
217
217
|
cd camel
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
camel/__init__.py,sha256=
|
|
1
|
+
camel/__init__.py,sha256=NpUPP_J-proe5Nrf3866fjfSUgSJqji94yPPEOStrZY,780
|
|
2
2
|
camel/agents/__init__.py,sha256=SSU1wbhZXWwQnE0rRxkpyN57kEu72KklsZNcdLkXfTs,1551
|
|
3
3
|
camel/agents/base.py,sha256=X39qWSiT1WnDqaJ9k3gQrTpOQSwUKzNEVpp5AY6fDH8,1130
|
|
4
4
|
camel/agents/chat_agent.py,sha256=S2ZP8hC_Wjursnd0mxk0Iq4BYA_UedyolyValuyAYZY,37418
|
|
@@ -98,11 +98,11 @@ camel/prompts/video_description_prompt.py,sha256=HRd3fHXftKwBm5QH7Tvm3FabgZPCoAv
|
|
|
98
98
|
camel/responses/__init__.py,sha256=edtTQskOgq5obyITziRFL62HTJP9sAikAtP9vrFacEQ,795
|
|
99
99
|
camel/responses/agent_responses.py,sha256=sGlGwXz2brWI-FpiU5EhVRpZvcfGWUmooAF0ukqAF3I,1771
|
|
100
100
|
camel/retrievers/__init__.py,sha256=CuP3B77zl2PoF-W2y9xSkTGRzoK2J4TlUHdCtuJD8dg,1059
|
|
101
|
-
camel/retrievers/auto_retriever.py,sha256=
|
|
101
|
+
camel/retrievers/auto_retriever.py,sha256=GeSdulUu05_7VulgEO5aGnXp8ESHFJSvvH3A9TDuo5E,12580
|
|
102
102
|
camel/retrievers/base.py,sha256=sgqaJDwIkWluEgPBlukFN7RYZJnrp0imCAOEWm6bZ40,2646
|
|
103
103
|
camel/retrievers/bm25_retriever.py,sha256=Dr7Yfkjw45sovI1EVNByGIMj7KERWrr8JHlh8csSF1s,5155
|
|
104
104
|
camel/retrievers/cohere_rerank_retriever.py,sha256=HvnFqXpsX9EdBOab0kFLDyxxJnknPFMVxyQJQDlHbOA,4100
|
|
105
|
-
camel/retrievers/vector_retriever.py,sha256=
|
|
105
|
+
camel/retrievers/vector_retriever.py,sha256=SYqWsL7A0OWeuRdLXMT1jGxITscfvmFd_K0ITEk1-Ng,8227
|
|
106
106
|
camel/societies/__init__.py,sha256=JhGwUHjht4CewzC3shKuxmgB3oS7FIxIxmiKyhNsfIs,832
|
|
107
107
|
camel/societies/babyagi_playing.py,sha256=tZTcfQrD9ECUhkqwdthsM2yFPfYGKsoAGMfTlrxt5as,11675
|
|
108
108
|
camel/societies/role_playing.py,sha256=ZiiT1RtS3cQtV3XqyAXOH_Up7-b7WRDznC2qiX4PDGg,22982
|
|
@@ -190,6 +190,6 @@ camel/workforce/utils.py,sha256=Z-kODz5PMPtfeKKVqpcQq-b-B8oqC7XSwi_F3__Ijhs,3526
|
|
|
190
190
|
camel/workforce/worker_node.py,sha256=wsRqk2rugCvvkcmCzvn-y-gQuyuJGAG8PIr1KtgqJFw,3878
|
|
191
191
|
camel/workforce/workforce.py,sha256=SVJJgSSkYvk05RgL9oaJzHwzziH7u51KLINRuzLB8BI,1773
|
|
192
192
|
camel/workforce/workforce_prompt.py,sha256=cAWYEIA0rau5itEekSoUIFttBzpKM9RzB6x-mfukGSU,4665
|
|
193
|
-
camel_ai-0.1.6.
|
|
194
|
-
camel_ai-0.1.6.
|
|
195
|
-
camel_ai-0.1.6.
|
|
193
|
+
camel_ai-0.1.6.9.dist-info/METADATA,sha256=E2QUNSqrJAet4ECGMU7q3SbnR5D0zsu8eFq8wHkBJ8U,24500
|
|
194
|
+
camel_ai-0.1.6.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
195
|
+
camel_ai-0.1.6.9.dist-info/RECORD,,
|
|
File without changes
|