Skip to content

Commit e6f6796

Browse files
authored
chore: update doc for agents, move bot under camel (#990)
1 parent e01356a commit e6f6796

26 files changed

+1663
-1192
lines changed
File renamed without changes.

examples/bots/discord_bot.py renamed to camel/bots/discord_bot.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
from camel.retrievers import AutoRetriever
2020
from camel.utils import dependencies_required
2121

22+
try:
23+
from unstructured.documents.elements import Element
24+
except ImportError:
25+
Element = None
26+
2227
if TYPE_CHECKING:
2328
from discord import Message
2429

@@ -36,12 +41,15 @@ class DiscordBot:
3641
contents for RAG.
3742
top_k (int): Top choice for the RAG response.
3843
return_detailed_info (bool): If show detailed info of the RAG response.
44+
contents (Union[str, List[str], Element, List[Element]], optional):
45+
Local file paths, remote URLs, string contents or Element objects.
3946
"""
4047

4148
@dependencies_required('discord')
4249
def __init__(
4350
self,
4451
chat_agent: ChatAgent,
52+
contents: Union[str, List[str], Element, List[Element]] = None,
4553
channel_ids: Optional[List[int]] = None,
4654
discord_token: Optional[str] = None,
4755
auto_retriever: Optional[AutoRetriever] = None,
@@ -56,6 +64,7 @@ def __init__(
5664
self.vector_storage_local_path = vector_storage_local_path
5765
self.top_k = top_k
5866
self.return_detailed_info = return_detailed_info
67+
self.contents = contents
5968

6069
if not self.token:
6170
raise ValueError(

examples/bots/telegram_bot.py renamed to camel/bots/telegram_bot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
# Conditionally import telebot types only for type checking
2222
if TYPE_CHECKING:
23-
from telebot.types import (
24-
Message, # type: ignore[import-not-found]
23+
from telebot.types import ( # type: ignore[import-untyped]
24+
Message,
2525
)
2626

2727

@@ -51,7 +51,7 @@ def __init__(
5151
else:
5252
self.token = telegram_token
5353

54-
import telebot # type: ignore[import-not-found]
54+
import telebot # type: ignore[import-untyped]
5555

5656
self.bot = telebot.TeleBot(token=self.token)
5757

docs/agents/critic_agents_and_tree_search.md

Lines changed: 0 additions & 190 deletions
This file was deleted.

docs/agents/embodied_agents.md

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)