diff --git a/_modules/agentscope/agents/agent.html b/_modules/agentscope/agents/agent.html index ca06b1ce0..e1b2094c6 100644 --- a/_modules/agentscope/agents/agent.html +++ b/_modules/agentscope/agents/agent.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/agents/dialog_agent.html b/_modules/agentscope/agents/dialog_agent.html index 20abb8f63..584b73fe2 100644 --- a/_modules/agentscope/agents/dialog_agent.html +++ b/_modules/agentscope/agents/dialog_agent.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/agents/dict_dialog_agent.html b/_modules/agentscope/agents/dict_dialog_agent.html index d1db16b0e..42245f1d5 100644 --- a/_modules/agentscope/agents/dict_dialog_agent.html +++ b/_modules/agentscope/agents/dict_dialog_agent.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/agents/operator.html b/_modules/agentscope/agents/operator.html index d26ded367..640765883 100644 --- a/_modules/agentscope/agents/operator.html +++ b/_modules/agentscope/agents/operator.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/agents/rpc_agent.html b/_modules/agentscope/agents/rpc_agent.html index 9bef1d1cd..4754ab876 100644 --- a/_modules/agentscope/agents/rpc_agent.html +++ b/_modules/agentscope/agents/rpc_agent.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/agents/text_to_image_agent.html b/_modules/agentscope/agents/text_to_image_agent.html index beb4d882b..f222f062c 100644 --- a/_modules/agentscope/agents/text_to_image_agent.html +++ b/_modules/agentscope/agents/text_to_image_agent.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/agents/user_agent.html b/_modules/agentscope/agents/user_agent.html index c68e8d3da..f948fd5ae 100644 --- a/_modules/agentscope/agents/user_agent.html +++ b/_modules/agentscope/agents/user_agent.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • @@ -178,6 +178,8 @@

    Source code for agentscope.agents.user_agent

    **kwargs,  # type: ignore[arg-type]
             )
     
    +        self.speak(msg)
    +
             # Add to memory
             self.memory.add(msg)
     
    diff --git a/_modules/agentscope/constants.html b/_modules/agentscope/constants.html
    index 60144df8c..96ad6c742 100644
    --- a/_modules/agentscope/constants.html
    +++ b/_modules/agentscope/constants.html
    @@ -58,7 +58,7 @@
     
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/memory/memory.html b/_modules/agentscope/memory/memory.html index 500cf03a3..b88faa12a 100644 --- a/_modules/agentscope/memory/memory.html +++ b/_modules/agentscope/memory/memory.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/memory/temporary_memory.html b/_modules/agentscope/memory/temporary_memory.html index 06ae52bd4..1f284c999 100644 --- a/_modules/agentscope/memory/temporary_memory.html +++ b/_modules/agentscope/memory/temporary_memory.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/message.html b/_modules/agentscope/message.html index dd02e00dd..4dc608ccb 100644 --- a/_modules/agentscope/message.html +++ b/_modules/agentscope/message.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/models.html b/_modules/agentscope/models.html index 9132c2876..321517f9c 100644 --- a/_modules/agentscope/models.html +++ b/_modules/agentscope/models.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/models/config.html b/_modules/agentscope/models/config.html index a12c88285..88cc07ff8 100644 --- a/_modules/agentscope/models/config.html +++ b/_modules/agentscope/models/config.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/models/model.html b/_modules/agentscope/models/model.html index 7ecaccd93..d476780ae 100644 --- a/_modules/agentscope/models/model.html +++ b/_modules/agentscope/models/model.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/models/openai_model.html b/_modules/agentscope/models/openai_model.html index 86b203237..7cd034904 100644 --- a/_modules/agentscope/models/openai_model.html +++ b/_modules/agentscope/models/openai_model.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/models/post_model.html b/_modules/agentscope/models/post_model.html index 9e30468f4..d82219711 100644 --- a/_modules/agentscope/models/post_model.html +++ b/_modules/agentscope/models/post_model.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/msghub.html b/_modules/agentscope/msghub.html index 6cf9f7a0b..b35a59029 100644 --- a/_modules/agentscope/msghub.html +++ b/_modules/agentscope/msghub.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/pipelines/functional.html b/_modules/agentscope/pipelines/functional.html index 44042cb67..c1fb36730 100644 --- a/_modules/agentscope/pipelines/functional.html +++ b/_modules/agentscope/pipelines/functional.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/pipelines/pipeline.html b/_modules/agentscope/pipelines/pipeline.html index 4878b54e2..597210e73 100644 --- a/_modules/agentscope/pipelines/pipeline.html +++ b/_modules/agentscope/pipelines/pipeline.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/prompt.html b/_modules/agentscope/prompt.html index 5eec874cf..8713dbc21 100644 --- a/_modules/agentscope/prompt.html +++ b/_modules/agentscope/prompt.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/rpc/rpc_agent_client.html b/_modules/agentscope/rpc/rpc_agent_client.html index 74172f894..ed7eba969 100644 --- a/_modules/agentscope/rpc/rpc_agent_client.html +++ b/_modules/agentscope/rpc/rpc_agent_client.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/rpc/rpc_agent_pb2_grpc.html b/_modules/agentscope/rpc/rpc_agent_pb2_grpc.html index 6530d25bb..f43e4ed6c 100644 --- a/_modules/agentscope/rpc/rpc_agent_pb2_grpc.html +++ b/_modules/agentscope/rpc/rpc_agent_pb2_grpc.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/service/code/exec_python.html b/_modules/agentscope/service/code/exec_python.html index 6cf564045..19a9980b2 100644 --- a/_modules/agentscope/service/code/exec_python.html +++ b/_modules/agentscope/service/code/exec_python.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/service/file/common.html b/_modules/agentscope/service/file/common.html index 07d387e9d..75edd6db2 100644 --- a/_modules/agentscope/service/file/common.html +++ b/_modules/agentscope/service/file/common.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/service/file/json.html b/_modules/agentscope/service/file/json.html index 5a7cc5d56..830c35ee9 100644 --- a/_modules/agentscope/service/file/json.html +++ b/_modules/agentscope/service/file/json.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/service/file/text.html b/_modules/agentscope/service/file/text.html index 06d1cf75b..04249daab 100644 --- a/_modules/agentscope/service/file/text.html +++ b/_modules/agentscope/service/file/text.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/service/retrieval/retrieval_from_list.html b/_modules/agentscope/service/retrieval/retrieval_from_list.html index 1db48e7d9..996336653 100644 --- a/_modules/agentscope/service/retrieval/retrieval_from_list.html +++ b/_modules/agentscope/service/retrieval/retrieval_from_list.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/service/retrieval/similarity.html b/_modules/agentscope/service/retrieval/similarity.html index 782deba48..b1a55b7e5 100644 --- a/_modules/agentscope/service/retrieval/similarity.html +++ b/_modules/agentscope/service/retrieval/similarity.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/service/service_response.html b/_modules/agentscope/service/service_response.html index acd1f720e..cb19cf7fc 100644 --- a/_modules/agentscope/service/service_response.html +++ b/_modules/agentscope/service/service_response.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/service/service_status.html b/_modules/agentscope/service/service_status.html index d8974a243..8b0b0dae7 100644 --- a/_modules/agentscope/service/service_status.html +++ b/_modules/agentscope/service/service_status.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/service/sql_query/mongodb.html b/_modules/agentscope/service/sql_query/mongodb.html index f6c0c6a81..225c00fe9 100644 --- a/_modules/agentscope/service/sql_query/mongodb.html +++ b/_modules/agentscope/service/sql_query/mongodb.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/service/sql_query/mysql.html b/_modules/agentscope/service/sql_query/mysql.html index 6c1f980bc..4954f8cfe 100644 --- a/_modules/agentscope/service/sql_query/mysql.html +++ b/_modules/agentscope/service/sql_query/mysql.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/service/sql_query/sqlite.html b/_modules/agentscope/service/sql_query/sqlite.html index 1a3b3b24d..72b09907a 100644 --- a/_modules/agentscope/service/sql_query/sqlite.html +++ b/_modules/agentscope/service/sql_query/sqlite.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/service/text_processing/summarization.html b/_modules/agentscope/service/text_processing/summarization.html index 0d4f8883a..77b171c48 100644 --- a/_modules/agentscope/service/text_processing/summarization.html +++ b/_modules/agentscope/service/text_processing/summarization.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/service/web_search/search.html b/_modules/agentscope/service/web_search/search.html index ebb0b6dac..5ca041ce9 100644 --- a/_modules/agentscope/service/web_search/search.html +++ b/_modules/agentscope/service/web_search/search.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/utils/common.html b/_modules/agentscope/utils/common.html index 2e324bfcc..a501234a1 100644 --- a/_modules/agentscope/utils/common.html +++ b/_modules/agentscope/utils/common.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/utils/logging_utils.html b/_modules/agentscope/utils/logging_utils.html index 8ecf3c890..982442f7c 100644 --- a/_modules/agentscope/utils/logging_utils.html +++ b/_modules/agentscope/utils/logging_utils.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/utils/monitor.html b/_modules/agentscope/utils/monitor.html index e886bccb2..0714be61e 100644 --- a/_modules/agentscope/utils/monitor.html +++ b/_modules/agentscope/utils/monitor.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/utils/token_utils.html b/_modules/agentscope/utils/token_utils.html index 4c569a2ea..3cdc6c1b8 100644 --- a/_modules/agentscope/utils/token_utils.html +++ b/_modules/agentscope/utils/token_utils.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/utils/tools.html b/_modules/agentscope/utils/tools.html index 9ebb1ba00..a8f58a0f6 100644 --- a/_modules/agentscope/utils/tools.html +++ b/_modules/agentscope/utils/tools.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/_modules/agentscope/web_ui/app.html b/_modules/agentscope/web_ui/app.html deleted file mode 100644 index 885b2f729..000000000 --- a/_modules/agentscope/web_ui/app.html +++ /dev/null @@ -1,389 +0,0 @@ - - - - - - agentscope.web_ui.app — AgentScope documentation - - - - - - - - - - - - - - - - - - - -
    - - -
    - -
    -
    -
    - -
    -
    -
    -
    - -

    Source code for agentscope.web_ui.app

    -# -*- coding: utf-8 -*-
    -"""
    -The entry point of the web UI that renders the log (can be still running).
    -"""
    -
    -import re
    -from multiprocessing import Process, Queue
    -
    -import time
    -from typing import Generator, List, Any
    -
    -
    -try:
    -    import gradio as gr
    -    from gradio_groupchat import GroupChat
    -except ImportError:
    -    gr = None
    -    GroupChat = Any
    -
    -try:
    -    from agentscope.constants import MSG_TOKEN
    -except ImportError:
    -    PACKAGE_NAME = "agentscope"
    -    MSG_TOKEN = f"<{PACKAGE_NAME}_msg>"
    -
    -
    -
    -[docs] -def follow_read( - logfile_path: str, - skip_existing_content: bool = False, -) -> Generator: - """Read a file in online and iterative manner - - Args: - logfile_path (`str`): - The file path to be read. - skip_existing_content (`bool`, defaults to `False`): - If True, read from the end, otherwise read from the beginning. - - Returns: - One line string of the file content. - """ - # in most unix file systems, the read operation is safe - # for a file being target file of another "write process" - with open(logfile_path, "r", encoding="utf-8", errors="ignore") as logfile: - if skip_existing_content: - # move to the file's end, similar to `tail -f` - logfile.seek(0, 2) - - while True: - line = logfile.readline() - if not line: - # no new line, wait to avoid CPU override - time.sleep(0.1) - continue - yield line
    - - - -# e.g., "2024-01-09 14:47:20.004 | DEBUG | agentscope.msghub: -# __enter__:36 - Enter msghub with participants: Player1, Player2" -log_pattern = re.compile( - r"^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3} \| \w+ +\| .+$", -) - -# e.g., ""Player1: some message by me"" -chat_message_pattern = re.compile(r"^(?P<role>.+?): (?P<message>.+)$") - - -
    -[docs] -def is_chat_message_format(s: str) -> bool: - """Check the string to be parsed, whether be a chat-message. - - Args: - s (`str`): the message as string. - - Returns: - `bool`: the indicator as a bool - """ - if log_pattern.match(s): - return False - if chat_message_pattern.match(s): - return True - return False
    - - - -# TODO: -# - show image, audio, and data in other modality -# - make the dialog box expensive to show detailed info - - -MAX_CHAT_SIZE = 20 -FULL_LOG_MAX_LINE = 50 -SKIP_HISTORY_LOG = False - -glb_queue_chat_msg = Queue() -glb_queue_system_log = Queue() -glb_queue_file_name = Queue() -glb_current_file_name = None - -glb_history_chat = [] -glb_history_system_log = [] - - -
    -[docs] -def put_file_name(file_name: str) -> str: - """Store the file_name given by user, via the queue - - Args: - file_name (`str`): - The file_name given by user - - Returns: - `str`: The given file name. - """ - global glb_queue_file_name - if file_name: - glb_queue_file_name.put(file_name) - return file_name
    - - - -
    -[docs] -def get_chat() -> List[List]: - """Load the chat info from the queue, and put it into the history - - Returns: - `List[List]`: The parsed history, list of tuple, [(role, msg), ...] - - """ - global glb_history_chat, glb_queue_chat_msg - if not glb_queue_chat_msg.empty(): - line = glb_queue_chat_msg.get(block=False) - line = line.replace(MSG_TOKEN, "") - match_res = chat_message_pattern.match(line) - if match_res is not None: - role = match_res.group("role") - message = match_res.group("message") - glb_history_chat += [[role, message]] - glb_history_chat = glb_history_chat[:MAX_CHAT_SIZE] - return glb_history_chat
    - - - -
    -[docs] -def get_system_log() -> str: - """Load the system log info from the queue, and collect the res into a str - - Returns: - The collected string. - """ - global glb_history_system_log, glb_queue_system_log - if not glb_queue_system_log.empty(): - line = glb_queue_system_log.get(block=False) - glb_history_system_log.append(line) - glb_history_system_log = glb_history_system_log[:FULL_LOG_MAX_LINE] - return "".join(glb_history_system_log) - return "".join(glb_history_system_log)
    - - - -
    -[docs] -def handle_file_selection( - queue_file_name: Queue, - queue_system_log: Queue, - queue_chat: Queue, -) -> None: - """ - - Args: - queue_file_name (`Queue`): - The queue to store and pass `file_name` given by user. - queue_system_log (`Queue`): - The queue to store and pass system log within the file - queue_chat (`Queue`): - The queue to store and pass chat msg within the file - """ - global glb_current_file_name - total_msg_cnt = 0 - full_msg = "" - while True: - if glb_current_file_name: - for line in follow_read( - glb_current_file_name, - skip_existing_content=SKIP_HISTORY_LOG, - ): - msg_cnt = line.count(MSG_TOKEN) - total_msg_cnt += msg_cnt - # print("line is: ", line) - # print("total_msg_cnt is: ", total_msg_cnt) - if msg_cnt % 2 == 0 and msg_cnt != 0: - # contain both begin and end <msg> in the same line - queue_chat.put(line) - elif msg_cnt % 2 == 0 and total_msg_cnt % 2 == 1: - # no or paired msg token this line, - # but still waiting for the end of msg - full_msg += line.strip() - elif msg_cnt % 2 == 1 and total_msg_cnt % 2 == 0: - # the left msg token, waiting for the end of the msg - parts = line.split(MSG_TOKEN) - full_msg += "".join(parts[1:]) # the right remaining parts - elif msg_cnt % 2 == 1 and total_msg_cnt % 2 == 1: - # the right msg token - parts = line.split(MSG_TOKEN) - full_msg += "".join(parts[:-1]) # the left remaining parts - # reset the full_msg - queue_chat.put(full_msg) - full_msg = "" - else: - queue_system_log.put(line) - - # using the up-to-date file name within the queue - find_new_file_to_read = False - while not queue_file_name.empty(): - glb_current_file_name = queue_file_name.get(block=False) - find_new_file_to_read = True - if find_new_file_to_read: - break - else: - # wait users to determine the log file - time.sleep(1) - while not queue_file_name.empty(): - glb_current_file_name = queue_file_name.get(block=False)
    - - - -if __name__ == "__main__": - with gr.Blocks() as demo: - # Users can select the interested exp - with gr.Row(): - file_selector = gr.FileExplorer( - label="Choose your log file (the workdir is `.`)", - file_count="single", - show_label=True, - ) - with gr.Row(): - output_area_log_f_name = gr.Textbox( - label="Log File Name", - show_label=True, - ) - with gr.Row(): - chatbot = GroupChat(label="Dialog", show_label=True) - output_area_sys_log = gr.Textbox(label="Full System Log") - - file_selector.change( - put_file_name, - inputs=file_selector, - outputs=output_area_log_f_name, - ) - demo.load(get_chat, inputs=None, outputs=chatbot, every=1) - demo.load( - get_system_log, - inputs=None, - outputs=output_area_sys_log, - every=0.5, - ) - - Process( - target=handle_file_selection, - args=(glb_queue_file_name, glb_queue_system_log, glb_queue_chat_msg), - ).start() - - demo.launch() -
    - -
    -
    -
    - -
    - -
    -

    © Copyright 2024, Alibaba Tongyi Lab.

    -
    - - Built with Sphinx using a - theme - provided by Read the Docs. - - -
    -
    -
    -
    -
    - - - - \ No newline at end of file diff --git a/_modules/index.html b/_modules/index.html index 2fe79880b..00918421c 100644 --- a/_modules/index.html +++ b/_modules/index.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • @@ -126,7 +126,6 @@

    All modules for which code is available

  • agentscope.utils.monitor
  • agentscope.utils.token_utils
  • agentscope.utils.tools
  • -
  • agentscope.web_ui.app
  • diff --git a/_sources/agentscope.web_ui.rst.txt b/_sources/agentscope.web.rst.txt similarity index 80% rename from _sources/agentscope.web_ui.rst.txt rename to _sources/agentscope.web.rst.txt index edc09867a..3fc7529bc 100644 --- a/_sources/agentscope.web_ui.rst.txt +++ b/_sources/agentscope.web.rst.txt @@ -4,7 +4,7 @@ Web UI package app module ----------------------------- -.. automodule:: agentscope.web_ui.app +.. automodule:: agentscope.web.app :members: :undoc-members: gradio_groupchat :show-inheritance: diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt index 611e16542..9033b1ee1 100644 --- a/_sources/index.rst.txt +++ b/_sources/index.rst.txt @@ -35,7 +35,7 @@ AgentScope Documentation agentscope.service agentscope.rpc agentscope.utils - agentscope.web_ui + agentscope.web agentscope Indices and tables diff --git a/_sources/tutorial/102-concepts.md.txt b/_sources/tutorial/102-concepts.md.txt index a83da431e..745c2cc50 100644 --- a/_sources/tutorial/102-concepts.md.txt +++ b/_sources/tutorial/102-concepts.md.txt @@ -29,7 +29,7 @@ AgentScope │ | ├── service # Services offering functions independent of memory and state. │ | ├── utils # Auxiliary utilities and helper functions. │ | ├── message.py # Definitions and implementations of messaging between agents. -| | ├── web_ui # WebUI used to show dialogs. +| | ├── web # WebUI used to show dialogs. │ | ├── prompt.py # Prompt engineering module for model input. │ | ├── ... .. │ | ├── ... .. diff --git a/_sources/tutorial/105-logging.md.txt b/_sources/tutorial/105-logging.md.txt index 42e05b5ff..dd6cbbc56 100644 --- a/_sources/tutorial/105-logging.md.txt +++ b/_sources/tutorial/105-logging.md.txt @@ -64,45 +64,32 @@ logger.error("The agent encountered an unexpected error while processing a reque ## Integrating logging with WebUI -To visualize these logs, we provide a customized gradio component in `src/agentscope/web_ui`. +To visualize these logs and running details, AgentScope provides a simple +web interface. ### Quick Running -For convince, we provide the pre-built app in a wheel file, you can run the WebUI in the following command: +You can run the WebUI in the following python code: -```shell -pip install gradio_groupchat-0.0.1-py3-none-any.whl -python app.py -``` - -After the init and entering the UI port printed by `app.py`, e.g., `http://127.0.0.1:7860/`, you can choose `run.log.demo` in the top-middle `FileSelector` window (it's a demo log file provided by us). Then, the dialog and system log should be shown correctly in the bottom windows. +```python +import agentscope -![webui](https://img.alicdn.com/imgextra/i2/O1CN01hSaFue1EdL2yCEznc_!!6000000000374-2-tps-3066-1808.png) +agentscope.web.init( + path_save="YOUR_SAVE_PATH" +) +``` -### For Other Customization +By this way, you can see all the running instances and projects in `http://127. +0.0.1:5000` as follows: -To customize the backend, or the frontend of the provided WebUI, you can +![webui](https://img.alicdn.com/imgextra/i3/O1CN01kpHFkn1HpeYEkn60I_!!6000000000807-0-tps-3104-1849.jpg) -```shell -# generate the template codes -# for network connectivity problem, try to run -# `npm config rm proxy && npm config rm https-proxy` first -gradio cc create GroupChat --template Chatbot -# replace the generated app.py into our built-in app.py -cp -f app.py groupchat/demo -# debug and develop your web_ui -cd groupchat -# edit the app.py, or other parts you want, reference link: -# https://www.gradio.app/guides/custom-components-in-five-minutes -gradio cc dev -``` +By clicking a running instance, we can observe more details. -If you want to release the modification, you can do +![The running details](https://img.alicdn.com/imgextra/i2/O1CN01AZtsf31MIHm4FmjjO_!!6000000001411-0-tps-3104-1849.jpg) -```shell -gradio cc build -pip install -python app.py -``` +### Note +The WebUI is still under development. We will provide more features and +better user experience in the future. [[Return to the top]](#logging-and-webui) diff --git a/agentscope.agents.html b/agentscope.agents.html index bcd25cea4..e1e2a656b 100644 --- a/agentscope.agents.html +++ b/agentscope.agents.html @@ -134,7 +134,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/agentscope.html b/agentscope.html index 3e1ae13f9..ed5b4e0a3 100644 --- a/agentscope.html +++ b/agentscope.html @@ -21,7 +21,7 @@ - + @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents diff --git a/agentscope.models.html b/agentscope.models.html index 4f2fe46db..7dc406232 100644 --- a/agentscope.models.html +++ b/agentscope.models.html @@ -120,7 +120,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/agentscope.pipelines.html b/agentscope.pipelines.html index 2ca10d5ad..56df06600 100644 --- a/agentscope.pipelines.html +++ b/agentscope.pipelines.html @@ -79,7 +79,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/agentscope.rpc.html b/agentscope.rpc.html index 48dc46fe3..a7aa0c013 100644 --- a/agentscope.rpc.html +++ b/agentscope.rpc.html @@ -81,7 +81,7 @@
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/agentscope.service.code.html b/agentscope.service.code.html index 0e7de4a20..ce900d209 100644 --- a/agentscope.service.code.html +++ b/agentscope.service.code.html @@ -76,7 +76,7 @@
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/agentscope.service.file.html b/agentscope.service.file.html index 406a7ea1a..dbc8b2b43 100644 --- a/agentscope.service.file.html +++ b/agentscope.service.file.html @@ -90,7 +90,7 @@
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/agentscope.service.html b/agentscope.service.html index 40096c4ad..8d04b2b08 100644 --- a/agentscope.service.html +++ b/agentscope.service.html @@ -69,7 +69,7 @@
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/agentscope.service.retrieval.html b/agentscope.service.retrieval.html index ec995f243..ff0c130a2 100644 --- a/agentscope.service.retrieval.html +++ b/agentscope.service.retrieval.html @@ -79,7 +79,7 @@
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/agentscope.service.sql_query.html b/agentscope.service.sql_query.html index a98fe1d8c..2f5b25305 100644 --- a/agentscope.service.sql_query.html +++ b/agentscope.service.sql_query.html @@ -83,7 +83,7 @@
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/agentscope.service.text_processing.html b/agentscope.service.text_processing.html index ae2bfe83c..829299b85 100644 --- a/agentscope.service.text_processing.html +++ b/agentscope.service.text_processing.html @@ -75,7 +75,7 @@
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/agentscope.service.web_search.html b/agentscope.service.web_search.html index a96412f01..c669ca5d8 100644 --- a/agentscope.service.web_search.html +++ b/agentscope.service.web_search.html @@ -75,7 +75,7 @@
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/agentscope.utils.html b/agentscope.utils.html index f12180d6f..dd913185e 100644 --- a/agentscope.utils.html +++ b/agentscope.utils.html @@ -21,7 +21,7 @@ - + @@ -129,7 +129,7 @@ -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • @@ -935,7 +935,7 @@

    Utils package - +
    diff --git a/agentscope.web.html b/agentscope.web.html new file mode 100644 index 000000000..b86ad4f14 --- /dev/null +++ b/agentscope.web.html @@ -0,0 +1,131 @@ + + + + + + + Web UI package — AgentScope documentation + + + + + + + + + + + + + + + + + + + +
    + + +
    + +
    +
    +
    + +
    +
    +
    +
    + +
    +

    Web UI package

    +
    +

    app module

    +
    +
    + + +
    +
    + +
    +
    +
    +
    + + + + \ No newline at end of file diff --git a/agentscope.web_ui.html b/agentscope.web_ui.html deleted file mode 100644 index f603eb3a3..000000000 --- a/agentscope.web_ui.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - Web UI package — AgentScope documentation - - - - - - - - - - - - - - - - - - - -
    - - -
    - -
    -
    -
    - -
    -
    -
    -
    - -
    -

    Web UI package

    -
    -

    app module

    -

    The entry point of the web UI that renders the log (can be still running).

    -
    -
    -agentscope.web_ui.app.follow_read(logfile_path: str, skip_existing_content: bool = False) Generator[source]
    -

    Read a file in online and iterative manner

    -
    -
    Parameters:
    -
      -
    • logfile_path (str) – The file path to be read.

    • -
    • skip_existing_content (bool, defaults to False) – If True, read from the end, otherwise read from the beginning.

    • -
    -
    -
    Returns:
    -

    One line string of the file content.

    -
    -
    -
    - -
    -
    -agentscope.web_ui.app.get_chat() List[List][source]
    -

    Load the chat info from the queue, and put it into the history

    -
    -
    Returns:
    -

    The parsed history, list of tuple, [(role, msg), …]

    -
    -
    Return type:
    -

    List[List]

    -
    -
    -
    - -
    -
    -agentscope.web_ui.app.get_system_log() str[source]
    -

    Load the system log info from the queue, and collect the res into a str

    -
    -
    Returns:
    -

    The collected string.

    -
    -
    -
    - -
    -
    -agentscope.web_ui.app.handle_file_selection(queue_file_name: Queue, queue_system_log: Queue, queue_chat: Queue) None[source]
    -
    -
    Parameters:
    -
      -
    • queue_file_name (Queue) – The queue to store and pass file_name given by user.

    • -
    • queue_system_log (Queue) – The queue to store and pass system log within the file

    • -
    • queue_chat (Queue) – The queue to store and pass chat msg within the file

    • -
    -
    -
    -
    - -
    -
    -agentscope.web_ui.app.is_chat_message_format(s: str) bool[source]
    -

    Check the string to be parsed, whether be a chat-message.

    -
    -
    Parameters:
    -

    s (str) – the message as string.

    -
    -
    Returns:
    -

    the indicator as a bool

    -
    -
    Return type:
    -

    bool

    -
    -
    -
    - -
    -
    -agentscope.web_ui.app.put_file_name(file_name: str) str[source]
    -

    Store the file_name given by user, via the queue

    -
    -
    Parameters:
    -

    file_name (str) – The file_name given by user

    -
    -
    Returns:
    -

    The given file name.

    -
    -
    Return type:
    -

    str

    -
    -
    -
    - -
    -
    - - -
    -
    - -
    -
    -
    -
    - - - - \ No newline at end of file diff --git a/genindex.html b/genindex.html index fd5af479f..78ce66fb3 100644 --- a/genindex.html +++ b/genindex.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • @@ -95,7 +95,6 @@

    Index

    | E | F | G - | H | I | L | M @@ -365,13 +364,6 @@

    A

    -
  • - agentscope.web_ui.app - -
  • @@ -478,12 +470,10 @@

    F

    @@ -758,8 +732,6 @@

    P

  • PostAPIModelWrapperBase (class in agentscope.models.post_model)
  • process_tasks() (agentscope.agents.rpc_agent.RpcServerSideWrapper method) -
  • -
  • put_file_name() (in module agentscope.web_ui.app)
  • diff --git a/index.html b/index.html index 3ff3aea3f..dc02a30ab 100644 --- a/index.html +++ b/index.html @@ -58,7 +58,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • @@ -143,7 +143,7 @@

    Getting InvolvedService package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/objects.inv b/objects.inv index 130dd05f4..60c90f9f5 100644 Binary files a/objects.inv and b/objects.inv differ diff --git a/py-modindex.html b/py-modindex.html index 55ec81bcd..03aad4c98 100644 --- a/py-modindex.html +++ b/py-modindex.html @@ -61,7 +61,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • @@ -275,11 +275,6 @@

    Python Module Index

        agentscope.utils.tools - - -     - agentscope.web_ui.app - diff --git a/search.html b/search.html index c57f6e028..9f0b6cc9c 100644 --- a/search.html +++ b/search.html @@ -61,7 +61,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/searchindex.js b/searchindex.js index bc1a201f3..7d3b43913 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["agentscope", "agentscope.agents", "agentscope.memory", "agentscope.models", "agentscope.pipelines", "agentscope.rpc", "agentscope.service", "agentscope.service.code", "agentscope.service.file", "agentscope.service.retrieval", "agentscope.service.sql_query", "agentscope.service.text_processing", "agentscope.service.web_search", "agentscope.utils", "agentscope.web_ui", "index", "tutorial/101-installation", "tutorial/102-concepts", "tutorial/103-example", "tutorial/104-usecase", "tutorial/105-logging", "tutorial/201-agent", "tutorial/202-pipeline", "tutorial/203-model", "tutorial/204-service", "tutorial/205-memory", "tutorial/206-prompt", "tutorial/207-monitor", "tutorial/208-distribute", "tutorial/301-community", "tutorial/302-contribute", "tutorial/advance", "tutorial/contribute", "tutorial/main", "tutorial/quick_start"], "filenames": ["agentscope.rst", "agentscope.agents.rst", "agentscope.memory.rst", "agentscope.models.rst", "agentscope.pipelines.rst", "agentscope.rpc.rst", "agentscope.service.rst", "agentscope.service.code.rst", "agentscope.service.file.rst", "agentscope.service.retrieval.rst", "agentscope.service.sql_query.rst", "agentscope.service.text_processing.rst", "agentscope.service.web_search.rst", "agentscope.utils.rst", "agentscope.web_ui.rst", "index.rst", "tutorial/101-installation.md", "tutorial/102-concepts.md", "tutorial/103-example.md", "tutorial/104-usecase.md", "tutorial/105-logging.md", "tutorial/201-agent.md", "tutorial/202-pipeline.md", "tutorial/203-model.md", "tutorial/204-service.md", "tutorial/205-memory.md", "tutorial/206-prompt.md", "tutorial/207-monitor.md", "tutorial/208-distribute.md", "tutorial/301-community.md", "tutorial/302-contribute.md", "tutorial/advance.rst", "tutorial/contribute.rst", "tutorial/main.md", "tutorial/quick_start.rst"], "titles": ["Module contents", "Agents package", "Memory package", "Models package", "Pipelines package", "RPC package", "Service package", "Code package", "File package", "Retrieval package", "SQL query package", "Text processing package", "Web search package", "Utils package", "Web UI package", "AgentScope Documentation", "Installation", "Fundamental Concepts", "Getting Started with a Simple Example", "Crafting Your First Application", "Logging and WebUI", "Customizing Your Own Agent", "Agent Interactions: Dive deeper into Pipelines and Message Hub", "Using Different Model Sources with Model API", "Enhancing Agent Capabilities with Service Functions", "Memory and Message Management", "Prompt Engine", "Monitor", "Make Your Applications Distributed", "Joining The AgentScope Community", "Contributing to AgentScope", "Advanced Exploration", "Get Involved", "Welcome to AgentScope Tutorial Hub", "Getting Started"], "terms": {"some": [0, 1, 7, 21, 22, 24, 27, 30], "us": [0, 1, 2, 4, 6, 7, 9, 10, 11, 12, 13, 15, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 30, 31, 33], "project": [0, 16, 21], "class": [0, 1, 2, 3, 4, 5, 6, 13, 19, 21, 22, 24, 25, 27, 28, 31], "agentscop": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 18, 20, 21, 22, 24, 28, 31, 32, 34], "responseformat": 0, "valu": [0, 2, 5, 6, 12, 13, 27], "sourc": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18, 21, 25, 31, 33], "base": [0, 1, 2, 3, 4, 5, 6, 9, 12, 13, 15, 17, 18, 19, 21, 22, 24, 25, 27, 28, 33], "intenum": [0, 6], "enum": [0, 6], "model": [0, 1, 2, 9, 11, 13, 15, 17, 21, 24, 25, 26, 27, 28, 31, 33, 34], "respons": [0, 1, 6, 13, 17, 18, 19, 21, 22, 24, 25, 30], "format": [0, 1, 3, 7, 12, 13, 19, 20, 21, 23, 24, 25, 30], "json": [0, 1, 2, 6, 12, 13, 18, 19, 21, 23, 24, 25, 26], "1": [0, 2, 3, 4, 6, 11, 18, 20, 23], "none": [0, 1, 2, 3, 4, 5, 7, 9, 10, 12, 13, 14, 18, 20, 21, 22, 24, 25, 28], "0": [0, 3, 4, 13, 19, 20, 23], "shrinkpolici": [0, 26], "shrink": [0, 26], "strategi": [0, 19, 22, 24], "when": [0, 1, 4, 7, 12, 13, 17, 19, 20, 25, 26, 27, 28, 30], "i": [0, 1, 2, 3, 4, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 30, 33], "too": [0, 10], "long": [0, 22], "summar": [0, 6, 21, 24, 26], "truncat": [0, 26], "manag": [0, 13, 15, 16, 17, 18, 19, 21, 22, 27, 31, 33], "file": [0, 2, 3, 5, 6, 7, 13, 14, 17, 18, 19, 20, 21, 24, 25], "system": [0, 1, 7, 11, 14, 19, 21, 25, 27], "save": [0, 19, 26], "code": [0, 6, 13, 16, 19, 20, 21, 22, 24, 25, 27, 28, 29, 34], "log": [0, 13, 14, 15, 19, 21, 25, 33, 34], "The": [0, 1, 2, 3, 4, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 32, 33], "unit": [0, 2, 13, 18, 27], "messagebas": [0, 31], "name": [0, 3, 5, 7, 10, 13, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 30], "str": [0, 1, 2, 3, 5, 7, 8, 10, 11, 12, 13, 14, 21, 24, 25], "ani": [0, 1, 3, 4, 6, 8, 9, 10, 13, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30], "url": [0, 3, 13, 18, 21, 25], "sequenc": [0, 1, 2, 3, 4, 9, 21, 22, 25], "timestamp": [0, 20, 25], "kwarg": [0, 1, 3, 10, 12, 21, 24, 25], "dict": [0, 1, 2, 3, 4, 6, 8, 9, 10, 12, 13, 17, 18, 21, 22, 23, 24, 25, 26], "which": [0, 1, 2, 4, 9, 13, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28], "maintain": [0, 21, 25], "inform": [0, 1, 11, 12, 17, 19, 21, 22, 24, 25, 27, 29], "dialog": [0, 1, 17, 18, 20, 22, 26], "memori": [0, 1, 7, 9, 15, 17, 19, 21, 26, 31, 33], "construct": [0, 19, 21, 22, 24, 26], "serial": [0, 5, 8, 24, 25], "return": [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], "to_str": [0, 25], "string": [0, 1, 2, 7, 12, 13, 14, 20, 23, 24, 25], "represent": [0, 25], "msg": [0, 13, 14, 17, 18, 19, 20, 21, 22, 28], "echo": 0, "bool": [0, 1, 2, 3, 4, 7, 8, 9, 10, 13, 14, 21, 25], "fals": [0, 1, 2, 3, 4, 5, 7, 8, 10, 13, 14, 19, 22, 25, 28], "placeholdermessag": 0, "host": [0, 1, 5, 7, 10, 19, 28, 31], "port": [0, 1, 5, 10, 20, 23, 28], "int": [0, 1, 2, 3, 4, 5, 7, 9, 10, 11, 12, 13, 25], "task_id": 0, "A": [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 12, 13, 18, 19, 24, 25, 28, 30], "placehold": [0, 4, 22], "rpcagent": [0, 1, 5], "local_attr": 0, "_client": 0, "_host": 0, "_is_placehold": 0, "_port": 0, "_task_id": 0, "placeholder_attr": 0, "update_valu": 0, "get": [0, 1, 2, 13, 17, 21, 24, 30], "attribut": [0, 2, 21, 25], "from": [0, 1, 2, 3, 7, 8, 9, 10, 13, 14, 17, 18, 19, 22, 23, 24, 25, 27, 28, 30, 31], "rpc": [0, 1, 15, 17, 28], "agent": [0, 3, 4, 5, 11, 15, 16, 17, 20, 23, 25, 27, 29, 31, 33, 34], "server": [0, 1, 5, 10, 28], "immedi": [0, 15, 19, 20, 21, 28, 33], "tht": 0, "thought": [0, 1, 19, 25], "record": [0, 1, 20, 21], "help": [0, 11, 18, 19, 20, 21, 26, 28, 30], "them": [0, 4, 19, 20, 21, 24, 27, 28, 30], "make": [0, 21, 24, 27, 31], "decis": 0, "gener": [0, 1, 7, 13, 14, 17, 18, 20, 21, 23, 24, 25, 26, 28], "shouldn": 0, "t": [0, 1, 2, 19, 20], "pass": [0, 1, 2, 12, 14, 17, 18, 19, 22, 24], "seen": 0, "other": [0, 1, 7, 10, 17, 18, 21, 22, 24, 25, 28, 29, 30, 34], "In": [0, 2, 17, 18, 19, 21, 22, 24, 27, 28, 30, 31], "our": [0, 17, 19, 20, 23, 29, 30], "framework": [0, 23], "we": [0, 1, 9, 10, 16, 17, 18, 19, 20, 21, 22, 23, 29, 30], "formul": [0, 12], "follow": [0, 1, 3, 4, 11, 13, 16, 18, 19, 20, 23, 27, 28], "For": [0, 1, 3, 13, 16, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 32], "openai": [0, 3, 7, 13, 18, 19, 26, 27, 31], "api": [0, 3, 11, 12, 13, 17, 18, 21, 24, 25, 31, 33], "call": [0, 1, 5, 13, 18, 19, 20, 21, 22, 24, 27, 28], "role": [0, 1, 11, 14, 18, 21, 26], "assist": [0, 18, 21, 26, 29], "should": [0, 1, 3, 19, 20, 23, 25, 26], "open": [0, 11, 13, 18, 19, 23, 30], "accept": [0, 25], "input": [0, 1, 2, 3, 4, 5, 17, 18, 19, 21, 22, 24, 26, 28], "self": [0, 19, 21, 22, 24, 25, 31], "admit": 0, "mayb": 0, "better": [0, 2, 30], "wai": [0, 20, 25, 27], "user": [0, 1, 9, 10, 11, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 26, 29, 33], "ar": [0, 1, 2, 3, 4, 7, 11, 12, 13, 17, 18, 19, 20, 22, 24, 25, 26, 27, 28, 29, 30], "encourag": 0, "creat": [0, 8, 13, 19, 20, 21, 24, 25, 26, 34], "own": [0, 15, 19, 23, 31, 33], "method": [0, 1, 18, 21, 23, 25, 26, 27, 28], "inherit": [0, 1, 19, 22, 28], "rewrit": 0, "__init__": [0, 21, 24, 25], "function": [0, 1, 2, 5, 7, 9, 10, 11, 12, 13, 15, 17, 18, 19, 20, 21, 22, 25, 27, 31, 33], "mythought": 0, "def": [0, 19, 21, 22, 24, 25], "implement": [0, 1, 4, 7, 13, 17, 21, 22, 23, 25, 27, 28], "your": [0, 1, 3, 15, 16, 18, 20, 23, 24, 27, 29, 31, 33, 34], "deseri": 0, "": [0, 1, 3, 7, 12, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], "multipl": [0, 2, 4, 13, 17, 19, 22, 27, 30], "instanc": [0, 1, 13, 19, 22, 23, 25, 26, 28], "design": [0, 1, 2, 15, 17, 19, 20, 21, 22, 24, 25, 28, 33], "share": [0, 22, 23, 29], "among": [0, 4, 17, 19, 22, 28], "group": [0, 19, 22, 29], "msghubmanag": [0, 22], "particip": [0, 4, 19], "agentbas": [0, 1, 19, 22, 24, 28, 31], "announc": [0, 19, 22], "object": [0, 1, 2, 3, 5, 10, 13, 17, 19, 21, 22, 24, 26], "add": [0, 2, 13, 19, 20, 21, 22, 24, 25, 27, 30], "new_particip": [0, 22], "new": [0, 2, 8, 13, 16, 22, 24, 25, 27, 28, 29, 32], "thi": [0, 1, 3, 7, 9, 12, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30], "hub": [0, 18, 19, 23, 31], "broadcast": [0, 19], "list": [0, 1, 2, 3, 9, 12, 13, 14, 17, 18, 19, 21, 22, 23, 24, 25, 27], "all": [0, 1, 2, 4, 8, 11, 13, 18, 19, 21, 22, 23, 24, 25, 27, 28], "paramet": [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 19, 23, 24, 25, 26, 28], "union": [0, 1, 2, 3, 7, 21, 22, 25], "One": [0, 14], "delet": [0, 2, 8, 19, 24, 25], "option": [0, 1, 2, 4, 5, 7, 9, 12, 13, 16, 18, 19, 21, 22, 24, 25, 26, 27], "default": [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 21, 24, 25, 27, 28], "veri": 0, "begin": [0, 11, 14, 19, 27], "without": [0, 1, 19, 21, 22, 28, 31], "requir": [0, 1, 4, 12, 13, 15, 16, 18, 21, 22, 23, 24, 25, 27, 28, 33], "exampl": [0, 1, 3, 11, 15, 17, 22, 23, 27, 28, 30, 33, 34], "three": [0, 15, 33], "each": [0, 3, 12, 17, 18, 21, 22, 23, 24, 25, 27, 28, 30], "output": [0, 1, 4, 7, 19, 20, 21, 22, 24], "agent1": [0, 19, 22], "agent2": [0, 19, 22], "agent3": [0, 19, 22], "what": [0, 18, 26], "mean": [0, 1, 2, 18, 28], "actual": [0, 1, 4, 18], "ha": [0, 1, 7, 9, 18, 19, 20, 21, 28, 30], "same": [0, 13, 26, 27, 28], "effect": [0, 13], "much": [0, 22, 30], "more": [0, 11, 18, 19, 20, 21, 24, 25], "easi": [0, 15, 23, 31, 33], "eleg": 0, "x1": 0, "observ": [0, 1, 19, 21, 22], "x2": 0, "engin": [0, 12, 15, 17, 21, 23, 24, 31, 33], "promptengin": [0, 31], "modelwrapperbas": [0, 3, 9, 11, 26], "shrink_polici": 0, "max_length": [0, 3, 23], "prompt_typ": 0, "prompttyp": [0, 25], "max_summary_length": 0, "200": 0, "summarize_model": 0, "both": [0, 2, 7, 23, 24, 26, 27, 28, 30], "join": [0, 15, 19, 21, 24, 32, 33], "arg": [0, 1, 19, 22, 24], "format_map": [0, 19, 26], "compon": [0, 15, 17, 19, 20, 24, 33], "accord": [0, 30], "its": [0, 1, 2, 3, 8, 10, 13, 18, 19, 21, 24, 27, 28, 30, 31], "type": [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 18, 21, 22, 23, 24, 25], "can": [0, 1, 2, 3, 7, 12, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], "number": [0, 1, 2, 4, 9, 10, 11, 12, 13, 19, 20, 22, 25, 26, 27], "argument": [0, 12, 18, 23], "If": [0, 1, 2, 7, 9, 11, 12, 13, 14, 16, 18, 19, 20, 21, 25, 26, 27, 29, 30], "n": [0, 4, 11, 16, 19, 21, 24], "convert": [0, 1, 3, 13, 26], "join_to_list": 0, "join_to_str": 0, "common": [1, 6], "pipelinebas": [1, 4, 22], "abc": [1, 2, 13, 25], "abstract": [1, 2, 12, 13, 21, 25], "defin": [1, 5, 9, 18, 21, 22, 25, 27], "protocol": 1, "callabl": [1, 2, 4, 9, 25], "behavior": [1, 17, 19, 21, 24, 25, 26], "subclass": [1, 17, 21, 22, 26, 31], "an": [1, 3, 7, 8, 12, 13, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 33], "overridden": 1, "__call__": [1, 21, 22], "specifi": [1, 2, 3, 7, 8, 12, 13, 19, 21, 22, 23, 24, 25, 26, 27], "execut": [1, 4, 6, 7, 10, 13, 17, 18, 19, 22, 24, 28], "logic": [1, 4, 21, 22, 24], "tupl": [1, 8, 14], "repli": [1, 19, 21, 23, 24, 28], "clear_audi": 1, "remov": [1, 7, 13, 22, 25], "audienc": [1, 22], "export_config": 1, "configur": [1, 2, 3, 17, 18, 19, 21, 23], "current": [1, 4, 7, 8, 12, 13, 24, 25, 27], "load_from_config": 1, "config": [1, 2, 17, 20, 23, 34], "load": [1, 2, 3, 14, 18, 19, 21, 23, 24, 25], "load_memori": 1, "x": [1, 4, 5, 18, 19, 21, 22, 24, 28], "store": [1, 2, 14, 17, 21, 25], "messag": [1, 8, 9, 10, 11, 13, 14, 15, 17, 18, 19, 21, 23, 24, 26, 27, 28, 30, 31, 33], "action": [1, 17, 19, 22, 24], "taken": [1, 19, 22], "histori": [1, 14, 17, 19, 22, 26], "environ": [1, 7, 18, 19, 22, 34], "given": [1, 13, 14, 21, 22, 24], "adversari": 1, "doesn": [1, 2], "includ": [1, 4, 8, 12, 13, 17, 18, 19, 21, 24, 25, 30], "reset_audi": 1, "set": [1, 2, 7, 12, 13, 16, 18, 22, 25, 27, 28], "notifi": 1, "rm_audienc": 1, "speak": [1, 19, 21], "content": [1, 6, 8, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 24, 25, 26, 28], "out": [1, 4, 18, 19, 20, 30], "to_dist": [1, 28], "localhost": [1, 10, 28], "max_pool_s": 1, "100": [1, 10], "max_timeout_second": 1, "1800": 1, "launch_serv": [1, 28], "true": [1, 2, 4, 9, 14, 18, 19, 21, 22, 25, 28], "local_mod": [1, 28], "lazy_launch": [1, 28], "distribut": [1, 15, 16, 17, 19, 31, 33], "version": [1, 4, 11, 28, 30], "hostnam": [1, 10, 28], "max": [1, 13], "task": [1, 17, 21, 24, 28], "result": [1, 6, 10, 12, 17, 19, 21, 24, 26], "accommod": 1, "timeout": [1, 3, 5, 7], "whether": [1, 2, 3, 4, 7, 8, 9, 10, 11, 13, 14, 19, 24, 25, 27, 28, 30], "start": [1, 17, 20, 21, 27, 28, 30], "onli": [1, 7, 10, 12, 13, 19, 27, 28], "listen": 1, "local": [1, 13, 17, 18, 19, 23, 28, 30], "request": [1, 5, 12, 13, 20, 23, 24, 29], "launch": [1, 17, 28], "wrap": [1, 6, 24], "wrapper": [1, 3, 23], "extend": [1, 22, 25], "grpc": [1, 28], "client": [1, 5], "stop": 1, "rpcagentserverlaunch": [1, 28], "agent_class": [1, 28], "agent_arg": 1, "agent_kwarg": [1, 28], "launcher": 1, "shutdown": 1, "wait_until_termin": [1, 28], "wait": [1, 28, 30], "process": [1, 6, 7, 17, 19, 20, 21, 22, 23, 24, 25, 26, 30], "rpcserversidewrapp": 1, "agent_inst": 1, "rpcagentservic": [1, 5], "servic": [1, 5, 7, 8, 9, 10, 11, 12, 15, 17, 18, 19, 21, 23, 31, 33], "call_func": [1, 5], "rpcmsg": 1, "_": [1, 4, 19], "servicercontext": 1, "specif": [1, 2, 5, 7, 12, 13, 16, 17, 18, 20, 21, 23, 24, 25, 26, 27], "get_task_id": 1, "auto": 1, "increment": [1, 27], "id": [1, 3, 18, 25], "process_task": 1, "thread": 1, "check_port": 1, "check": [1, 7, 13, 14, 19, 21, 24, 27, 30], "avail": [1, 7, 18, 21, 22, 29], "being": [1, 5, 7, 19, 24, 27], "found": [1, 19], "occupi": 1, "automat": [1, 19, 27, 28], "find_available_port": 1, "unoccupi": 1, "socket": 1, "rpc_servicer_method": 1, "func": 1, "decor": 1, "identifi": [1, 12, 18, 19, 20, 25], "run": [1, 7, 14, 16, 17, 18, 23], "setup_rcp_agent_serv": 1, "init_set": 1, "start_ev": 1, "event": [1, 19], "stop_ev": 1, "pipe": [1, 19, 22], "max_work": 1, "4": [1, 18, 23, 27], "setup": [1, 13, 17, 20, 22, 23], "initi": [1, 13, 17, 18, 21, 22, 23, 24, 27, 28], "monitor": [1, 15, 31, 33], "init": [1, 18, 19, 20, 23, 27], "eventclass": 1, "determin": [1, 4, 7, 13, 19, 25], "child": 1, "been": [1, 30], "worker": 1, "userag": [1, 18], "required_kei": [1, 21], "provid": [1, 2, 7, 9, 11, 13, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30], "potenti": [1, 7, 19, 20, 28], "addit": [1, 7, 11, 12, 13, 16, 17, 19, 21, 23, 24, 30], "detail": [1, 11, 12, 18, 19, 21, 24, 25, 27, 30], "prompt": [1, 11, 13, 15, 17, 19, 21, 24, 31, 33], "kei": [1, 11, 12, 18, 21, 25, 27], "encapsul": [1, 3, 17, 21, 22, 24, 25], "ad": [1, 2, 21, 24, 30], "dictionari": [1, 3, 4, 10, 12, 13, 18], "contain": [1, 3, 4, 7, 8, 10, 11, 12, 13, 24], "data": [1, 2, 3, 5, 8, 9, 10, 13, 17, 21, 22, 25], "repres": [1, 4, 20, 22, 25, 28], "also": [1, 18, 19, 20, 22, 23, 25, 28, 29], "dialogag": [1, 18], "simpl": [1, 15, 19, 20, 28, 33, 34], "perform": [1, 12, 15, 17, 19, 21, 22, 24, 30, 33], "dialogu": [1, 20, 21, 22, 26], "sys_prompt": [1, 19, 21], "invok": [1, 17, 21, 22, 24], "languag": [1, 12, 21, 22, 26], "produc": [1, 21], "parse_func": [1, 21], "fault_handl": [1, 21], "pars": [1, 8, 13, 14, 24], "dictdialogag": [1, 19], "where": [1, 8, 13, 18, 19, 21, 22, 23, 24, 25, 28], "field": [1, 3, 17, 18], "via": [1, 14, 19, 20], "e": [1, 3, 7, 10, 16, 17, 18, 19, 20, 23, 26, 27, 28, 30], "g": [1, 3, 7, 10, 17, 19, 20, 23, 26, 27], "python": [1, 7, 15, 16, 17, 18, 19, 20, 23, 24, 33], "summari": [1, 11, 19], "sai": [1, 19], "handl": [1, 12, 13, 19, 22, 24, 25, 26], "fault": [1, 15, 33], "fail": [1, 12, 13, 24], "take": [1, 2, 9, 13, 17, 19, 21, 23], "print": [1, 18, 20, 27], "usag": [1, 17, 18, 19, 21, 23, 25, 28, 31], "pleas": [1, 18, 19, 22, 23, 24, 25, 26, 27, 28, 30], "refer": [1, 17, 18, 19, 20, 23, 24, 25], "werewolf": 1, "It": [1, 7, 12, 15, 17, 19, 21, 22, 23, 25, 26, 27, 33], "least": 1, "textual": 1, "mai": [1, 19, 21, 22, 27, 30], "agreement": [1, 17, 19], "rais": [1, 12, 13, 21, 24, 25, 30], "decod": 1, "jsondecodeerror": 1, "valid": 1, "treat": 1, "plain": 1, "text": [1, 3, 6, 18, 23, 24, 25], "imag": [1, 3, 7, 18, 21, 23], "texttoimageag": 1, "todo": 2, "piec": [2, 25, 28], "structur": [2, 18, 22, 25, 26, 34], "organ": [2, 3, 18, 19, 20, 23, 25, 30], "memorybas": [2, 31], "fragment": 2, "depend": [2, 16], "how": [2, 17, 18, 19, 20, 21, 22, 24, 27, 29, 30], "clear": [2, 3, 13, 22, 25, 27, 30], "clean": 2, "index": [2, 15, 25], "iter": [2, 14, 22, 25], "match": [2, 10, 19, 24], "export": [2, 25], "to_mem": [2, 25], "file_path": [2, 8, 13, 24, 25], "get_memori": [2, 21, 25], "recent_n": [2, 25], "filter_func": [2, 25], "certain": [2, 13, 23, 27], "rang": [2, 4, 19, 22, 24], "filter": [2, 13, 25, 27], "overwrit": [2, 8, 25], "size": [2, 23, 25], "segment": 2, "update_config": 2, "convers": [2, 19, 20, 21, 34], "temporarymemori": 2, "embedding_model": [2, 9], "write": [2, 8, 13, 24, 30], "hard": 2, "disk": 2, "emb": [2, 9], "get_embed": [2, 25], "embed": [2, 3, 9, 18, 23, 25], "have": [2, 16, 17, 19, 21, 25, 27, 28, 29, 30], "otherwis": [2, 11, 14], "vector": 2, "retriev": [2, 6, 24, 25], "last": [2, 18, 19], "boolean": [2, 8, 13, 24], "retrieve_by_embed": [2, 25], "queri": [2, 6, 9, 12, 13, 24, 25], "metric": [2, 13, 25], "float": [2, 3, 7, 9, 13], "top_k": [2, 9], "preserve_ord": [2, 9], "comput": [2, 9, 21], "relev": [2, 25, 29, 30], "between": [2, 3, 9, 17, 18, 19, 20, 22, 25], "higher": [2, 16], "you": [2, 3, 7, 11, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30], "revers": 2, "order": [2, 9, 17, 19, 22, 28], "preserv": [2, 9], "origin": [2, 9, 25, 27, 28], "modelconfig": 3, "config_nam": [3, 18, 19, 23], "model_typ": [3, 18, 19, 23], "classmethod": [3, 13], "format_config": 3, "covert": 3, "one": [3, 9, 13, 18, 19, 21, 22, 24, 28], "post_api": [3, 18, 23], "after": [3, 11, 18, 19, 20, 28], "differ": [3, 9, 10, 15, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 31, 33], "model_nam": [3, 13, 18, 19, 23, 27], "model_name_for_openai": 3, "gpt": [3, 18, 19, 21, 23, 27], "3": [3, 16, 18, 21, 23], "5": [3, 18, 21, 23], "turbo": [3, 18, 19, 27], "api_kei": [3, 12, 18, 19, 23], "your_api_kei": 3, "your_organ": 3, "need": [3, 11, 16, 17, 18, 19, 21, 27, 28], "client_arg": [3, 23], "generate_arg": [3, 19, 23], "post": [3, 18, 19, 23], "toke": 3, "huggingfac": [3, 18, 23, 26], "infer": [3, 18, 31], "api_url": [3, 23], "header": [3, 13, 23], "author": [3, 23], "bearer": [3, 23], "api_token": 3, "max_length_of_model": 3, "max_retri": 3, "temperatur": [3, 19, 23], "modelrespons": 3, "image_url": 3, "raw": 3, "main": [3, 19, 21, 22, 24, 28, 30], "purpos": [3, 19, 21], "align": [3, 24, 26], "act": [3, 4, 19, 21, 22], "bridg": 3, "properti": 3, "registri": 3, "openaichatwrapp": 3, "openaidallewrapp": 3, "openaiembeddingwrapp": 3, "openaiwrapp": [3, 26], "postapichatwrapp": 3, "postapidallewrapp": 3, "postapimodelwrapperbas": 3, "type_registri": 3, "openai_dall_": [3, 18, 23], "openai_embed": [3, 18, 23], "post_api_chat": 3, "post_api_dal": 3, "budget": [3, 13], "chat": [3, 13, 14, 17, 18, 19, 22, 23, 26, 29], "dall": [3, 18, 23], "2048": 3, "30": 3, "json_arg": [3, 23], "post_arg": 3, "messages_kei": 3, "retry_interv": 3, "compatilbl": 3, "vllm": [3, 18, 19], "fastchat": [3, 18, 19], "compat": [3, 23, 26], "deploi": [3, 18, 28], "import": [3, 7, 13, 18, 19, 20, 21, 22, 23, 24, 27, 28], "clear_model_config": 3, "load_model_by_config_nam": 3, "read_model_config": 3, "clear_exist": 3, "read": [3, 8, 14, 18, 19, 24], "path": [3, 8, 13, 14, 18, 20, 24], "befor": [3, 16, 19, 25, 27, 28], "forlooppipelin": [4, 17], "loop_body_oper": 4, "oper": [4, 7, 8, 10, 13, 19, 21, 22, 24, 25], "max_loop": 4, "break_func": 4, "lambda": [4, 21], "templat": [4, 20, 21, 23], "control": [4, 15, 19, 22, 28, 33], "flow": [4, 18, 19, 20, 22, 25, 28], "like": [4, 17, 18, 19, 22, 24, 25, 26], "loop": [4, 18, 19], "workflow": [4, 28], "break": [4, 18, 19, 22], "ifelsepipelin": 4, "condition_func": 4, "if_body_oper": 4, "else_body_oper": 4, "els": [4, 19, 22, 24], "interfac": [4, 13, 17, 18, 20, 21, 22, 24, 26, 27], "special": [4, 9, 19, 20, 21, 25], "kind": 4, "interact": [4, 7, 15, 17, 18, 19, 20, 21, 24, 25, 26, 28, 31, 33], "sequentialpipelin": [4, 17, 18, 19], "sequenti": [4, 18, 28], "switchpipelin": 4, "case_oper": [4, 22], "map": [4, 22], "default_oper": 4, "switch": [4, 22], "case": [4, 19, 21, 28], "k1": 4, "k2": 4, "whilelooppipelin": 4, "while": [4, 18, 19, 20, 22, 28], "condition_oper": 4, "counterpart": 4, "bodi": 4, "maximum": [4, 7, 9, 10, 12, 26, 27], "exeuct": 4, "doe": [4, 13, 25], "noth": 4, "just": [4, 22, 27], "do": [4, 16, 19, 20, 22, 23, 24, 28], "branch": [4, 22], "correspond": [4, 5, 10, 17, 18, 19], "trigger": [4, 13], "condit": [4, 19, 22], "meet": [4, 21], "continu": [4, 17, 18, 19, 21, 22, 27], "__": 4, "rpcagentcli": 5, "func_nam": 5, "seral": 5, "protobuf": 5, "static": 5, "target": [5, 19, 26], "channel_credenti": 5, "call_credenti": 5, "insecur": 5, "compress": 5, "wait_for_readi": 5, "metadata": [5, 25], "context": [5, 13, 21, 22, 25, 30], "miss": [5, 21], "associ": [5, 19, 25, 27], "document": [5, 10, 17, 23, 30], "comment": 5, "proto": 5, "rpcagentstub": 5, "channel": 5, "stub": 5, "add_rpcagentservicer_to_serv": 5, "exec_python": 6, "execute_python_cod": [6, 7, 24], "sys_python_guard": [6, 7], "create_directori": [6, 8, 24], "create_fil": [6, 8, 24], "delete_directori": [6, 8, 24], "delete_fil": [6, 8, 24], "move_directori": [6, 8, 24], "move_fil": [6, 8, 24], "read_json_fil": [6, 8, 24], "write_json_fil": [6, 8, 24], "read_text_fil": [6, 8, 24], "write_text_fil": [6, 8, 24], "retrieval_from_list": 6, "retrieve_from_list": [6, 9, 24], "similar": [6, 19, 22, 23, 25], "cos_sim": [6, 9], "sql": [6, 13, 24], "mongodb": [6, 24], "query_mongodb": [6, 10, 24], "mysql": [6, 24], "query_mysql": [6, 10, 24], "sqlite": [6, 13, 24], "query_sqlit": [6, 10, 24], "web": [6, 15, 17, 20, 23, 24, 25], "search": [6, 10, 15, 17, 24], "web_search": [6, 12, 24], "statu": [6, 12, 17, 24], "serviceexecstatu": [6, 11, 24], "error": [6, 7, 8, 10, 11, 12, 13, 20, 24, 30], "success": [6, 8, 11, 12, 13, 20, 24], "servicerespons": [6, 7, 8, 9, 10, 11, 12, 13, 31], "300": 7, "use_dock": 7, "maximum_memory_byt": 7, "insid": [7, 24], "docker": [7, 24], "within": [7, 12, 14, 18, 19, 21, 22, 23, 24, 25], "layer": 7, "secur": 7, "especi": [7, 26, 27], "untrust": 7, "warn": [7, 13, 20], "directli": [7, 16, 25, 27], "pose": 7, "risk": 7, "disabl": 7, "confid": 7, "safeti": 7, "empti": [7, 13, 23, 24], "time": [7, 13, 18, 19, 28, 29, 30], "second": [7, 13], "allow": [7, 10, 19, 21, 22, 23, 24, 25, 26, 27, 29], "exce": [7, 11, 13, 26, 27], "limit": [7, 11, 13, 27], "termin": [7, 18, 19], "nativ": 7, "present": [7, 19], "byte": 7, "impos": 7, "two": [7, 9, 18, 19, 22, 23, 26, 28], "element": [7, 9], "captur": [7, 20], "standard": [7, 18, 19, 20, 25, 31], "respect": [7, 23], "ipython": 7, "plt": 7, "show": [7, 17, 28, 29], "displai": 7, "matplotlib": 7, "plot": 7, "support": [7, 10, 12, 13, 15, 18, 19, 22, 24, 26, 27, 28, 29, 33], "stem": 7, "non": 7, "natur": [7, 19], "variou": [7, 15, 18, 21, 23, 24, 26, 27, 33], "destruct": 7, "prevent": [7, 22, 27], "interf": 7, "test": [7, 17, 24], "fork": 7, "bomb": 7, "kill": [7, 19], "filesystem": 7, "etc": 7, "modifi": [7, 21, 24], "http": [7, 13, 16, 20, 23, 30], "github": [7, 13, 16, 30, 32], "com": [7, 13, 16, 23, 30], "human": [7, 13, 17], "eval": [7, 13, 23], "blob": [7, 13], "master": [7, 13], "human_ev": [7, 13], "py": [7, 13, 17, 19, 20, 23], "directori": [8, 13, 18, 19, 24], "directory_path": 8, "indic": [8, 13, 14, 19, 20, 21, 24, 25], "source_path": 8, "destination_path": 8, "move": [8, 24], "destin": 8, "typic": [8, 11, 21, 24, 25], "written": [8, 13], "alreadi": [8, 16, 27, 30], "exist": [8, 13, 21, 22, 25, 27], "txt": 8, "work": [9, 13, 19, 25, 26, 30], "knowledg": [9, 17], "score_func": 9, "score": 9, "expect": [9, 20, 24, 26], "top": [9, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], "k": [9, 25], "highest": 9, "compar": [9, 22, 30], "b": [9, 28, 30], "cosin": 9, "sql_queri": [10, 13], "databas": [10, 17, 24], "collect": [10, 14, 17, 21, 24], "maxcount_result": 10, "note": [10, 16, 18, 19, 21, 22, 27], "ip": [10, 28], "address": [10, 21, 28, 30], "avoid": [10, 27, 28], "mani": 10, "littl": [10, 23], "now": [10, 19, 22, 23, 30], "find": [10, 18, 26, 30], "leav": 10, "futur": [10, 17], "password": 10, "allow_change_data": 10, "usernam": [10, 30], "account": 10, "3306": 10, "chang": [10, 13, 27], "accident": 10, "text_process": 11, "system_prompt": [11, 26], "nyou": [11, 19], "keep": [11, 20, 29, 30], "summarization_prompt": 11, "ntext": 11, "max_return_token": 11, "token_limit_prompt": 11, "nsummar": 11, "less": 11, "than": [11, 18, 19, 20], "token": [11, 13, 23, 27], "notic": [11, 19], "curent": 11, "built": [11, 17, 18, 19, 20, 21], "ai": [11, 21], "_default_system_prompt": 11, "instruct": [11, 17, 18, 21, 24, 26], "see": [11, 19, 30], "_default_summarization_prompt": 11, "_default_token_limit_prompt": 11, "successfulli": [11, 20], "satisfi": 11, "well": [11, 19], "With": [11, 19, 30], "str_text": 11, "summarizeth": 11, "question": [12, 29], "cse_id": 12, "num_result": 12, "10": [12, 27], "googl": [12, 24], "bing": [12, 24], "custom": [12, 15, 17, 18, 19, 23, 25, 31, 33], "correct": 12, "uniform": 12, "authent": 12, "chosen": [12, 19], "uniqu": [12, 13, 18, 21, 25, 27], "keyword": 12, "These": [12, 19, 22, 24, 25], "region": 12, "safe": 12, "titl": [12, 30], "link": [12, 20, 25], "snippet": [12, 19, 30], "valueerror": 12, "unsupport": 12, "chdir": 13, "contextmanag": 13, "borrow": 13, "create_tempdir": 13, "temporari": 13, "if_change_databas": 13, "select": [13, 22, 23, 25], "requests_get": 13, "param": [13, 24], "send": 13, "except": [13, 24, 27], "sent": [13, 19, 25, 28], "timer": 13, "block": [13, 19, 22, 24], "write_fil": 13, "attempt": [13, 19], "mode": [13, 16, 21], "overwritten": 13, "permissionerror": 13, "occur": [13, 21], "lack": 13, "necessari": [13, 22, 24, 25], "permiss": 13, "ioerror": 13, "signal": 13, "issu": [13, 20, 29, 30], "invalid": 13, "hardwar": 13, "relat": [13, 27, 29], "o": 13, "catch": 13, "along": 13, "setup_logg": 13, "path_log": 13, "level": [13, 15, 20, 33], "liter": [13, 20], "trace": [13, 20], "debug": [13, 19, 20], "info": [13, 14, 20], "critic": [13, 20, 25], "loguru": [13, 20], "logger": 13, "redirect": [13, 20], "stderr": [13, 20], "monitorbas": [13, 27], "metric_nam": 13, "increas": 13, "get_metr": [13, 27], "metric_valu": 13, "metric_unit": [13, 27], "quota": 13, "filter_regex": 13, "regular": 13, "express": 13, "metric_name_a": 13, "metric_name_b": 13, "get_quota": [13, 27], "get_unit": [13, 27], "get_valu": [13, 27], "regist": [13, 18], "must": [13, 19, 21], "alert": 13, "accumul": 13, "abov": [13, 18, 19, 27], "register_budget": [13, 27], "prefix": 13, "quotaexceedederror": [13, 27], "exceed": [13, 27], "distinguish": [13, 24, 25], "registr": [13, 27], "first": [13, 15, 16, 20, 30, 33, 34], "set_quota": [13, 27], "updat": [13, 17, 19, 21, 25, 29], "onc": [13, 18, 23, 27, 30], "monitorfactori": [13, 27], "factori": 13, "singleton": 13, "get_monitor": [13, 27], "impl_typ": 13, "db_path": 13, "db": 13, "sqlitemonitor": [13, 27], "table_nam": 13, "monitor_metr": 13, "drop_exist": 13, "get_full_nam": [13, 27], "full": 13, "sqlite_cursor": 13, "cursor": 13, "yield": 13, "sqlite_transact": 13, "transact": 13, "count_openai_token": 13, "count": [13, 27], "get_openai_max_length": 13, "length": [13, 26], "num_tokens_from_cont": 13, "extract_json_str": 13, "json_str": 13, "extract": [13, 24], "try": [13, 19, 20, 21, 24, 27], "fix": [13, 29, 30], "manual": [13, 22], "to_dialog_str": 13, "item": [13, 24], "style": [13, 26], "to_openai_dict": 13, "entri": 14, "point": [14, 24], "render": 14, "still": [14, 19, 27], "web_ui": [14, 17, 20], "follow_read": 14, "logfile_path": 14, "skip_existing_cont": 14, "onlin": 14, "manner": [14, 15, 33], "end": [14, 19], "line": [14, 19, 20, 21], "get_chat": 14, "queue": 14, "put": 14, "get_system_log": 14, "re": [14, 16, 19, 23, 24, 26, 30], "handle_file_select": 14, "queue_file_nam": 14, "queue_system_log": 14, "queue_chat": 14, "file_nam": 14, "is_chat_message_format": 14, "put_file_nam": 14, "innov": [15, 33], "multi": [15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 27, 29, 33], "platform": [15, 16, 17, 18, 23, 29, 33], "empow": [15, 33], "develop": [15, 16, 20, 21, 24, 27, 28, 29, 30, 33], "build": [15, 18, 19, 20, 21, 23, 33], "applic": [15, 16, 17, 18, 20, 21, 22, 23, 27, 29, 31, 33, 34], "eas": [15, 22, 33], "reliabl": [15, 17, 33], "high": [15, 23, 33], "featur": [15, 17, 20, 27, 29, 31, 32, 33], "capabl": [15, 17, 19, 31, 33], "program": [15, 19, 22, 24, 25, 28, 33], "pure": [15, 33], "prebuilt": [15, 33], "suitabl": [15, 21, 25, 26, 33], "robust": [15, 33], "toler": [15, 33], "retri": [15, 24, 33], "mechan": [15, 22, 33], "enhanc": [15, 20, 31, 33], "stabil": [15, 33], "actor": [15, 33], "enabl": [15, 21, 22, 23, 25, 27, 33], "central": [15, 16, 33], "streamlin": [15, 17, 22, 33], "instal": [15, 17, 19, 20, 30, 33, 34], "guid": [15, 19, 20, 21, 23, 24, 26, 33], "fundament": [15, 21, 33, 34], "concept": [15, 19, 22, 28, 33, 34], "craft": [15, 21, 24, 26, 33, 34], "webui": [15, 17, 23, 33, 34], "dive": [15, 18, 19, 31, 33], "deeper": [15, 18, 19, 31, 33], "pipelin": [15, 17, 18, 31, 33], "deploy": [15, 17, 31, 33], "commun": [15, 17, 18, 19, 22, 30, 32, 33], "contribut": [15, 29, 32, 33], "packag": [15, 16, 28], "util": [15, 17, 18, 19, 20, 24, 27], "ui": [15, 20], "modul": [15, 17, 20], "page": [15, 25], "To": [16, 18, 19, 20, 21, 22, 23, 24, 27, 30], "9": 16, "recommend": [16, 20, 23], "up": [16, 18, 27, 29], "tool": [16, 17, 24], "command": [16, 20, 23], "activ": 16, "altern": 16, "prefer": [16, 22, 26], "shown": [16, 19, 20, 28], "python3": 16, "bin": 16, "On": 16, "window": [16, 20], "script": [16, 17, 18], "pypi": 16, "so": 16, "easili": [16, 19, 22], "mac": 16, "who": [16, 19], "step": [16, 18, 21, 22, 23, 24, 28, 30, 34], "clone": 16, "repositori": [16, 29], "edit": [16, 20], "under": [16, 27], "pull": [16, 29], "git": [16, 30], "modelscop": [16, 18], "cd": [16, 19, 20, 30], "rememb": [16, 17, 19, 23, 25, 30], "tutori": [17, 18, 19, 20, 21, 26, 27, 28], "ll": [17, 19, 20, 27], "understand": [17, 18, 20, 22, 31], "focu": 17, "familiar": 17, "let": [17, 19], "autonom": [17, 19], "entiti": 17, "achiev": [17, 19], "probabl": 17, "power": [17, 19], "llm": [17, 23, 24, 26], "simul": 17, "discuss": [17, 19, 29, 30], "debat": 17, "cooper": 17, "finish": 17, "complic": 17, "runnabl": 17, "carrier": 17, "convei": 17, "modal": [17, 23, 25], "inter": 17, "identif": 17, "payload": 17, "deliveri": 17, "interpret": [17, 24], "independ": 17, "state": [17, 20, 21], "reusabl": 17, "across": [17, 22, 23, 24], "scenario": [17, 22, 24, 25, 26], "pattern": [17, 22], "collabor": [17, 22, 29], "predecessor": 17, "successor": 17, "intermedi": 17, "src": [17, 20], "core": [17, 19, 21, 22, 23], "pertain": 17, "integr": [17, 18, 23, 34], "divers": [17, 21, 30], "offer": [17, 18, 24, 26], "auxiliari": 17, "helper": [17, 19, 22], "definit": [17, 25], "pre": [17, 18, 20, 21, 30], "doc": [17, 23], "unittest": 17, "licens": 17, "offici": [17, 23, 30], "versatil": [18, 24], "quickli": 18, "learn": [18, 19, 27], "basic": [18, 19], "composit": 18, "avali": 18, "varieti": [18, 19], "train": 18, "here": [18, 19, 20, 21, 22, 23, 24, 25, 27, 29, 30], "tabl": [18, 21, 22, 23, 24], "outlin": [18, 19, 22, 23, 24], "would": [18, 19], "fill": 18, "yaml": 18, "model_config": [18, 19, 23], "choos": [18, 19, 20, 24], "ada": 18, "002": 18, "xxx": [18, 19, 23], "unset": 18, "variabl": [18, 19, 26], "openai_api_kei": 18, "openai_organ": 18, "defer": [18, 21], "initil": 18, "besid": [18, 19, 21, 25], "mutlipl": 18, "openai_cfg_dict": 18, "dict_fil": 18, "modelscope_cfg_dict": 18, "straightforward": 18, "openai_model_config": 18, "model_config_nam": [18, 19, 21, 23], "pool": [18, 19, 21], "primari": [18, 21, 24], "thei": [18, 19, 22, 24], "compris": 18, "essenti": [18, 21, 25, 34], "sender": 18, "either": [18, 19, 24, 25], "video": [18, 21], "audio": [18, 21], "websit": [18, 21, 23], "alic": 18, "message_from_alic": 18, "hi": 18, "bob": 18, "attach": 18, "message_from_bob": 18, "about": [18, 21, 24, 25, 27, 29], "pictur": 18, "took": 18, "jpg": 18, "dialog_ag": 18, "user_ag": 18, "until": [18, 19, 22], "exit": [18, 22, 28], "advanc": [18, 19], "approach": [18, 22], "stand": [18, 20], "speech": 18, "receiv": [18, 22, 28], "accordingli": 18, "complex": [18, 22, 28], "topic": 19, "give": 19, "glanc": 19, "box": 19, "known": 19, "social": 19, "deduct": 19, "involv": [19, 30], "imaginari": 19, "villag": 19, "few": [19, 23], "secretli": 19, "werewolv": 19, "elimin": 19, "player": 19, "good": 19, "demonstr": [19, 21, 24], "adventur": 19, "unlock": 19, "firstli": 19, "ensur": [19, 21, 22, 27], "properli": 19, "describ": [19, 22], "overview": [19, 31], "below": [19, 21, 22, 24, 28, 29], "As": [19, 21, 25], "assum": [19, 27], "endow": [19, 21], "distinct": [19, 21], "abil": 19, "ordinari": 19, "townsfolk": 19, "surviv": 19, "predat": 19, "disguis": 19, "aim": 19, "outlast": 19, "seer": 19, "night": 19, "witch": 19, "poison": 19, "myagent": 19, "someth": [19, 20], "sever": [19, 21, 28], "assign": [19, 20, 25], "player1": 19, "nthere": 19, "total": [19, 27], "6": 19, "player2": 19, "player3": 19, "player4": 19, "player5": 19, "player6": 19, "nplayer": 19, "nin": 19, "divid": 19, "know": 19, "teammat": 19, "nwerewolv": 19, "ident": 19, "remain": [19, 22], "undetect": 19, "nvillag": 19, "togeth": 19, "dure": [19, 25], "dai": 19, "deduc": 19, "might": [19, 24, 30], "vote": 19, "nseer": 19, "crucial": [19, 20, 26, 27], "gain": 19, "nwitch": 19, "charact": [19, 26], "sometim": 19, "potion": 19, "life": 19, "death": 19, "ngame": 19, "rule": 19, "nthe": 19, "consist": [19, 20, 21, 24], "phase": 19, "repeat": 19, "win": 19, "n1": 19, "decid": [19, 24], "n2": 19, "suspect": 19, "No": 19, "reveal": 19, "unless": 19, "serv": [19, 21, 22, 25, 27], "strateg": 19, "most": [19, 25], "lynch": 19, "nvictori": 19, "nfor": 19, "equal": 19, "greater": 19, "nconstraint": 19, "person": 19, "respond": [19, 26], "plai": 19, "use_memori": [19, 21], "flag": 19, "past": [19, 21, 25], "locat": [19, 26], "agent_config": 19, "simplifi": [19, 22, 24, 26], "ve": [19, 30], "survivor": 19, "logger_level": [19, 20], "u": [19, 20, 29, 30], "wolv": 19, "through": [19, 21, 22, 26, 28], "alloc": 19, "dictat": 19, "orchestr": [19, 22], "anoth": [19, 21, 22, 24, 28], "even": 19, "don": 19, "dynam": [19, 21, 22], "welcom": [19, 20, 29, 30], "agent4": [19, 22], "major": 19, "daytim": 19, "section": [19, 22], "themselv": [19, 22], "everi": 19, "max_game_round": 19, "hint": [19, 21, 26], "hostmsg": 19, "to_wolv": 19, "max_werewolf_discussion_round": 19, "proce": 19, "choic": 19, "to_wolves_vot": 19, "extract_name_and_id": 19, "wolf": 19, "dead_play": 19, "majority_vot": 19, "to_wolves_r": 19, "turn": 19, "aliv": 19, "she": 19, "opportun": 19, "her": 19, "healing_used_tonight": 19, "heal": 19, "to_witch_resurrect": 19, "witch_nam": 19, "dead_nam": 19, "resurrect": 19, "pop": 19, "chanc": 19, "to_seer": 19, "idx": 19, "to_seer_result": 19, "update_alive_play": 19, "to_all_vot": 19, "vote_r": 19, "to_all_r": 19, "won": 19, "side": 19, "check_win": 19, "moder": 19, "round": 19, "neither": 19, "nor": 19, "hasn": 19, "to_all_continu": 19, "readi": [19, 21, 28, 30], "By": [19, 24, 28], "predefin": [19, 21], "illustr": [19, 22], "unfold": 19, "alon": 19, "reach": 19, "tonight": 19, "think": 19, "seem": 19, "suspici": 19, "me": 19, "agre": 19, "player_nam": 19, "consid": 19, "okai": 19, "come": [19, 21, 24], "ey": [19, 30], "peac": 19, "grasp": 19, "conveni": 19, "feel": [19, 30], "free": [19, 30], "tailor": [19, 21], "introduc": [19, 21, 23, 28], "sophist": 19, "delv": 19, "explor": 19, "look": 19, "touch": 20, "visual": 20, "track": [20, 27], "clearer": 20, "over": 20, "color": 20, "speaker": [20, 25], "readabl": 20, "log_level": 20, "hello": 20, "world": 20, "m": [20, 23, 30], "fine": 20, "thank": 20, "isn": 20, "problemat": 20, "slower": 20, "gone": 20, "wrong": 20, "encount": [20, 29], "unexpect": 20, "gradio": 20, "convinc": 20, "app": 20, "wheel": 20, "pip": [20, 23, 30], "gradio_groupchat": 20, "py3": 20, "whl": 20, "enter": 20, "127": [20, 23], "7860": 20, "demo": 20, "middl": 20, "fileselector": 20, "Then": [20, 21, 28], "correctli": 20, "bottom": 20, "backend": 20, "frontend": 20, "network": 20, "connect": [20, 29], "problem": [20, 29, 30], "npm": 20, "rm": 20, "proxi": 20, "cc": 20, "groupchat": 20, "chatbot": 20, "replac": [20, 22, 23], "cp": 20, "f": [20, 21, 24, 25, 27, 28], "part": [20, 26, 29, 30], "want": [20, 27], "www": 20, "five": 20, "minut": 20, "dev": [20, 30], "releas": 20, "modif": [20, 23], "depth": 21, "navig": 21, "go": 21, "ensembl": 21, "mind": 21, "final": [21, 26], "fit": 21, "architectur": 21, "cornerston": 21, "superclass": 21, "comprehens": [21, 24], "underpin": 21, "deriv": 21, "compos": [21, 24], "characterist": 21, "retain": 21, "recal": 21, "ongo": 21, "pivot": 21, "incom": 21, "unifi": [21, 26], "And": 21, "omit": [21, 22, 24, 25], "breviti": [21, 22, 24, 25], "memory_config": 21, "intern": [21, 25], "enrich": 21, "notimplementederror": [21, 25], "__name__": [21, 24], "curat": 21, "equip": 21, "expedit": 21, "descript": [21, 22, 24, 30], "foundat": 21, "coher": [21, 25], "bot": 21, "virtual": [21, 34], "expand": 21, "demand": 21, "flexibl": 21, "minim": 21, "effort": 21, "adjust": [21, 27], "extens": 21, "engag": [21, 29], "secondari": 21, "prepar": [21, 34], "dialog_agent_config": 21, "servicebot": 21, "repons": 21, "service_bot": 21, "gather": 21, "later": 21, "isinst": 21, "require_url": 21, "user_agent_config": 21, "user_proxy_ag": 21, "conduit": 22, "abstractmethod": 22, "environment": 22, "orient": 22, "instanti": 22, "clspipelin": 22, "standalon": 22, "funcpipelin": 22, "categor": [22, 24], "next": [22, 24, 34], "facilit": [22, 25], "evalu": 22, "repeatedli": 22, "met": 22, "versu": 22, "term": [22, 27, 34], "thu": 22, "mix": 22, "practic": 22, "switch_result": 22, "case1": 22, "elif": 22, "case2": 22, "default_ag": 22, "max_iter": 22, "break_condit": 22, "worth": 22, "parallelpipelin": 22, "pipe1": 22, "parallel": [22, 28], "pipe2": 22, "agent5": 22, "pipe3": 22, "addition": [22, 25], "suppli": 22, "upon": [22, 25], "msg_hub": 22, "hub_manag": 22, "initial_announc": 22, "teardown": 22, "Or": 22, "some_messag": 22, "unintend": 22, "outsid": 22, "new_ag": 22, "existing_ag": 22, "global": 23, "appropri": [23, 24], "path_to_model_config": 23, "could": [23, 26], "1024x1024": 23, "fulli": [23, 28], "visit": 23, "introduct": 23, "fast": 23, "lightweight": 23, "meta": 23, "llama": 23, "2": 23, "7b": 23, "hf": 23, "8000": 23, "flask_transform": 23, "setup_hf_servic": 23, "model_name_or_path": 23, "devic": 23, "cuda": 23, "cpu": 23, "card": 23, "flask_llama2": 23, "4096": 23, "flask_modelscop": 23, "setup_ms_servic": 23, "quick": 23, "rest": 23, "model_work": 23, "bash": 23, "fastchat_script": 23, "fastchat_setup": 23, "sh": 23, "p": 23, "base_url": 23, "v1": 23, "throughput": 23, "vllm_script": 23, "vllm_setup": 23, "gpt2": 23, "your_api_token": 23, "co": 23, "entir": 23, "possibl": [23, 30], "automodelforcausallm": 23, "autotoken": 23, "from_pretrain": 23, "yourag": [23, 24], "often": 24, "simpli": [24, 26], "constitut": 24, "suit": 24, "reus": 24, "behind": 24, "instead": [24, 25], "sub": [24, 28], "demo_servic": 24, "specifc": 24, "failur": 24, "stack": 24, "why": 24, "benefici": 24, "flexibli": [24, 26], "fallback": 24, "analyz": 24, "improv": [24, 29, 30], "outcom": 24, "domain": 24, "criteria": [24, 25], "against": 24, "highlight": 24, "renam": 24, "further": 24, "consult": 24, "docstr": 24, "meticul": 24, "inspect": 24, "complet": [24, 28], "sig": 24, "signatur": 24, "params_prompt": 24, "annot": 24, "dump": [24, 25], "model_respons": 24, "individu": 25, "storag": 25, "histor": 25, "media": 25, "uuid4": 25, "hex": 25, "_get_timestamp": 25, "denot": 25, "substanc": 25, "itself": 25, "form": 25, "extern": [25, 27], "resourc": 25, "direct": 25, "wa": 25, "creation": 25, "concret": 25, "__type": 25, "someon": 25, "outwardli": 25, "manipul": 25, "return_typ": 25, "recent": 25, "appli": 25, "singl": [25, 28], "bulk": 25, "purg": 25, "reset": 25, "runtim": 25, "seek": [26, 29], "toward": 26, "desir": 26, "combin": 26, "underli": 26, "polici": 26, "space": 26, "arbitrari": 26, "newlin": 26, "hint_prompt": 26, "weather": 26, "todai": 26, "whose": 26, "user_messag": 26, "inject": 26, "london": 26, "user_input": 26, "particularli": 27, "those": 27, "reli": 27, "cost": 27, "overutil": 27, "complianc": 27, "rate": 27, "regul": 27, "focus": [27, 30], "made": [27, 30], "enforc": 27, "batch": 27, "zero": 27, "period": 27, "particular": 27, "fetch": 27, "obtain": 27, "seri": 27, "calcul": 27, "sure": [27, 28], "sqlite3": 27, "token_num": 27, "1000": 27, "20": 27, "thrown": 27, "api_cal": 27, "amount": 27, "paus": 27, "token_num_us": 27, "longer": 27, "separ": [27, 28, 30], "model_a": 27, "model_b": 27, "prompt_token": 27, "completion_token": 27, "openai_respons": 27, "model_dump": 27, "model_a_metr": 27, "model_b_metr": 27, "suppos": [27, 28], "throw": 27, "experiment": 27, "stage": 27, "_get_pric": 27, "popular": 28, "concurr": 28, "adopt": 28, "impli": 28, "consum": 28, "figur": 28, "arrow": 28, "c": 28, "simultan": 28, "d": 28, "thing": 28, "howev": 28, "pai": 28, "attent": 28, "procedur": 28, "paradigm": 28, "y": 28, "z": 28, "although": 28, "appear": 28, "detect": 28, "graph": 28, "80": 28, "transfer": 28, "exactli": 28, "ip_a": 28, "server_a": 28, "12001": 28, "similarli": 28, "ip_b": 28, "access": 28, "server_b": 28, "12002": 28, "becom": 29, "insight": 29, "ask": [29, 32], "date": 29, "latest": 29, "interest": 29, "star": 29, "watch": 29, "stai": 29, "progress": 29, "submit": 29, "suggest": [29, 30], "bug": [29, 32], "real": 29, "experi": 29, "scan": 29, "qr": 29, "invit": 29, "everyon": 29, "growth": 29, "thrive": 30, "idea": 30, "member": 30, "did": 30, "tracker": 30, "reproduc": 30, "propos": 30, "checkout": 30, "hook": 30, "concis": 30, "explain": 30, "brief": 30, "resolv": 30, "again": 30, "feedback": 30, "notif": 30, "agentpool": 31, "msghub": 31, "discord": 32, "dingtalk": 32, "\u9489\u9489": 32, "wechat": 32, "report": 32, "codebas": 32, "step1": 34, "step2": 34, "step3": 34}, "objects": {"agentscope.agents": [[1, 0, 0, "-", "agent"], [1, 0, 0, "-", "dialog_agent"], [1, 0, 0, "-", "dict_dialog_agent"], [1, 0, 0, "-", "operator"], [1, 0, 0, "-", "rpc_agent"], [1, 0, 0, "-", "text_to_image_agent"], [1, 0, 0, "-", "user_agent"]], "agentscope.agents.agent": [[1, 1, 1, "", "AgentBase"]], "agentscope.agents.agent.AgentBase": [[1, 2, 1, "", "clear_audience"], [1, 2, 1, "", "export_config"], [1, 2, 1, "", "load_from_config"], [1, 2, 1, "", "load_memory"], [1, 2, 1, "", "observe"], [1, 2, 1, "", "reply"], [1, 2, 1, "", "reset_audience"], [1, 2, 1, "", "rm_audience"], [1, 2, 1, "", "speak"], [1, 2, 1, "", "to_dist"]], "agentscope.agents.dialog_agent": [[1, 1, 1, "", "DialogAgent"]], "agentscope.agents.dialog_agent.DialogAgent": [[1, 2, 1, "", "reply"]], "agentscope.agents.dict_dialog_agent": [[1, 1, 1, "", "DictDialogAgent"]], "agentscope.agents.dict_dialog_agent.DictDialogAgent": [[1, 2, 1, "", "reply"]], "agentscope.agents.operator": [[1, 1, 1, "", "Operator"]], "agentscope.agents.rpc_agent": [[1, 1, 1, "", "RpcAgent"], [1, 1, 1, "", "RpcAgentServerLauncher"], [1, 1, 1, "", "RpcServerSideWrapper"], [1, 3, 1, "", "check_port"], [1, 3, 1, "", "find_available_port"], [1, 3, 1, "", "rpc_servicer_method"], [1, 3, 1, "", "setup_rcp_agent_server"]], "agentscope.agents.rpc_agent.RpcAgent": [[1, 2, 1, "", "observe"], [1, 2, 1, "", "reply"], [1, 2, 1, "", "stop"]], "agentscope.agents.rpc_agent.RpcAgentServerLauncher": [[1, 2, 1, "", "launch"], [1, 2, 1, "", "shutdown"], [1, 2, 1, "", "wait_until_terminate"]], "agentscope.agents.rpc_agent.RpcServerSideWrapper": [[1, 2, 1, "", "call_func"], [1, 2, 1, "", "get_task_id"], [1, 2, 1, "", "process_tasks"]], "agentscope.agents.text_to_image_agent": [[1, 1, 1, "", "TextToImageAgent"]], "agentscope.agents.text_to_image_agent.TextToImageAgent": [[1, 2, 1, "", "reply"]], "agentscope.agents.user_agent": [[1, 1, 1, "", "UserAgent"]], "agentscope.agents.user_agent.UserAgent": [[1, 2, 1, "", "reply"]], "agentscope.memory": [[2, 0, 0, "-", "memory"], [2, 0, 0, "-", "temporary_memory"]], "agentscope.memory.memory": [[2, 1, 1, "", "MemoryBase"]], "agentscope.memory.memory.MemoryBase": [[2, 2, 1, "", "add"], [2, 2, 1, "", "clear"], [2, 2, 1, "", "delete"], [2, 2, 1, "", "export"], [2, 2, 1, "", "get_memory"], [2, 2, 1, "", "load"], [2, 2, 1, "", "size"], [2, 2, 1, "", "update_config"]], "agentscope.memory.temporary_memory": [[2, 1, 1, "", "TemporaryMemory"]], "agentscope.memory.temporary_memory.TemporaryMemory": [[2, 2, 1, "", "add"], [2, 2, 1, "", "clear"], [2, 2, 1, "", "delete"], [2, 2, 1, "", "export"], [2, 2, 1, "", "get_embeddings"], [2, 2, 1, "", "get_memory"], [2, 2, 1, "", "load"], [2, 2, 1, "", "retrieve_by_embedding"], [2, 2, 1, "", "size"]], "agentscope": [[3, 0, 0, "-", "models"]], "agentscope.models": [[3, 3, 1, "", "clear_model_configs"], [3, 0, 0, "-", "config"], [3, 3, 1, "", "load_model_by_config_name"], [3, 0, 0, "-", "model"], [3, 0, 0, "-", "openai_model"], [3, 0, 0, "-", "post_model"], [3, 3, 1, "", "read_model_configs"]], "agentscope.models.config": [[3, 1, 1, "", "ModelConfig"]], "agentscope.models.config.ModelConfig": [[3, 2, 1, "", "format_configs"]], "agentscope.models.model": [[3, 1, 1, "", "ModelResponse"], [3, 1, 1, "", "ModelWrapperBase"]], "agentscope.models.model.ModelResponse": [[3, 4, 1, "", "embedding"], [3, 4, 1, "", "image_urls"], [3, 4, 1, "", "raw"], [3, 4, 1, "", "text"]], "agentscope.models.model.ModelWrapperBase": [[3, 5, 1, "", "registry"], [3, 5, 1, "", "type_registry"]], "agentscope.models.openai_model": [[3, 1, 1, "", "OpenAIChatWrapper"], [3, 1, 1, "", "OpenAIDALLEWrapper"], [3, 1, 1, "", "OpenAIEmbeddingWrapper"], [3, 1, 1, "", "OpenAIWrapper"]], "agentscope.models.openai_model.OpenAIChatWrapper": [[3, 5, 1, "", "model_type"]], "agentscope.models.openai_model.OpenAIDALLEWrapper": [[3, 5, 1, "", "model_type"]], "agentscope.models.openai_model.OpenAIEmbeddingWrapper": [[3, 5, 1, "", "model_type"]], "agentscope.models.post_model": [[3, 1, 1, "", "PostAPIChatWrapper"], [3, 1, 1, "", "PostAPIDALLEWrapper"], [3, 1, 1, "", "PostAPIModelWrapperBase"]], "agentscope.models.post_model.PostAPIChatWrapper": [[3, 5, 1, "", "model_type"]], "agentscope.models.post_model.PostAPIDALLEWrapper": [[3, 5, 1, "", "model_type"]], "agentscope.models.post_model.PostAPIModelWrapperBase": [[3, 5, 1, "", "model_type"]], "agentscope.pipelines": [[4, 0, 0, "-", "functional"], [4, 0, 0, "-", "pipeline"]], "agentscope.pipelines.functional": [[4, 3, 1, "", "forlooppipeline"], [4, 3, 1, "", "ifelsepipeline"], [4, 3, 1, "", "placeholder"], [4, 3, 1, "", "sequentialpipeline"], [4, 3, 1, "", "switchpipeline"], [4, 3, 1, "", "whilelooppipeline"]], "agentscope.pipelines.pipeline": [[4, 1, 1, "", "ForLoopPipeline"], [4, 1, 1, "", "IfElsePipeline"], [4, 1, 1, "", "PipelineBase"], [4, 1, 1, "", "SequentialPipeline"], [4, 1, 1, "", "SwitchPipeline"], [4, 1, 1, "", "WhileLoopPipeline"]], "agentscope.rpc": [[5, 0, 0, "-", "rpc_agent_client"], [5, 0, 0, "-", "rpc_agent_pb2_grpc"]], "agentscope.rpc.rpc_agent_client": [[5, 1, 1, "", "RpcAgentClient"]], "agentscope.rpc.rpc_agent_client.RpcAgentClient": [[5, 2, 1, "", "call_func"]], "agentscope.rpc.rpc_agent_pb2_grpc": [[5, 1, 1, "", "RpcAgent"], [5, 1, 1, "", "RpcAgentServicer"], [5, 1, 1, "", "RpcAgentStub"], [5, 3, 1, "", "add_RpcAgentServicer_to_server"]], "agentscope.rpc.rpc_agent_pb2_grpc.RpcAgent": [[5, 2, 1, "", "call_func"]], "agentscope.rpc.rpc_agent_pb2_grpc.RpcAgentServicer": [[5, 2, 1, "", "call_func"]], "agentscope.service.code": [[7, 0, 0, "-", "exec_python"]], "agentscope.service.code.exec_python": [[7, 3, 1, "", "execute_python_code"], [7, 3, 1, "", "sys_python_guard"]], "agentscope.service.file": [[8, 0, 0, "-", "common"], [8, 0, 0, "-", "json"], [8, 0, 0, "-", "text"]], "agentscope.service.file.common": [[8, 3, 1, "", "create_directory"], [8, 3, 1, "", "create_file"], [8, 3, 1, "", "delete_directory"], [8, 3, 1, "", "delete_file"], [8, 3, 1, "", "move_directory"], [8, 3, 1, "", "move_file"]], "agentscope.service.file.json": [[8, 3, 1, "", "read_json_file"], [8, 3, 1, "", "write_json_file"]], "agentscope.service.file.text": [[8, 3, 1, "", "read_text_file"], [8, 3, 1, "", "write_text_file"]], "agentscope.service.retrieval": [[9, 0, 0, "-", "retrieval_from_list"], [9, 0, 0, "-", "similarity"]], "agentscope.service.retrieval.retrieval_from_list": [[9, 3, 1, "", "retrieve_from_list"]], "agentscope.service.retrieval.similarity": [[9, 3, 1, "", "cos_sim"]], "agentscope.service.sql_query": [[10, 0, 0, "-", "mongodb"], [10, 0, 0, "-", "mysql"], [10, 0, 0, "-", "sqlite"]], "agentscope.service.sql_query.mongodb": [[10, 3, 1, "", "query_mongodb"]], "agentscope.service.sql_query.mysql": [[10, 3, 1, "", "query_mysql"]], "agentscope.service.sql_query.sqlite": [[10, 3, 1, "", "query_sqlite"]], "agentscope.service.text_processing": [[11, 0, 0, "-", "summarization"]], "agentscope.service.text_processing.summarization": [[11, 3, 1, "", "summarization"]], "agentscope.service.web_search": [[12, 0, 0, "-", "search"]], "agentscope.service.web_search.search": [[12, 3, 1, "", "web_search"]], "agentscope.utils": [[13, 0, 0, "-", "common"], [13, 0, 0, "-", "logging_utils"], [13, 0, 0, "-", "monitor"], [13, 0, 0, "-", "token_utils"], [13, 0, 0, "-", "tools"]], "agentscope.utils.common": [[13, 3, 1, "", "chdir"], [13, 3, 1, "", "create_tempdir"], [13, 3, 1, "", "if_change_database"], [13, 3, 1, "", "requests_get"], [13, 3, 1, "", "timer"], [13, 3, 1, "", "write_file"]], "agentscope.utils.logging_utils": [[13, 3, 1, "", "setup_logger"]], "agentscope.utils.monitor": [[13, 1, 1, "", "MonitorBase"], [13, 1, 1, "", "MonitorFactory"], [13, 6, 1, "", "QuotaExceededError"], [13, 1, 1, "", "SqliteMonitor"], [13, 3, 1, "", "get_full_name"], [13, 3, 1, "", "sqlite_cursor"], [13, 3, 1, "", "sqlite_transaction"]], "agentscope.utils.monitor.MonitorBase": [[13, 2, 1, "", "add"], [13, 2, 1, "", "clear"], [13, 2, 1, "", "exists"], [13, 2, 1, "", "get_metric"], [13, 2, 1, "", "get_metrics"], [13, 2, 1, "", "get_quota"], [13, 2, 1, "", "get_unit"], [13, 2, 1, "", "get_value"], [13, 2, 1, "", "register"], [13, 2, 1, "", "register_budget"], [13, 2, 1, "", "remove"], [13, 2, 1, "", "set_quota"], [13, 2, 1, "", "update"]], "agentscope.utils.monitor.MonitorFactory": [[13, 2, 1, "", "get_monitor"]], "agentscope.utils.monitor.SqliteMonitor": [[13, 2, 1, "", "add"], [13, 2, 1, "", "clear"], [13, 2, 1, "", "exists"], [13, 2, 1, "", "get_metric"], [13, 2, 1, "", "get_metrics"], [13, 2, 1, "", "get_quota"], [13, 2, 1, "", "get_unit"], [13, 2, 1, "", "get_value"], [13, 2, 1, "", "register"], [13, 2, 1, "", "register_budget"], [13, 2, 1, "", "remove"], [13, 2, 1, "", "set_quota"], [13, 2, 1, "", "update"]], "agentscope.utils.token_utils": [[13, 3, 1, "", "count_openai_token"], [13, 3, 1, "", "get_openai_max_length"], [13, 3, 1, "", "num_tokens_from_content"]], "agentscope.utils.tools": [[13, 3, 1, "", "extract_json_str"], [13, 3, 1, "", "to_dialog_str"], [13, 3, 1, "", "to_openai_dict"]], "agentscope.web_ui": [[14, 0, 0, "-", "app"]], "agentscope.web_ui.app": [[14, 3, 1, "", "follow_read"], [14, 3, 1, "", "get_chat"], [14, 3, 1, "", "get_system_log"], [14, 3, 1, "", "handle_file_selection"], [14, 3, 1, "", "is_chat_message_format"], [14, 3, 1, "", "put_file_name"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:function", "4": "py:property", "5": "py:attribute", "6": "py:exception"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "function", "Python function"], "4": ["py", "property", "Python property"], "5": ["py", "attribute", "Python attribute"], "6": ["py", "exception", "Python exception"]}, "titleterms": {"modul": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "content": [0, 3], "constant": 0, "file_manag": 0, "messag": [0, 20, 22, 25], "msghub": [0, 19, 22], "prompt": [0, 26], "agent": [1, 18, 19, 21, 22, 24, 28], "packag": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "oper": 1, "rpc_agent": 1, "user_ag": 1, "dialog_ag": 1, "dict_dialog_ag": 1, "text_to_image_ag": 1, "memori": [2, 23, 25], "temporary_memori": 2, "model": [3, 18, 19, 23], "config": [3, 18, 19], "openai_model": 3, "post_model": 3, "pipelin": [4, 19, 22], "function": [4, 24], "rpc": 5, "rpc_agent_cli": 5, "rpc_agent_pb2_grpc": 5, "servic": [6, 24], "service_statu": 6, "service_respons": 6, "code": [7, 17, 30], "exec_python": 7, "file": 8, "common": [8, 13], "json": 8, "text": [8, 11], "retriev": [9, 27], "retrieval_from_list": 9, "similar": 9, "sql": 10, "queri": 10, "mongodb": 10, "mysql": 10, "sqlite": 10, "process": [11, 28], "summar": 11, "web": [12, 14], "search": 12, "util": 13, "logging_util": 13, "monitor": [13, 27], "token_util": 13, "tool": 13, "ui": 14, "app": 14, "agentscop": [15, 16, 19, 23, 27, 29, 30, 33], "document": 15, "welcom": [15, 33], "tutori": [15, 33], "hub": [15, 22, 33], "navig": [15, 33], "get": [15, 18, 19, 27, 32, 33, 34], "start": [15, 18, 19, 33, 34], "advanc": [15, 27, 31, 33], "explor": [15, 21, 31, 33], "involv": [15, 32, 33], "api": [15, 19, 23, 27], "refer": 15, "indic": 15, "tabl": 15, "instal": [16, 23], "creat": [16, 18, 22, 30], "virtual": 16, "environ": 16, "us": [16, 23, 27], "conda": 16, "virtualenv": 16, "pip": 16, "from": [16, 21], "sourc": [16, 23], "fundament": 17, "concept": 17, "essenti": 17, "term": 17, "structur": 17, "simpl": 18, "exampl": [18, 19], "step1": 18, "prepar": [18, 19], "step2": 18, "step3": 18, "convers": 18, "craft": 19, "your": [19, 21, 28, 30], "first": 19, "applic": [19, 28], "step": 19, "1": 19, "set": [19, 20, 23], "2": 19, "defin": 19, "role": 19, "each": 19, "3": 19, "initi": [19, 26], "4": 19, "up": [19, 20, 23], "game": 19, "logic": 19, "leverag": 19, "implement": 19, "werewolf": 19, "5": 19, "run": [19, 20, 28], "next": 19, "other": [19, 20], "log": 20, "webui": 20, "logger": 20, "chat": 20, "system": 20, "inform": 20, "integr": 20, "quick": 20, "For": [20, 30], "custom": [20, 21], "own": 21, "understand": [21, 25, 26, 27], "agentbas": 21, "agentpool": 21, "dialogag": 21, "userag": 21, "interact": 22, "dive": 22, "deeper": 22, "categori": 22, "usag": [22, 24, 27], "sequentialpipelin": 22, "ifelsepipelin": 22, "switchpipelin": 22, "forlooppipelin": 22, "whilelooppipelin": 22, "combin": 22, "broadcast": 22, "ad": 22, "delet": 22, "particip": 22, "differ": 23, "standard": 23, "openai": 23, "self": 23, "host": 23, "flask": 23, "base": 23, "serv": 23, "With": 23, "transform": 23, "librari": 23, "how": 23, "note": 23, "modelscop": 23, "fastchat": 23, "support": 23, "vllm": 23, "infer": 23, "In": 23, "without": 23, "enhanc": 24, "capabl": 24, "servicerespons": 24, "overview": 24, "manag": 25, "messagebas": 25, "its": 25, "subclass": 25, "msg": 25, "tht": 25, "memorybas": 25, "temporarymemori": 25, "engin": 26, "promptengin": 26, "class": 26, "kei": 26, "featur": [26, 28, 30], "join": [26, 29], "compon": 26, "output": 26, "string": 26, "type": 26, "list": 26, "format": 26, "dynam": 26, "wai": 26, "instanc": 27, "basic": 27, "regist": 27, "metric": 27, "updat": 27, "handl": 27, "quota": 27, "reset": 27, "remov": 27, "prefix": 27, "distinguish": 27, "budget": 27, "an": [27, 28], "make": [28, 30], "distribut": 28, "everi": 28, "i": 28, "actor": 28, "write": 28, "central": 28, "distributedli": 28, "easi": 28, "deploy": 28, "convert": 28, "multi": 28, "mode": 28, "multipl": 28, "machin": 28, "The": 29, "commun": 29, "github": 29, "discord": 29, "dingtalk": 29, "\u9489\u9489": 29, "wechat": 29, "contribut": 30, "report": 30, "bug": 30, "ask": 30, "new": 30, "codebas": 30, "fork": 30, "clone": 30, "repositori": 30, "branch": 30, "chang": 30, "commit": 30, "submit": 30, "pull": 30, "request": 30, "review": 30}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx": 60}, "alltitles": {"Module contents": [[0, "module-contents"], [3, "module-agentscope.models"]], "constants module": [[0, "constants-module"]], "file_manager module": [[0, "file-manager-module"]], "message module": [[0, "message-module"]], "msghub module": [[0, "msghub-module"]], "prompt module": [[0, "prompt-module"]], "Agents package": [[1, "agents-package"]], "operator module": [[1, "module-agentscope.agents.operator"]], "agent module": [[1, "module-agentscope.agents.agent"]], "rpc_agent module": [[1, "module-agentscope.agents.rpc_agent"]], "user_agent module": [[1, "module-agentscope.agents.user_agent"]], "dialog_agent module": [[1, "module-agentscope.agents.dialog_agent"]], "dict_dialog_agent module": [[1, "module-agentscope.agents.dict_dialog_agent"]], "text_to_image_agent module": [[1, "module-agentscope.agents.text_to_image_agent"]], "Memory package": [[2, "memory-package"]], "memory module": [[2, "module-agentscope.memory.memory"]], "temporary_memory module": [[2, "module-agentscope.memory.temporary_memory"]], "Models package": [[3, "models-package"]], "config module": [[3, "module-agentscope.models.config"]], "model module": [[3, "module-agentscope.models.model"]], "openai_model module": [[3, "module-agentscope.models.openai_model"]], "post_model module": [[3, "module-agentscope.models.post_model"]], "Pipelines package": [[4, "pipelines-package"]], "pipeline module": [[4, "module-agentscope.pipelines.pipeline"]], "functional module": [[4, "module-agentscope.pipelines.functional"]], "RPC package": [[5, "rpc-package"]], "rpc_agent_client module": [[5, "module-agentscope.rpc.rpc_agent_client"]], "rpc_agent_pb2_grpc module": [[5, "module-agentscope.rpc.rpc_agent_pb2_grpc"]], "Service package": [[6, "service-package"]], "service_status module": [[6, "service-status-module"]], "service_response module": [[6, "service-response-module"]], "Code package": [[7, "code-package"]], "exec_python module": [[7, "module-agentscope.service.code.exec_python"]], "File package": [[8, "file-package"]], "common module": [[8, "module-agentscope.service.file.common"], [13, "module-agentscope.utils.common"]], "json module": [[8, "module-agentscope.service.file.json"]], "text module": [[8, "module-agentscope.service.file.text"]], "Retrieval package": [[9, "retrieval-package"]], "retrieval_from_list module": [[9, "module-agentscope.service.retrieval.retrieval_from_list"]], "similarity module": [[9, "module-agentscope.service.retrieval.similarity"]], "SQL query package": [[10, "sql-query-package"]], "mongodb module": [[10, "module-agentscope.service.sql_query.mongodb"]], "mysql module": [[10, "module-agentscope.service.sql_query.mysql"]], "sqlite module": [[10, "module-agentscope.service.sql_query.sqlite"]], "Text processing package": [[11, "text-processing-package"]], "summarization module": [[11, "module-agentscope.service.text_processing.summarization"]], "Web search package": [[12, "web-search-package"]], "search module": [[12, "module-agentscope.service.web_search.search"]], "Utils package": [[13, "utils-package"]], "logging_utils module": [[13, "module-agentscope.utils.logging_utils"]], "monitor module": [[13, "module-agentscope.utils.monitor"]], "token_utils module": [[13, "module-agentscope.utils.token_utils"]], "tools module": [[13, "module-agentscope.utils.tools"]], "Web UI package": [[14, "web-ui-package"]], "app module": [[14, "module-agentscope.web_ui.app"]], "AgentScope Documentation": [[15, "agentscope-documentation"]], "Welcome to AgentScope Tutorial Hub": [[15, "welcome-to-agentscope-tutorial-hub"], [33, "welcome-to-agentscope-tutorial-hub"]], "Tutorial Navigator": [[15, "tutorial-navigator"], [33, "tutorial-navigator"]], "Getting Started": [[15, "getting-started"], [19, "getting-started"], [33, "getting-started"], [34, "getting-started"]], "Advanced Exploration": [[15, "advanced-exploration"], [31, "advanced-exploration"], [33, "advanced-exploration"]], "Getting Involved": [[15, "getting-involved"], [33, "getting-involved"]], "AgentScope API Reference": [[15, null]], "Indices and tables": [[15, "indices-and-tables"]], "Installation": [[16, "installation"]], "Create a Virtual Environment": [[16, "create-a-virtual-environment"]], "Using Conda": [[16, "using-conda"]], "Using Virtualenv": [[16, "using-virtualenv"]], "Installing AgentScope": [[16, "installing-agentscope"]], "Install with Pip": [[16, "install-with-pip"]], "Install from Source": [[16, "install-from-source"]], "Fundamental Concepts": [[17, "fundamental-concepts"]], "Essential Terms and Concepts": [[17, "essential-terms-and-concepts"]], "Code Structure": [[17, "code-structure"]], "Getting Started with a Simple Example": [[18, "getting-started-with-a-simple-example"]], "Step1: Prepare Model Configs": [[18, "step1-prepare-model-configs"]], "Step2: Create Agents": [[18, "step2-create-agents"]], "Step3: Agent Conversation": [[18, "step3-agent-conversation"]], "Crafting Your First Application": [[19, "crafting-your-first-application"]], "Step 1: Prepare Model API and Set Model Configs": [[19, "step-1-prepare-model-api-and-set-model-configs"]], "Step 2: Define the Roles of Each Agent": [[19, "step-2-define-the-roles-of-each-agent"]], "Step 3: Initialize AgentScope and the Agents": [[19, "step-3-initialize-agentscope-and-the-agents"]], "Step 4: Set Up the Game Logic": [[19, "step-4-set-up-the-game-logic"]], "Leverage Pipeline and MsgHub": [[19, "leverage-pipeline-and-msghub"]], "Implement Werewolf Pipeline": [[19, "implement-werewolf-pipeline"]], "Step 5: Run the Application": [[19, "step-5-run-the-application"]], "Next step": [[19, "next-step"]], "Other Example Applications": [[19, "other-example-applications"]], "Logging and WebUI": [[20, "logging-and-webui"]], "Logging": [[20, "id1"]], "Setting Up the Logger": [[20, "setting-up-the-logger"]], "Logging a Chat Message": [[20, "logging-a-chat-message"]], "Logging a System information": [[20, "logging-a-system-information"]], "Integrating logging with WebUI": [[20, "integrating-logging-with-webui"]], "Quick Running": [[20, "quick-running"]], "For Other Customization": [[20, "for-other-customization"]], "Customizing Your Own Agent": [[21, "customizing-your-own-agent"]], "Understanding AgentBase": [[21, "understanding-agentbase"]], "Exploring the AgentPool": [[21, "exploring-the-agentpool"]], "Customizing Agents from the AgentPool": [[21, "customizing-agents-from-the-agentpool"]], "DialogAgent": [[21, "dialogagent"]], "UserAgent": [[21, "useragent"]], "Agent Interactions: Dive deeper into Pipelines and Message Hub": [[22, "agent-interactions-dive-deeper-into-pipelines-and-message-hub"]], "Pipelines": [[22, "pipelines"]], "Category": [[22, "category"]], "Usage": [[22, "usage"], [22, "id1"], [24, "usage"]], "SequentialPipeline": [[22, "sequentialpipeline"]], "IfElsePipeline": [[22, "ifelsepipeline"]], "SwitchPipeline": [[22, "switchpipeline"]], "ForLoopPipeline": [[22, "forlooppipeline"]], "WhileLoopPipeline": [[22, "whilelooppipeline"]], "Pipeline Combination": [[22, "pipeline-combination"]], "MsgHub": [[22, "msghub"]], "Creating a MsgHub": [[22, "creating-a-msghub"]], "Broadcast message in MsgHub": [[22, "broadcast-message-in-msghub"]], "Adding and Deleting Participants": [[22, "adding-and-deleting-participants"]], "Using Different Model Sources with Model API": [[23, "using-different-model-sources-with-model-api"]], "Standard OpenAI API": [[23, "standard-openai-api"]], "Self-host Model API": [[23, "self-host-model-api"]], "Flask-based Model API Serving": [[23, "flask-based-model-api-serving"]], "With Transformers Library": [[23, "with-transformers-library"]], "Install Libraries and Set up Serving": [[23, "install-libraries-and-set-up-serving"], [23, "id1"], [23, "id3"], [23, "id5"]], "How to use in AgentScope": [[23, "how-to-use-in-agentscope"], [23, "id4"], [23, "id7"]], "Note": [[23, "note"], [23, "id2"]], "With ModelScope Library": [[23, "with-modelscope-library"]], "How to use AgentScope": [[23, "how-to-use-agentscope"]], "FastChat": [[23, "fastchat"]], "Supported Models": [[23, "supported-models"]], "vllm": [[23, "vllm"]], "Supported models": [[23, "id6"]], "Model Inference API": [[23, "model-inference-api"]], "In-memory Models without API": [[23, "in-memory-models-without-api"]], "Enhancing Agent Capabilities with Service Functions": [[24, "enhancing-agent-capabilities-with-service-functions"]], "ServiceResponse": [[24, "serviceresponse"]], "Overview of Service Functions": [[24, "overview-of-service-functions"]], "Memory and Message Management": [[25, "memory-and-message-management"]], "Understanding MessageBase and its subclasses": [[25, "understanding-messagebase-and-its-subclasses"]], "MessageBase": [[25, "messagebase"]], "Msg": [[25, "msg"]], "Tht": [[25, "tht"]], "Understanding MemoryBase and its subclasses": [[25, "understanding-memorybase-and-its-subclasses"]], "MemoryBase": [[25, "memorybase"]], "TemporaryMemory": [[25, "temporarymemory"]], "Prompt Engine": [[26, "prompt-engine"]], "Understanding the PromptEngine Class": [[26, "understanding-the-promptengine-class"]], "Key Features of PromptEngine": [[26, "key-features-of-promptengine"]], "Initialization": [[26, "initialization"]], "Joining Prompt Components": [[26, "joining-prompt-components"]], "Output String Type Prompt": [[26, "output-string-type-prompt"]], "Output List Type Prompt": [[26, "output-list-type-prompt"]], "Formatting Prompts in Dynamic Way": [[26, "formatting-prompts-in-dynamic-way"]], "Monitor": [[27, "monitor"]], "Understanding the Monitor in AgentScope": [[27, "understanding-the-monitor-in-agentscope"]], "Using the Monitor": [[27, "using-the-monitor"]], "Get a Monitor Instance": [[27, "get-a-monitor-instance"]], "Basic Usage": [[27, "basic-usage"]], "Registering API Usage Metrics": [[27, "registering-api-usage-metrics"]], "Updating Metrics": [[27, "updating-metrics"]], "Handling Quotas": [[27, "handling-quotas"]], "Retrieving Metrics": [[27, "retrieving-metrics"]], "Resetting and Removing Metrics": [[27, "resetting-and-removing-metrics"]], "Advanced Usage": [[27, "advanced-usage"]], "Using prefix to Distinguish Metrics": [[27, "using-prefix-to-distinguish-metrics"]], "Register a budget for an API": [[27, "register-a-budget-for-an-api"]], "Make Your Applications Distributed": [[28, "make-your-applications-distributed"]], "Features": [[28, "features"]], "Every agent is an \u201cActor\u201d": [[28, "every-agent-is-an-actor"]], "Write centrally, run distributedly": [[28, "write-centrally-run-distributedly"]], "Easy Distributed Deployment": [[28, "easy-distributed-deployment"]], "Convert your agents": [[28, "convert-your-agents"]], "Run in multi-process mode": [[28, "run-in-multi-process-mode"]], "Run on multiple machines": [[28, "run-on-multiple-machines"]], "Joining The AgentScope Community": [[29, "joining-the-agentscope-community"]], "GitHub": [[29, "github"]], "Discord": [[29, "discord"]], "DingTalk (\u9489\u9489)": [[29, "dingtalk"]], "Wechat": [[29, "wechat"]], "Contributing to AgentScope": [[30, "contributing-to-agentscope"]], "Report Bugs and Ask For New Features?": [[30, "report-bugs-and-ask-for-new-features"]], "Contribute to Codebase": [[30, "contribute-to-codebase"]], "Fork and Clone the Repository": [[30, "fork-and-clone-the-repository"]], "Create a New Branch": [[30, "create-a-new-branch"]], "Making Changes": [[30, "making-changes"]], "Commit Your Changes": [[30, "commit-your-changes"]], "Submit a Pull Request": [[30, "submit-a-pull-request"]], "Code Review": [[30, "code-review"]], "Get Involved": [[32, "get-involved"]]}, "indexentries": {"agentbase (class in agentscope.agents.agent)": [[1, "agentscope.agents.agent.AgentBase"]], "dialogagent (class in agentscope.agents.dialog_agent)": [[1, "agentscope.agents.dialog_agent.DialogAgent"]], "dictdialogagent (class in agentscope.agents.dict_dialog_agent)": [[1, "agentscope.agents.dict_dialog_agent.DictDialogAgent"]], "operator (class in agentscope.agents.operator)": [[1, "agentscope.agents.operator.Operator"]], "rpcagent (class in agentscope.agents.rpc_agent)": [[1, "agentscope.agents.rpc_agent.RpcAgent"]], "rpcagentserverlauncher (class in agentscope.agents.rpc_agent)": [[1, "agentscope.agents.rpc_agent.RpcAgentServerLauncher"]], "rpcserversidewrapper (class in agentscope.agents.rpc_agent)": [[1, "agentscope.agents.rpc_agent.RpcServerSideWrapper"]], "texttoimageagent (class in agentscope.agents.text_to_image_agent)": [[1, "agentscope.agents.text_to_image_agent.TextToImageAgent"]], "useragent (class in agentscope.agents.user_agent)": [[1, "agentscope.agents.user_agent.UserAgent"]], "agentscope.agents.agent": [[1, "module-agentscope.agents.agent"]], "agentscope.agents.dialog_agent": [[1, "module-agentscope.agents.dialog_agent"]], "agentscope.agents.dict_dialog_agent": [[1, "module-agentscope.agents.dict_dialog_agent"]], "agentscope.agents.operator": [[1, "module-agentscope.agents.operator"]], "agentscope.agents.rpc_agent": [[1, "module-agentscope.agents.rpc_agent"]], "agentscope.agents.text_to_image_agent": [[1, "module-agentscope.agents.text_to_image_agent"]], "agentscope.agents.user_agent": [[1, "module-agentscope.agents.user_agent"]], "call_func() (agentscope.agents.rpc_agent.rpcserversidewrapper method)": [[1, "agentscope.agents.rpc_agent.RpcServerSideWrapper.call_func"]], "check_port() (in module agentscope.agents.rpc_agent)": [[1, "agentscope.agents.rpc_agent.check_port"]], "clear_audience() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.clear_audience"]], "export_config() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.export_config"]], "find_available_port() (in module agentscope.agents.rpc_agent)": [[1, "agentscope.agents.rpc_agent.find_available_port"]], "get_task_id() (agentscope.agents.rpc_agent.rpcserversidewrapper method)": [[1, "agentscope.agents.rpc_agent.RpcServerSideWrapper.get_task_id"]], "launch() (agentscope.agents.rpc_agent.rpcagentserverlauncher method)": [[1, "agentscope.agents.rpc_agent.RpcAgentServerLauncher.launch"]], "load_from_config() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.load_from_config"]], "load_memory() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.load_memory"]], "module": [[1, "module-agentscope.agents.agent"], [1, "module-agentscope.agents.dialog_agent"], [1, "module-agentscope.agents.dict_dialog_agent"], [1, "module-agentscope.agents.operator"], [1, "module-agentscope.agents.rpc_agent"], [1, "module-agentscope.agents.text_to_image_agent"], [1, "module-agentscope.agents.user_agent"], [2, "module-agentscope.memory.memory"], [2, "module-agentscope.memory.temporary_memory"], [3, "module-agentscope.models"], [3, "module-agentscope.models.config"], [3, "module-agentscope.models.model"], [3, "module-agentscope.models.openai_model"], [3, "module-agentscope.models.post_model"], [4, "module-agentscope.pipelines.functional"], [4, "module-agentscope.pipelines.pipeline"], [5, "module-agentscope.rpc.rpc_agent_client"], [5, "module-agentscope.rpc.rpc_agent_pb2_grpc"], [7, "module-agentscope.service.code.exec_python"], [8, "module-agentscope.service.file.common"], [8, "module-agentscope.service.file.json"], [8, "module-agentscope.service.file.text"], [9, "module-agentscope.service.retrieval.retrieval_from_list"], [9, "module-agentscope.service.retrieval.similarity"], [10, "module-agentscope.service.sql_query.mongodb"], [10, "module-agentscope.service.sql_query.mysql"], [10, "module-agentscope.service.sql_query.sqlite"], [11, "module-agentscope.service.text_processing.summarization"], [12, "module-agentscope.service.web_search.search"], [13, "module-agentscope.utils.common"], [13, "module-agentscope.utils.logging_utils"], [13, "module-agentscope.utils.monitor"], [13, "module-agentscope.utils.token_utils"], [13, "module-agentscope.utils.tools"], [14, "module-agentscope.web_ui.app"]], "observe() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.observe"]], "observe() (agentscope.agents.rpc_agent.rpcagent method)": [[1, "agentscope.agents.rpc_agent.RpcAgent.observe"]], "process_tasks() (agentscope.agents.rpc_agent.rpcserversidewrapper method)": [[1, "agentscope.agents.rpc_agent.RpcServerSideWrapper.process_tasks"]], "reply() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.reply"]], "reply() (agentscope.agents.dialog_agent.dialogagent method)": [[1, "agentscope.agents.dialog_agent.DialogAgent.reply"]], "reply() (agentscope.agents.dict_dialog_agent.dictdialogagent method)": [[1, "agentscope.agents.dict_dialog_agent.DictDialogAgent.reply"]], "reply() (agentscope.agents.rpc_agent.rpcagent method)": [[1, "agentscope.agents.rpc_agent.RpcAgent.reply"]], "reply() (agentscope.agents.text_to_image_agent.texttoimageagent method)": [[1, "agentscope.agents.text_to_image_agent.TextToImageAgent.reply"]], "reply() (agentscope.agents.user_agent.useragent method)": [[1, "agentscope.agents.user_agent.UserAgent.reply"]], "reset_audience() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.reset_audience"]], "rm_audience() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.rm_audience"]], "rpc_servicer_method() (in module agentscope.agents.rpc_agent)": [[1, "agentscope.agents.rpc_agent.rpc_servicer_method"]], "setup_rcp_agent_server() (in module agentscope.agents.rpc_agent)": [[1, "agentscope.agents.rpc_agent.setup_rcp_agent_server"]], "shutdown() (agentscope.agents.rpc_agent.rpcagentserverlauncher method)": [[1, "agentscope.agents.rpc_agent.RpcAgentServerLauncher.shutdown"]], "speak() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.speak"]], "stop() (agentscope.agents.rpc_agent.rpcagent method)": [[1, "agentscope.agents.rpc_agent.RpcAgent.stop"]], "to_dist() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.to_dist"]], "wait_until_terminate() (agentscope.agents.rpc_agent.rpcagentserverlauncher method)": [[1, "agentscope.agents.rpc_agent.RpcAgentServerLauncher.wait_until_terminate"]], "memorybase (class in agentscope.memory.memory)": [[2, "agentscope.memory.memory.MemoryBase"]], "temporarymemory (class in agentscope.memory.temporary_memory)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory"]], "add() (agentscope.memory.memory.memorybase method)": [[2, "agentscope.memory.memory.MemoryBase.add"]], "add() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.add"]], "agentscope.memory.memory": [[2, "module-agentscope.memory.memory"]], "agentscope.memory.temporary_memory": [[2, "module-agentscope.memory.temporary_memory"]], "clear() (agentscope.memory.memory.memorybase method)": [[2, "agentscope.memory.memory.MemoryBase.clear"]], "clear() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.clear"]], "delete() (agentscope.memory.memory.memorybase method)": [[2, "agentscope.memory.memory.MemoryBase.delete"]], "delete() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.delete"]], "export() (agentscope.memory.memory.memorybase method)": [[2, "agentscope.memory.memory.MemoryBase.export"]], "export() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.export"]], "get_embeddings() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.get_embeddings"]], "get_memory() (agentscope.memory.memory.memorybase method)": [[2, "agentscope.memory.memory.MemoryBase.get_memory"]], "get_memory() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.get_memory"]], "load() (agentscope.memory.memory.memorybase method)": [[2, "agentscope.memory.memory.MemoryBase.load"]], "load() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.load"]], "retrieve_by_embedding() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.retrieve_by_embedding"]], "size() (agentscope.memory.memory.memorybase method)": [[2, "agentscope.memory.memory.MemoryBase.size"]], "size() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.size"]], "update_config() (agentscope.memory.memory.memorybase method)": [[2, "agentscope.memory.memory.MemoryBase.update_config"]], "modelconfig (class in agentscope.models.config)": [[3, "agentscope.models.config.ModelConfig"]], "modelresponse (class in agentscope.models.model)": [[3, "agentscope.models.model.ModelResponse"]], "modelwrapperbase (class in agentscope.models.model)": [[3, "agentscope.models.model.ModelWrapperBase"]], "openaichatwrapper (class in agentscope.models.openai_model)": [[3, "agentscope.models.openai_model.OpenAIChatWrapper"]], "openaidallewrapper (class in agentscope.models.openai_model)": [[3, "agentscope.models.openai_model.OpenAIDALLEWrapper"]], "openaiembeddingwrapper (class in agentscope.models.openai_model)": [[3, "agentscope.models.openai_model.OpenAIEmbeddingWrapper"]], "openaiwrapper (class in agentscope.models.openai_model)": [[3, "agentscope.models.openai_model.OpenAIWrapper"]], "postapichatwrapper (class in agentscope.models.post_model)": [[3, "agentscope.models.post_model.PostAPIChatWrapper"]], "postapidallewrapper (class in agentscope.models.post_model)": [[3, "agentscope.models.post_model.PostAPIDALLEWrapper"]], "postapimodelwrapperbase (class in agentscope.models.post_model)": [[3, "agentscope.models.post_model.PostAPIModelWrapperBase"]], "agentscope.models": [[3, "module-agentscope.models"]], "agentscope.models.config": [[3, "module-agentscope.models.config"]], "agentscope.models.model": [[3, "module-agentscope.models.model"]], "agentscope.models.openai_model": [[3, "module-agentscope.models.openai_model"]], "agentscope.models.post_model": [[3, "module-agentscope.models.post_model"]], "clear_model_configs() (in module agentscope.models)": [[3, "agentscope.models.clear_model_configs"]], "embedding (agentscope.models.model.modelresponse property)": [[3, "agentscope.models.model.ModelResponse.embedding"]], "format_configs() (agentscope.models.config.modelconfig class method)": [[3, "agentscope.models.config.ModelConfig.format_configs"]], "image_urls (agentscope.models.model.modelresponse property)": [[3, "agentscope.models.model.ModelResponse.image_urls"]], "load_model_by_config_name() (in module agentscope.models)": [[3, "agentscope.models.load_model_by_config_name"]], "model_type (agentscope.models.openai_model.openaichatwrapper attribute)": [[3, "agentscope.models.openai_model.OpenAIChatWrapper.model_type"]], "model_type (agentscope.models.openai_model.openaidallewrapper attribute)": [[3, "agentscope.models.openai_model.OpenAIDALLEWrapper.model_type"]], "model_type (agentscope.models.openai_model.openaiembeddingwrapper attribute)": [[3, "agentscope.models.openai_model.OpenAIEmbeddingWrapper.model_type"]], "model_type (agentscope.models.post_model.postapichatwrapper attribute)": [[3, "agentscope.models.post_model.PostAPIChatWrapper.model_type"]], "model_type (agentscope.models.post_model.postapidallewrapper attribute)": [[3, "agentscope.models.post_model.PostAPIDALLEWrapper.model_type"]], "model_type (agentscope.models.post_model.postapimodelwrapperbase attribute)": [[3, "agentscope.models.post_model.PostAPIModelWrapperBase.model_type"]], "raw (agentscope.models.model.modelresponse property)": [[3, "agentscope.models.model.ModelResponse.raw"]], "read_model_configs() (in module agentscope.models)": [[3, "agentscope.models.read_model_configs"]], "registry (agentscope.models.model.modelwrapperbase attribute)": [[3, "agentscope.models.model.ModelWrapperBase.registry"]], "text (agentscope.models.model.modelresponse property)": [[3, "agentscope.models.model.ModelResponse.text"]], "type_registry (agentscope.models.model.modelwrapperbase attribute)": [[3, "agentscope.models.model.ModelWrapperBase.type_registry"]], "forlooppipeline (class in agentscope.pipelines.pipeline)": [[4, "agentscope.pipelines.pipeline.ForLoopPipeline"]], "ifelsepipeline (class in agentscope.pipelines.pipeline)": [[4, "agentscope.pipelines.pipeline.IfElsePipeline"]], "pipelinebase (class in agentscope.pipelines.pipeline)": [[4, "agentscope.pipelines.pipeline.PipelineBase"]], "sequentialpipeline (class in agentscope.pipelines.pipeline)": [[4, "agentscope.pipelines.pipeline.SequentialPipeline"]], "switchpipeline (class in agentscope.pipelines.pipeline)": [[4, "agentscope.pipelines.pipeline.SwitchPipeline"]], "whilelooppipeline (class in agentscope.pipelines.pipeline)": [[4, "agentscope.pipelines.pipeline.WhileLoopPipeline"]], "agentscope.pipelines.functional": [[4, "module-agentscope.pipelines.functional"]], "agentscope.pipelines.pipeline": [[4, "module-agentscope.pipelines.pipeline"]], "forlooppipeline() (in module agentscope.pipelines.functional)": [[4, "agentscope.pipelines.functional.forlooppipeline"]], "ifelsepipeline() (in module agentscope.pipelines.functional)": [[4, "agentscope.pipelines.functional.ifelsepipeline"]], "placeholder() (in module agentscope.pipelines.functional)": [[4, "agentscope.pipelines.functional.placeholder"]], "sequentialpipeline() (in module agentscope.pipelines.functional)": [[4, "agentscope.pipelines.functional.sequentialpipeline"]], "switchpipeline() (in module agentscope.pipelines.functional)": [[4, "agentscope.pipelines.functional.switchpipeline"]], "whilelooppipeline() (in module agentscope.pipelines.functional)": [[4, "agentscope.pipelines.functional.whilelooppipeline"]], "rpcagent (class in agentscope.rpc.rpc_agent_pb2_grpc)": [[5, "agentscope.rpc.rpc_agent_pb2_grpc.RpcAgent"]], "rpcagentclient (class in agentscope.rpc.rpc_agent_client)": [[5, "agentscope.rpc.rpc_agent_client.RpcAgentClient"]], "rpcagentservicer (class in agentscope.rpc.rpc_agent_pb2_grpc)": [[5, "agentscope.rpc.rpc_agent_pb2_grpc.RpcAgentServicer"]], "rpcagentstub (class in agentscope.rpc.rpc_agent_pb2_grpc)": [[5, "agentscope.rpc.rpc_agent_pb2_grpc.RpcAgentStub"]], "add_rpcagentservicer_to_server() (in module agentscope.rpc.rpc_agent_pb2_grpc)": [[5, "agentscope.rpc.rpc_agent_pb2_grpc.add_RpcAgentServicer_to_server"]], "agentscope.rpc.rpc_agent_client": [[5, "module-agentscope.rpc.rpc_agent_client"]], "agentscope.rpc.rpc_agent_pb2_grpc": [[5, "module-agentscope.rpc.rpc_agent_pb2_grpc"]], "call_func() (agentscope.rpc.rpc_agent_client.rpcagentclient method)": [[5, "agentscope.rpc.rpc_agent_client.RpcAgentClient.call_func"]], "call_func() (agentscope.rpc.rpc_agent_pb2_grpc.rpcagent static method)": [[5, "agentscope.rpc.rpc_agent_pb2_grpc.RpcAgent.call_func"]], "call_func() (agentscope.rpc.rpc_agent_pb2_grpc.rpcagentservicer method)": [[5, "agentscope.rpc.rpc_agent_pb2_grpc.RpcAgentServicer.call_func"]], "agentscope.service.code.exec_python": [[7, "module-agentscope.service.code.exec_python"]], "execute_python_code() (in module agentscope.service.code.exec_python)": [[7, "agentscope.service.code.exec_python.execute_python_code"]], "sys_python_guard() (in module agentscope.service.code.exec_python)": [[7, "agentscope.service.code.exec_python.sys_python_guard"]], "agentscope.service.file.common": [[8, "module-agentscope.service.file.common"]], "agentscope.service.file.json": [[8, "module-agentscope.service.file.json"]], "agentscope.service.file.text": [[8, "module-agentscope.service.file.text"]], "create_directory() (in module agentscope.service.file.common)": [[8, "agentscope.service.file.common.create_directory"]], "create_file() (in module agentscope.service.file.common)": [[8, "agentscope.service.file.common.create_file"]], "delete_directory() (in module agentscope.service.file.common)": [[8, "agentscope.service.file.common.delete_directory"]], "delete_file() (in module agentscope.service.file.common)": [[8, "agentscope.service.file.common.delete_file"]], "move_directory() (in module agentscope.service.file.common)": [[8, "agentscope.service.file.common.move_directory"]], "move_file() (in module agentscope.service.file.common)": [[8, "agentscope.service.file.common.move_file"]], "read_json_file() (in module agentscope.service.file.json)": [[8, "agentscope.service.file.json.read_json_file"]], "read_text_file() (in module agentscope.service.file.text)": [[8, "agentscope.service.file.text.read_text_file"]], "write_json_file() (in module agentscope.service.file.json)": [[8, "agentscope.service.file.json.write_json_file"]], "write_text_file() (in module agentscope.service.file.text)": [[8, "agentscope.service.file.text.write_text_file"]], "agentscope.service.retrieval.retrieval_from_list": [[9, "module-agentscope.service.retrieval.retrieval_from_list"]], "agentscope.service.retrieval.similarity": [[9, "module-agentscope.service.retrieval.similarity"]], "cos_sim() (in module agentscope.service.retrieval.similarity)": [[9, "agentscope.service.retrieval.similarity.cos_sim"]], "retrieve_from_list() (in module agentscope.service.retrieval.retrieval_from_list)": [[9, "agentscope.service.retrieval.retrieval_from_list.retrieve_from_list"]], "agentscope.service.sql_query.mongodb": [[10, "module-agentscope.service.sql_query.mongodb"]], "agentscope.service.sql_query.mysql": [[10, "module-agentscope.service.sql_query.mysql"]], "agentscope.service.sql_query.sqlite": [[10, "module-agentscope.service.sql_query.sqlite"]], "query_mongodb() (in module agentscope.service.sql_query.mongodb)": [[10, "agentscope.service.sql_query.mongodb.query_mongodb"]], "query_mysql() (in module agentscope.service.sql_query.mysql)": [[10, "agentscope.service.sql_query.mysql.query_mysql"]], "query_sqlite() (in module agentscope.service.sql_query.sqlite)": [[10, "agentscope.service.sql_query.sqlite.query_sqlite"]], "agentscope.service.text_processing.summarization": [[11, "module-agentscope.service.text_processing.summarization"]], "summarization() (in module agentscope.service.text_processing.summarization)": [[11, "agentscope.service.text_processing.summarization.summarization"]], "agentscope.service.web_search.search": [[12, "module-agentscope.service.web_search.search"]], "web_search() (in module agentscope.service.web_search.search)": [[12, "agentscope.service.web_search.search.web_search"]], "monitorbase (class in agentscope.utils.monitor)": [[13, "agentscope.utils.monitor.MonitorBase"]], "monitorfactory (class in agentscope.utils.monitor)": [[13, "agentscope.utils.monitor.MonitorFactory"]], "quotaexceedederror": [[13, "agentscope.utils.monitor.QuotaExceededError"]], "sqlitemonitor (class in agentscope.utils.monitor)": [[13, "agentscope.utils.monitor.SqliteMonitor"]], "add() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.add"]], "add() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.add"]], "agentscope.utils.common": [[13, "module-agentscope.utils.common"]], "agentscope.utils.logging_utils": [[13, "module-agentscope.utils.logging_utils"]], "agentscope.utils.monitor": [[13, "module-agentscope.utils.monitor"]], "agentscope.utils.token_utils": [[13, "module-agentscope.utils.token_utils"]], "agentscope.utils.tools": [[13, "module-agentscope.utils.tools"]], "chdir() (in module agentscope.utils.common)": [[13, "agentscope.utils.common.chdir"]], "clear() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.clear"]], "clear() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.clear"]], "count_openai_token() (in module agentscope.utils.token_utils)": [[13, "agentscope.utils.token_utils.count_openai_token"]], "create_tempdir() (in module agentscope.utils.common)": [[13, "agentscope.utils.common.create_tempdir"]], "exists() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.exists"]], "exists() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.exists"]], "extract_json_str() (in module agentscope.utils.tools)": [[13, "agentscope.utils.tools.extract_json_str"]], "get_full_name() (in module agentscope.utils.monitor)": [[13, "agentscope.utils.monitor.get_full_name"]], "get_metric() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.get_metric"]], "get_metric() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.get_metric"]], "get_metrics() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.get_metrics"]], "get_metrics() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.get_metrics"]], "get_monitor() (agentscope.utils.monitor.monitorfactory class method)": [[13, "agentscope.utils.monitor.MonitorFactory.get_monitor"]], "get_openai_max_length() (in module agentscope.utils.token_utils)": [[13, "agentscope.utils.token_utils.get_openai_max_length"]], "get_quota() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.get_quota"]], "get_quota() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.get_quota"]], "get_unit() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.get_unit"]], "get_unit() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.get_unit"]], "get_value() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.get_value"]], "get_value() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.get_value"]], "if_change_database() (in module agentscope.utils.common)": [[13, "agentscope.utils.common.if_change_database"]], "num_tokens_from_content() (in module agentscope.utils.token_utils)": [[13, "agentscope.utils.token_utils.num_tokens_from_content"]], "register() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.register"]], "register() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.register"]], "register_budget() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.register_budget"]], "register_budget() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.register_budget"]], "remove() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.remove"]], "remove() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.remove"]], "requests_get() (in module agentscope.utils.common)": [[13, "agentscope.utils.common.requests_get"]], "set_quota() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.set_quota"]], "set_quota() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.set_quota"]], "setup_logger() (in module agentscope.utils.logging_utils)": [[13, "agentscope.utils.logging_utils.setup_logger"]], "sqlite_cursor() (in module agentscope.utils.monitor)": [[13, "agentscope.utils.monitor.sqlite_cursor"]], "sqlite_transaction() (in module agentscope.utils.monitor)": [[13, "agentscope.utils.monitor.sqlite_transaction"]], "timer() (in module agentscope.utils.common)": [[13, "agentscope.utils.common.timer"]], "to_dialog_str() (in module agentscope.utils.tools)": [[13, "agentscope.utils.tools.to_dialog_str"]], "to_openai_dict() (in module agentscope.utils.tools)": [[13, "agentscope.utils.tools.to_openai_dict"]], "update() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.update"]], "update() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.update"]], "write_file() (in module agentscope.utils.common)": [[13, "agentscope.utils.common.write_file"]], "agentscope.web_ui.app": [[14, "module-agentscope.web_ui.app"]], "follow_read() (in module agentscope.web_ui.app)": [[14, "agentscope.web_ui.app.follow_read"]], "get_chat() (in module agentscope.web_ui.app)": [[14, "agentscope.web_ui.app.get_chat"]], "get_system_log() (in module agentscope.web_ui.app)": [[14, "agentscope.web_ui.app.get_system_log"]], "handle_file_selection() (in module agentscope.web_ui.app)": [[14, "agentscope.web_ui.app.handle_file_selection"]], "is_chat_message_format() (in module agentscope.web_ui.app)": [[14, "agentscope.web_ui.app.is_chat_message_format"]], "put_file_name() (in module agentscope.web_ui.app)": [[14, "agentscope.web_ui.app.put_file_name"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["agentscope", "agentscope.agents", "agentscope.memory", "agentscope.models", "agentscope.pipelines", "agentscope.rpc", "agentscope.service", "agentscope.service.code", "agentscope.service.file", "agentscope.service.retrieval", "agentscope.service.sql_query", "agentscope.service.text_processing", "agentscope.service.web_search", "agentscope.utils", "agentscope.web", "index", "tutorial/101-installation", "tutorial/102-concepts", "tutorial/103-example", "tutorial/104-usecase", "tutorial/105-logging", "tutorial/201-agent", "tutorial/202-pipeline", "tutorial/203-model", "tutorial/204-service", "tutorial/205-memory", "tutorial/206-prompt", "tutorial/207-monitor", "tutorial/208-distribute", "tutorial/301-community", "tutorial/302-contribute", "tutorial/advance", "tutorial/contribute", "tutorial/main", "tutorial/quick_start"], "filenames": ["agentscope.rst", "agentscope.agents.rst", "agentscope.memory.rst", "agentscope.models.rst", "agentscope.pipelines.rst", "agentscope.rpc.rst", "agentscope.service.rst", "agentscope.service.code.rst", "agentscope.service.file.rst", "agentscope.service.retrieval.rst", "agentscope.service.sql_query.rst", "agentscope.service.text_processing.rst", "agentscope.service.web_search.rst", "agentscope.utils.rst", "agentscope.web.rst", "index.rst", "tutorial/101-installation.md", "tutorial/102-concepts.md", "tutorial/103-example.md", "tutorial/104-usecase.md", "tutorial/105-logging.md", "tutorial/201-agent.md", "tutorial/202-pipeline.md", "tutorial/203-model.md", "tutorial/204-service.md", "tutorial/205-memory.md", "tutorial/206-prompt.md", "tutorial/207-monitor.md", "tutorial/208-distribute.md", "tutorial/301-community.md", "tutorial/302-contribute.md", "tutorial/advance.rst", "tutorial/contribute.rst", "tutorial/main.md", "tutorial/quick_start.rst"], "titles": ["Module contents", "Agents package", "Memory package", "Models package", "Pipelines package", "RPC package", "Service package", "Code package", "File package", "Retrieval package", "SQL query package", "Text processing package", "Web search package", "Utils package", "Web UI package", "AgentScope Documentation", "Installation", "Fundamental Concepts", "Getting Started with a Simple Example", "Crafting Your First Application", "Logging and WebUI", "Customizing Your Own Agent", "Agent Interactions: Dive deeper into Pipelines and Message Hub", "Using Different Model Sources with Model API", "Enhancing Agent Capabilities with Service Functions", "Memory and Message Management", "Prompt Engine", "Monitor", "Make Your Applications Distributed", "Joining The AgentScope Community", "Contributing to AgentScope", "Advanced Exploration", "Get Involved", "Welcome to AgentScope Tutorial Hub", "Getting Started"], "terms": {"some": [0, 1, 7, 21, 22, 24, 27, 30], "us": [0, 1, 2, 4, 6, 7, 9, 10, 11, 12, 13, 15, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 30, 31, 33], "project": [0, 16, 20, 21], "class": [0, 1, 2, 3, 4, 5, 6, 13, 19, 21, 22, 24, 25, 27, 28, 31], "agentscop": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 17, 18, 20, 21, 22, 24, 28, 31, 32, 34], "responseformat": 0, "valu": [0, 2, 5, 6, 12, 13, 27], "sourc": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 18, 21, 25, 31, 33], "base": [0, 1, 2, 3, 4, 5, 6, 9, 12, 13, 15, 17, 18, 19, 21, 22, 24, 25, 27, 28, 33], "intenum": [0, 6], "enum": [0, 6], "model": [0, 1, 2, 9, 11, 13, 15, 17, 21, 24, 25, 26, 27, 28, 31, 33, 34], "respons": [0, 1, 6, 13, 17, 18, 19, 21, 22, 24, 25, 30], "format": [0, 1, 3, 7, 12, 13, 19, 20, 21, 23, 24, 25, 30], "json": [0, 1, 2, 6, 12, 13, 18, 19, 21, 23, 24, 25, 26], "1": [0, 2, 3, 4, 6, 11, 18, 20, 23], "none": [0, 1, 2, 3, 4, 5, 7, 9, 10, 12, 13, 18, 21, 22, 24, 25, 28], "0": [0, 3, 4, 13, 19, 20, 23], "shrinkpolici": [0, 26], "shrink": [0, 26], "strategi": [0, 19, 22, 24], "when": [0, 1, 4, 7, 12, 13, 17, 19, 20, 25, 26, 27, 28, 30], "i": [0, 1, 2, 3, 4, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 30, 33], "too": [0, 10], "long": [0, 22], "summar": [0, 6, 21, 24, 26], "truncat": [0, 26], "manag": [0, 13, 15, 16, 17, 18, 19, 21, 22, 27, 31, 33], "file": [0, 2, 3, 5, 6, 7, 13, 17, 18, 19, 21, 24, 25], "system": [0, 1, 7, 11, 19, 21, 25, 27], "save": [0, 19, 26], "code": [0, 6, 13, 16, 19, 20, 21, 22, 24, 25, 27, 28, 29, 34], "log": [0, 13, 15, 19, 21, 25, 33, 34], "The": [0, 1, 2, 3, 4, 7, 8, 9, 10, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 32, 33], "unit": [0, 2, 13, 18, 27], "messagebas": [0, 31], "name": [0, 3, 5, 7, 10, 13, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 30], "str": [0, 1, 2, 3, 5, 7, 8, 10, 11, 12, 13, 21, 24, 25], "ani": [0, 1, 3, 4, 6, 8, 9, 10, 13, 21, 22, 23, 24, 25, 26, 28, 29, 30], "url": [0, 3, 13, 18, 21, 25], "sequenc": [0, 1, 2, 3, 4, 9, 21, 22, 25], "timestamp": [0, 20, 25], "kwarg": [0, 1, 3, 10, 12, 21, 24, 25], "dict": [0, 1, 2, 3, 4, 6, 8, 9, 10, 12, 13, 17, 18, 21, 22, 23, 24, 25, 26], "which": [0, 1, 2, 4, 9, 13, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28], "maintain": [0, 21, 25], "inform": [0, 1, 11, 12, 17, 19, 21, 22, 24, 25, 27, 29], "dialog": [0, 1, 17, 18, 22, 26], "memori": [0, 1, 7, 9, 15, 17, 19, 21, 26, 31, 33], "construct": [0, 19, 21, 22, 24, 26], "serial": [0, 5, 8, 24, 25], "return": [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], "to_str": [0, 25], "string": [0, 1, 2, 7, 12, 13, 20, 23, 24, 25], "represent": [0, 25], "msg": [0, 13, 17, 18, 19, 20, 21, 22, 28], "echo": 0, "bool": [0, 1, 2, 3, 4, 7, 8, 9, 10, 13, 21, 25], "fals": [0, 1, 2, 3, 4, 5, 7, 8, 10, 13, 19, 22, 25, 28], "placeholdermessag": 0, "host": [0, 1, 5, 7, 10, 19, 28, 31], "port": [0, 1, 5, 10, 23, 28], "int": [0, 1, 2, 3, 4, 5, 7, 9, 10, 11, 12, 13, 25], "task_id": 0, "A": [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 12, 13, 18, 19, 24, 25, 28, 30], "placehold": [0, 4, 22], "rpcagent": [0, 1, 5], "local_attr": 0, "_client": 0, "_host": 0, "_is_placehold": 0, "_port": 0, "_task_id": 0, "placeholder_attr": 0, "update_valu": 0, "get": [0, 1, 2, 13, 17, 21, 24, 30], "attribut": [0, 2, 21, 25], "from": [0, 1, 2, 3, 7, 8, 9, 10, 13, 17, 18, 19, 22, 23, 24, 25, 27, 28, 30, 31], "rpc": [0, 1, 15, 17, 28], "agent": [0, 3, 4, 5, 11, 15, 16, 17, 20, 23, 25, 27, 29, 31, 33, 34], "server": [0, 1, 5, 10, 28], "immedi": [0, 15, 19, 20, 21, 28, 33], "tht": 0, "thought": [0, 1, 19, 25], "record": [0, 1, 20, 21], "help": [0, 11, 18, 19, 20, 21, 26, 28, 30], "them": [0, 4, 19, 20, 21, 24, 27, 28, 30], "make": [0, 21, 24, 27, 31], "decis": 0, "gener": [0, 1, 7, 13, 17, 18, 20, 21, 23, 24, 25, 26, 28], "shouldn": 0, "t": [0, 1, 2, 19, 20], "pass": [0, 1, 2, 12, 17, 18, 19, 22, 24], "seen": 0, "other": [0, 1, 7, 10, 17, 18, 21, 22, 24, 25, 28, 29, 30, 34], "In": [0, 2, 17, 18, 19, 21, 22, 24, 27, 28, 30, 31], "our": [0, 17, 19, 23, 29, 30], "framework": [0, 23], "we": [0, 1, 9, 10, 16, 17, 18, 19, 20, 21, 22, 23, 29, 30], "formul": [0, 12], "follow": [0, 1, 3, 4, 11, 13, 16, 18, 19, 20, 23, 27, 28], "For": [0, 1, 3, 13, 16, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 32], "openai": [0, 3, 7, 13, 18, 19, 26, 27, 31], "api": [0, 3, 11, 12, 13, 17, 18, 21, 24, 25, 31, 33], "call": [0, 1, 5, 13, 18, 19, 20, 21, 22, 24, 27, 28], "role": [0, 1, 11, 18, 21, 26], "assist": [0, 18, 21, 26, 29], "should": [0, 1, 3, 19, 23, 25, 26], "open": [0, 11, 13, 18, 19, 23, 30], "accept": [0, 25], "input": [0, 1, 2, 3, 4, 5, 17, 18, 19, 21, 22, 24, 26, 28], "self": [0, 19, 21, 22, 24, 25, 31], "admit": 0, "mayb": 0, "better": [0, 2, 20, 30], "wai": [0, 20, 25, 27], "user": [0, 1, 9, 10, 11, 15, 16, 18, 19, 20, 21, 22, 23, 24, 26, 29, 33], "ar": [0, 1, 2, 3, 4, 7, 11, 12, 13, 17, 18, 19, 20, 22, 24, 25, 26, 27, 28, 29, 30], "encourag": 0, "creat": [0, 8, 13, 19, 21, 24, 25, 26, 34], "own": [0, 15, 19, 23, 31, 33], "method": [0, 1, 18, 21, 23, 25, 26, 27, 28], "inherit": [0, 1, 19, 22, 28], "rewrit": 0, "__init__": [0, 21, 24, 25], "function": [0, 1, 2, 5, 7, 9, 10, 11, 12, 13, 15, 17, 18, 19, 20, 21, 22, 25, 27, 31, 33], "mythought": 0, "def": [0, 19, 21, 22, 24, 25], "implement": [0, 1, 4, 7, 13, 17, 21, 22, 23, 25, 27, 28], "your": [0, 1, 3, 15, 16, 18, 23, 24, 27, 29, 31, 33, 34], "deseri": 0, "": [0, 1, 3, 7, 12, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], "multipl": [0, 2, 4, 13, 17, 19, 22, 27, 30], "instanc": [0, 1, 13, 19, 20, 22, 23, 25, 26, 28], "design": [0, 1, 2, 15, 17, 19, 20, 21, 22, 24, 25, 28, 33], "share": [0, 22, 23, 29], "among": [0, 4, 17, 19, 22, 28], "group": [0, 19, 22, 29], "msghubmanag": [0, 22], "particip": [0, 4, 19], "agentbas": [0, 1, 19, 22, 24, 28, 31], "announc": [0, 19, 22], "object": [0, 1, 2, 3, 5, 10, 13, 17, 19, 21, 22, 24, 26], "add": [0, 2, 13, 19, 20, 21, 22, 24, 25, 27, 30], "new_particip": [0, 22], "new": [0, 2, 8, 13, 16, 22, 24, 25, 27, 28, 29, 32], "thi": [0, 1, 3, 7, 9, 12, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30], "hub": [0, 18, 19, 23, 31], "broadcast": [0, 19], "list": [0, 1, 2, 3, 9, 12, 13, 17, 18, 19, 21, 22, 23, 24, 25, 27], "all": [0, 1, 2, 4, 8, 11, 13, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28], "paramet": [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 19, 23, 24, 25, 26, 28], "union": [0, 1, 2, 3, 7, 21, 22, 25], "One": 0, "delet": [0, 2, 8, 19, 24, 25], "option": [0, 1, 2, 4, 5, 7, 9, 12, 13, 16, 18, 19, 21, 22, 24, 25, 26, 27], "default": [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 21, 24, 25, 27, 28], "veri": 0, "begin": [0, 11, 19, 27], "without": [0, 1, 19, 21, 22, 28, 31], "requir": [0, 1, 4, 12, 13, 15, 16, 18, 21, 22, 23, 24, 25, 27, 28, 33], "exampl": [0, 1, 3, 11, 15, 17, 22, 23, 27, 28, 30, 33, 34], "three": [0, 15, 33], "each": [0, 3, 12, 17, 18, 21, 22, 23, 24, 25, 27, 28, 30], "output": [0, 1, 4, 7, 19, 20, 21, 22, 24], "agent1": [0, 19, 22], "agent2": [0, 19, 22], "agent3": [0, 19, 22], "what": [0, 18, 26], "mean": [0, 1, 2, 18, 28], "actual": [0, 1, 4, 18], "ha": [0, 1, 7, 9, 18, 19, 20, 21, 28, 30], "same": [0, 13, 26, 27, 28], "effect": [0, 13], "much": [0, 22, 30], "more": [0, 11, 18, 19, 20, 21, 24, 25], "easi": [0, 15, 23, 31, 33], "eleg": 0, "x1": 0, "observ": [0, 1, 19, 20, 21, 22], "x2": 0, "engin": [0, 12, 15, 17, 21, 23, 24, 31, 33], "promptengin": [0, 31], "modelwrapperbas": [0, 3, 9, 11, 26], "shrink_polici": 0, "max_length": [0, 3, 23], "prompt_typ": 0, "prompttyp": [0, 25], "max_summary_length": 0, "200": 0, "summarize_model": 0, "both": [0, 2, 7, 23, 24, 26, 27, 28, 30], "join": [0, 15, 19, 21, 24, 32, 33], "arg": [0, 1, 19, 22, 24], "format_map": [0, 19, 26], "compon": [0, 15, 17, 19, 24, 33], "accord": [0, 30], "its": [0, 1, 2, 3, 8, 10, 13, 18, 19, 21, 24, 27, 28, 30, 31], "type": [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 18, 21, 22, 23, 24, 25], "can": [0, 1, 2, 3, 7, 12, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], "number": [0, 1, 2, 4, 9, 10, 11, 12, 13, 19, 20, 22, 25, 26, 27], "argument": [0, 12, 18, 23], "If": [0, 1, 2, 7, 9, 11, 12, 13, 16, 18, 19, 21, 25, 26, 27, 29, 30], "n": [0, 4, 11, 16, 19, 21, 24], "convert": [0, 1, 3, 13, 26], "join_to_list": 0, "join_to_str": 0, "common": [1, 6], "pipelinebas": [1, 4, 22], "abc": [1, 2, 13, 25], "abstract": [1, 2, 12, 13, 21, 25], "defin": [1, 5, 9, 18, 21, 22, 25, 27], "protocol": 1, "callabl": [1, 2, 4, 9, 25], "behavior": [1, 17, 19, 21, 24, 25, 26], "subclass": [1, 17, 21, 22, 26, 31], "an": [1, 3, 7, 8, 12, 13, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 33], "overridden": 1, "__call__": [1, 21, 22], "specifi": [1, 2, 3, 7, 8, 12, 13, 19, 21, 22, 23, 24, 25, 26, 27], "execut": [1, 4, 6, 7, 10, 13, 17, 18, 19, 22, 24, 28], "logic": [1, 4, 21, 22, 24], "tupl": [1, 8], "repli": [1, 19, 21, 23, 24, 28], "clear_audi": 1, "remov": [1, 7, 13, 22, 25], "audienc": [1, 22], "export_config": 1, "configur": [1, 2, 3, 17, 18, 19, 21, 23], "current": [1, 4, 7, 8, 12, 13, 24, 25, 27], "load_from_config": 1, "config": [1, 2, 17, 23, 34], "load": [1, 2, 3, 18, 19, 21, 23, 24, 25], "load_memori": 1, "x": [1, 4, 5, 18, 19, 21, 22, 24, 28], "store": [1, 2, 17, 21, 25], "messag": [1, 8, 9, 10, 11, 13, 15, 17, 18, 19, 21, 23, 24, 26, 27, 28, 30, 31, 33], "action": [1, 17, 19, 22, 24], "taken": [1, 19, 22], "histori": [1, 17, 19, 22, 26], "environ": [1, 7, 18, 19, 22, 34], "given": [1, 13, 21, 22, 24], "adversari": 1, "doesn": [1, 2], "includ": [1, 4, 8, 12, 13, 17, 18, 19, 21, 24, 25, 30], "reset_audi": 1, "set": [1, 2, 7, 12, 13, 16, 18, 22, 25, 27, 28], "notifi": 1, "rm_audienc": 1, "speak": [1, 19, 21], "content": [1, 6, 8, 11, 12, 13, 15, 17, 18, 19, 20, 21, 24, 25, 26, 28], "out": [1, 4, 18, 19, 20, 30], "to_dist": [1, 28], "localhost": [1, 10, 28], "max_pool_s": 1, "100": [1, 10], "max_timeout_second": 1, "1800": 1, "launch_serv": [1, 28], "true": [1, 2, 4, 9, 18, 19, 21, 22, 25, 28], "local_mod": [1, 28], "lazy_launch": [1, 28], "distribut": [1, 15, 16, 17, 19, 31, 33], "version": [1, 4, 11, 28, 30], "hostnam": [1, 10, 28], "max": [1, 13], "task": [1, 17, 21, 24, 28], "result": [1, 6, 10, 12, 17, 19, 21, 24, 26], "accommod": 1, "timeout": [1, 3, 5, 7], "whether": [1, 2, 3, 4, 7, 8, 9, 10, 11, 13, 19, 24, 25, 27, 28, 30], "start": [1, 17, 20, 21, 27, 28, 30], "onli": [1, 7, 10, 12, 13, 19, 27, 28], "listen": 1, "local": [1, 13, 17, 18, 19, 23, 28, 30], "request": [1, 5, 12, 13, 20, 23, 24, 29], "launch": [1, 17, 28], "wrap": [1, 6, 24], "wrapper": [1, 3, 23], "extend": [1, 22, 25], "grpc": [1, 28], "client": [1, 5], "stop": 1, "rpcagentserverlaunch": [1, 28], "agent_class": [1, 28], "agent_arg": 1, "agent_kwarg": [1, 28], "launcher": 1, "shutdown": 1, "wait_until_termin": [1, 28], "wait": [1, 28, 30], "process": [1, 6, 7, 17, 19, 20, 21, 22, 23, 24, 25, 26, 30], "rpcserversidewrapp": 1, "agent_inst": 1, "rpcagentservic": [1, 5], "servic": [1, 5, 7, 8, 9, 10, 11, 12, 15, 17, 18, 19, 21, 23, 31, 33], "call_func": [1, 5], "rpcmsg": 1, "_": [1, 4, 19], "servicercontext": 1, "specif": [1, 2, 5, 7, 12, 13, 16, 17, 18, 20, 21, 23, 24, 25, 26, 27], "get_task_id": 1, "auto": 1, "increment": [1, 27], "id": [1, 3, 18, 25], "process_task": 1, "thread": 1, "check_port": 1, "check": [1, 7, 13, 19, 21, 24, 27, 30], "avail": [1, 7, 18, 21, 22, 29], "being": [1, 5, 7, 19, 24, 27], "found": [1, 19], "occupi": 1, "automat": [1, 19, 27, 28], "find_available_port": 1, "unoccupi": 1, "socket": 1, "rpc_servicer_method": 1, "func": 1, "decor": 1, "identifi": [1, 12, 18, 19, 20, 25], "run": [1, 7, 16, 17, 18, 23], "setup_rcp_agent_serv": 1, "init_set": 1, "start_ev": 1, "event": [1, 19], "stop_ev": 1, "pipe": [1, 19, 22], "max_work": 1, "4": [1, 18, 23, 27], "setup": [1, 13, 17, 20, 22, 23], "initi": [1, 13, 17, 18, 21, 22, 23, 24, 27, 28], "monitor": [1, 15, 31, 33], "init": [1, 18, 19, 20, 23, 27], "eventclass": 1, "determin": [1, 4, 7, 13, 19, 25], "child": 1, "been": [1, 30], "worker": 1, "userag": [1, 18], "required_kei": [1, 21], "provid": [1, 2, 7, 9, 11, 13, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30], "potenti": [1, 7, 19, 20, 28], "addit": [1, 7, 11, 12, 13, 16, 17, 19, 21, 23, 24, 30], "detail": [1, 11, 12, 18, 19, 20, 21, 24, 25, 27, 30], "prompt": [1, 11, 13, 15, 17, 19, 21, 24, 31, 33], "kei": [1, 11, 12, 18, 21, 25, 27], "encapsul": [1, 3, 17, 21, 22, 24, 25], "ad": [1, 2, 21, 24, 30], "dictionari": [1, 3, 4, 10, 12, 13, 18], "contain": [1, 3, 4, 7, 8, 10, 11, 12, 13, 24], "data": [1, 2, 3, 5, 8, 9, 10, 13, 17, 21, 22, 25], "repres": [1, 4, 20, 22, 25, 28], "also": [1, 18, 19, 20, 22, 23, 25, 28, 29], "dialogag": [1, 18], "simpl": [1, 15, 19, 20, 28, 33, 34], "perform": [1, 12, 15, 17, 19, 21, 22, 24, 30, 33], "dialogu": [1, 20, 21, 22, 26], "sys_prompt": [1, 19, 21], "invok": [1, 17, 21, 22, 24], "languag": [1, 12, 21, 22, 26], "produc": [1, 21], "parse_func": [1, 21], "fault_handl": [1, 21], "pars": [1, 8, 13, 24], "dictdialogag": [1, 19], "where": [1, 8, 13, 18, 19, 21, 22, 23, 24, 25, 28], "field": [1, 3, 17, 18], "via": [1, 19, 20], "e": [1, 3, 7, 10, 16, 17, 18, 19, 23, 26, 27, 28, 30], "g": [1, 3, 7, 10, 17, 19, 23, 26, 27], "python": [1, 7, 15, 16, 17, 18, 19, 20, 23, 24, 33], "summari": [1, 11, 19], "sai": [1, 19], "handl": [1, 12, 13, 19, 22, 24, 25, 26], "fault": [1, 15, 33], "fail": [1, 12, 13, 24], "take": [1, 2, 9, 13, 17, 19, 21, 23], "print": [1, 18, 27], "usag": [1, 17, 18, 19, 21, 23, 25, 28, 31], "pleas": [1, 18, 19, 22, 23, 24, 25, 26, 27, 28, 30], "refer": [1, 17, 18, 19, 23, 24, 25], "werewolf": 1, "It": [1, 7, 12, 15, 17, 19, 21, 22, 23, 25, 26, 27, 33], "least": 1, "textual": 1, "mai": [1, 19, 21, 22, 27, 30], "agreement": [1, 17, 19], "rais": [1, 12, 13, 21, 24, 25, 30], "decod": 1, "jsondecodeerror": 1, "valid": 1, "treat": 1, "plain": 1, "text": [1, 3, 6, 18, 23, 24, 25], "imag": [1, 3, 7, 18, 21, 23], "texttoimageag": 1, "todo": 2, "piec": [2, 25, 28], "structur": [2, 18, 22, 25, 26, 34], "organ": [2, 3, 18, 19, 20, 23, 25, 30], "memorybas": [2, 31], "fragment": 2, "depend": [2, 16], "how": [2, 17, 18, 19, 20, 21, 22, 24, 27, 29, 30], "clear": [2, 3, 13, 22, 25, 27, 30], "clean": 2, "index": [2, 15, 25], "iter": [2, 22, 25], "match": [2, 10, 19, 24], "export": [2, 25], "to_mem": [2, 25], "file_path": [2, 8, 13, 24, 25], "get_memori": [2, 21, 25], "recent_n": [2, 25], "filter_func": [2, 25], "certain": [2, 13, 23, 27], "rang": [2, 4, 19, 22, 24], "filter": [2, 13, 25, 27], "overwrit": [2, 8, 25], "size": [2, 23, 25], "segment": 2, "update_config": 2, "convers": [2, 19, 20, 21, 34], "temporarymemori": 2, "embedding_model": [2, 9], "write": [2, 8, 13, 24, 30], "hard": 2, "disk": 2, "emb": [2, 9], "get_embed": [2, 25], "embed": [2, 3, 9, 18, 23, 25], "have": [2, 16, 17, 19, 21, 25, 27, 28, 29, 30], "otherwis": [2, 11], "vector": 2, "retriev": [2, 6, 24, 25], "last": [2, 18, 19], "boolean": [2, 8, 13, 24], "retrieve_by_embed": [2, 25], "queri": [2, 6, 9, 12, 13, 24, 25], "metric": [2, 13, 25], "float": [2, 3, 7, 9, 13], "top_k": [2, 9], "preserve_ord": [2, 9], "comput": [2, 9, 21], "relev": [2, 25, 29, 30], "between": [2, 3, 9, 17, 18, 19, 20, 22, 25], "higher": [2, 16], "you": [2, 3, 7, 11, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30], "revers": 2, "order": [2, 9, 17, 19, 22, 28], "preserv": [2, 9], "origin": [2, 9, 25, 27, 28], "modelconfig": 3, "config_nam": [3, 18, 19, 23], "model_typ": [3, 18, 19, 23], "classmethod": [3, 13], "format_config": 3, "covert": 3, "one": [3, 9, 13, 18, 19, 21, 22, 24, 28], "post_api": [3, 18, 23], "after": [3, 11, 18, 19, 28], "differ": [3, 9, 10, 15, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 31, 33], "model_nam": [3, 13, 18, 19, 23, 27], "model_name_for_openai": 3, "gpt": [3, 18, 19, 21, 23, 27], "3": [3, 16, 18, 21, 23], "5": [3, 18, 21, 23], "turbo": [3, 18, 19, 27], "api_kei": [3, 12, 18, 19, 23], "your_api_kei": 3, "your_organ": 3, "need": [3, 11, 16, 17, 18, 19, 21, 27, 28], "client_arg": [3, 23], "generate_arg": [3, 19, 23], "post": [3, 18, 19, 23], "toke": 3, "huggingfac": [3, 18, 23, 26], "infer": [3, 18, 31], "api_url": [3, 23], "header": [3, 13, 23], "author": [3, 23], "bearer": [3, 23], "api_token": 3, "max_length_of_model": 3, "max_retri": 3, "temperatur": [3, 19, 23], "modelrespons": 3, "image_url": 3, "raw": 3, "main": [3, 19, 21, 22, 24, 28, 30], "purpos": [3, 19, 21], "align": [3, 24, 26], "act": [3, 4, 19, 21, 22], "bridg": 3, "properti": 3, "registri": 3, "openaichatwrapp": 3, "openaidallewrapp": 3, "openaiembeddingwrapp": 3, "openaiwrapp": [3, 26], "postapichatwrapp": 3, "postapidallewrapp": 3, "postapimodelwrapperbas": 3, "type_registri": 3, "openai_dall_": [3, 18, 23], "openai_embed": [3, 18, 23], "post_api_chat": 3, "post_api_dal": 3, "budget": [3, 13], "chat": [3, 13, 17, 18, 19, 22, 23, 26, 29], "dall": [3, 18, 23], "2048": 3, "30": 3, "json_arg": [3, 23], "post_arg": 3, "messages_kei": 3, "retry_interv": 3, "compatilbl": 3, "vllm": [3, 18, 19], "fastchat": [3, 18, 19], "compat": [3, 23, 26], "deploi": [3, 18, 28], "import": [3, 7, 13, 18, 19, 20, 21, 22, 23, 24, 27, 28], "clear_model_config": 3, "load_model_by_config_nam": 3, "read_model_config": 3, "clear_exist": 3, "read": [3, 8, 18, 19, 24], "path": [3, 8, 13, 18, 24], "befor": [3, 16, 19, 25, 27, 28], "forlooppipelin": [4, 17], "loop_body_oper": 4, "oper": [4, 7, 8, 10, 13, 19, 21, 22, 24, 25], "max_loop": 4, "break_func": 4, "lambda": [4, 21], "templat": [4, 21, 23], "control": [4, 15, 19, 22, 28, 33], "flow": [4, 18, 19, 20, 22, 25, 28], "like": [4, 17, 18, 19, 22, 24, 25, 26], "loop": [4, 18, 19], "workflow": [4, 28], "break": [4, 18, 19, 22], "ifelsepipelin": 4, "condition_func": 4, "if_body_oper": 4, "else_body_oper": 4, "els": [4, 19, 22, 24], "interfac": [4, 13, 17, 18, 20, 21, 22, 24, 26, 27], "special": [4, 9, 19, 20, 21, 25], "kind": 4, "interact": [4, 7, 15, 17, 18, 19, 20, 21, 24, 25, 26, 28, 31, 33], "sequentialpipelin": [4, 17, 18, 19], "sequenti": [4, 18, 28], "switchpipelin": 4, "case_oper": [4, 22], "map": [4, 22], "default_oper": 4, "switch": [4, 22], "case": [4, 19, 21, 28], "k1": 4, "k2": 4, "whilelooppipelin": 4, "while": [4, 18, 19, 20, 22, 28], "condition_oper": 4, "counterpart": 4, "bodi": 4, "maximum": [4, 7, 9, 10, 12, 26, 27], "exeuct": 4, "doe": [4, 13, 25], "noth": 4, "just": [4, 22, 27], "do": [4, 16, 19, 20, 22, 23, 24, 28], "branch": [4, 22], "correspond": [4, 5, 10, 17, 18, 19], "trigger": [4, 13], "condit": [4, 19, 22], "meet": [4, 21], "continu": [4, 17, 18, 19, 21, 22, 27], "__": 4, "rpcagentcli": 5, "func_nam": 5, "seral": 5, "protobuf": 5, "static": 5, "target": [5, 19, 26], "channel_credenti": 5, "call_credenti": 5, "insecur": 5, "compress": 5, "wait_for_readi": 5, "metadata": [5, 25], "context": [5, 13, 21, 22, 25, 30], "miss": [5, 21], "associ": [5, 19, 25, 27], "document": [5, 10, 17, 23, 30], "comment": 5, "proto": 5, "rpcagentstub": 5, "channel": 5, "stub": 5, "add_rpcagentservicer_to_serv": 5, "exec_python": 6, "execute_python_cod": [6, 7, 24], "sys_python_guard": [6, 7], "create_directori": [6, 8, 24], "create_fil": [6, 8, 24], "delete_directori": [6, 8, 24], "delete_fil": [6, 8, 24], "move_directori": [6, 8, 24], "move_fil": [6, 8, 24], "read_json_fil": [6, 8, 24], "write_json_fil": [6, 8, 24], "read_text_fil": [6, 8, 24], "write_text_fil": [6, 8, 24], "retrieval_from_list": 6, "retrieve_from_list": [6, 9, 24], "similar": [6, 19, 22, 23, 25], "cos_sim": [6, 9], "sql": [6, 13, 24], "mongodb": [6, 24], "query_mongodb": [6, 10, 24], "mysql": [6, 24], "query_mysql": [6, 10, 24], "sqlite": [6, 13, 24], "query_sqlit": [6, 10, 24], "web": [6, 15, 17, 20, 23, 24, 25], "search": [6, 10, 15, 17, 24], "web_search": [6, 12, 24], "statu": [6, 12, 17, 24], "serviceexecstatu": [6, 11, 24], "error": [6, 7, 8, 10, 11, 12, 13, 20, 24, 30], "success": [6, 8, 11, 12, 13, 20, 24], "servicerespons": [6, 7, 8, 9, 10, 11, 12, 13, 31], "300": 7, "use_dock": 7, "maximum_memory_byt": 7, "insid": [7, 24], "docker": [7, 24], "within": [7, 12, 18, 19, 21, 22, 23, 24, 25], "layer": 7, "secur": 7, "especi": [7, 26, 27], "untrust": 7, "warn": [7, 13, 20], "directli": [7, 16, 25, 27], "pose": 7, "risk": 7, "disabl": 7, "confid": 7, "safeti": 7, "empti": [7, 13, 23, 24], "time": [7, 13, 18, 19, 28, 29, 30], "second": [7, 13], "allow": [7, 10, 19, 21, 22, 23, 24, 25, 26, 27, 29], "exce": [7, 11, 13, 26, 27], "limit": [7, 11, 13, 27], "termin": [7, 18, 19], "nativ": 7, "present": [7, 19], "byte": 7, "impos": 7, "two": [7, 9, 18, 19, 22, 23, 26, 28], "element": [7, 9], "captur": [7, 20], "standard": [7, 18, 19, 20, 25, 31], "respect": [7, 23], "ipython": 7, "plt": 7, "show": [7, 17, 28, 29], "displai": 7, "matplotlib": 7, "plot": 7, "support": [7, 10, 12, 13, 15, 18, 19, 22, 24, 26, 27, 28, 29, 33], "stem": 7, "non": 7, "natur": [7, 19], "variou": [7, 15, 18, 21, 23, 24, 26, 27, 33], "destruct": 7, "prevent": [7, 22, 27], "interf": 7, "test": [7, 17, 24], "fork": 7, "bomb": 7, "kill": [7, 19], "filesystem": 7, "etc": 7, "modifi": [7, 21, 24], "http": [7, 13, 16, 20, 23, 30], "github": [7, 13, 16, 30, 32], "com": [7, 13, 16, 23, 30], "human": [7, 13, 17], "eval": [7, 13, 23], "blob": [7, 13], "master": [7, 13], "human_ev": [7, 13], "py": [7, 13, 17, 19, 23], "directori": [8, 13, 18, 19, 24], "directory_path": 8, "indic": [8, 13, 19, 20, 21, 24, 25], "source_path": 8, "destination_path": 8, "move": [8, 24], "destin": 8, "typic": [8, 11, 21, 24, 25], "written": [8, 13], "alreadi": [8, 16, 27, 30], "exist": [8, 13, 21, 22, 25, 27], "txt": 8, "work": [9, 13, 19, 25, 26, 30], "knowledg": [9, 17], "score_func": 9, "score": 9, "expect": [9, 20, 24, 26], "top": [9, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], "k": [9, 25], "highest": 9, "compar": [9, 22, 30], "b": [9, 28, 30], "cosin": 9, "sql_queri": [10, 13], "databas": [10, 17, 24], "collect": [10, 17, 21, 24], "maxcount_result": 10, "note": [10, 16, 18, 19, 21, 22, 27], "ip": [10, 28], "address": [10, 21, 28, 30], "avoid": [10, 27, 28], "mani": 10, "littl": [10, 23], "now": [10, 19, 22, 23, 30], "find": [10, 18, 26, 30], "leav": 10, "futur": [10, 17, 20], "password": 10, "allow_change_data": 10, "usernam": [10, 30], "account": 10, "3306": 10, "chang": [10, 13, 27], "accident": 10, "text_process": 11, "system_prompt": [11, 26], "nyou": [11, 19], "keep": [11, 20, 29, 30], "summarization_prompt": 11, "ntext": 11, "max_return_token": 11, "token_limit_prompt": 11, "nsummar": 11, "less": 11, "than": [11, 18, 19, 20], "token": [11, 13, 23, 27], "notic": [11, 19], "curent": 11, "built": [11, 17, 18, 19, 20, 21], "ai": [11, 21], "_default_system_prompt": 11, "instruct": [11, 17, 18, 21, 24, 26], "see": [11, 19, 20, 30], "_default_summarization_prompt": 11, "_default_token_limit_prompt": 11, "successfulli": [11, 20], "satisfi": 11, "well": [11, 19], "With": [11, 19, 30], "str_text": 11, "summarizeth": 11, "question": [12, 29], "cse_id": 12, "num_result": 12, "10": [12, 27], "googl": [12, 24], "bing": [12, 24], "custom": [12, 15, 17, 18, 19, 20, 23, 25, 31, 33], "correct": 12, "uniform": 12, "authent": 12, "chosen": [12, 19], "uniqu": [12, 13, 18, 21, 25, 27], "keyword": 12, "These": [12, 19, 22, 24, 25], "region": 12, "safe": 12, "titl": [12, 30], "link": [12, 25], "snippet": [12, 19, 30], "valueerror": 12, "unsupport": 12, "chdir": 13, "contextmanag": 13, "borrow": 13, "create_tempdir": 13, "temporari": 13, "if_change_databas": 13, "select": [13, 22, 23, 25], "requests_get": 13, "param": [13, 24], "send": 13, "except": [13, 24, 27], "sent": [13, 19, 25, 28], "timer": 13, "block": [13, 19, 22, 24], "write_fil": 13, "attempt": [13, 19], "mode": [13, 16, 21], "overwritten": 13, "permissionerror": 13, "occur": [13, 21], "lack": 13, "necessari": [13, 22, 24, 25], "permiss": 13, "ioerror": 13, "signal": 13, "issu": [13, 20, 29, 30], "invalid": 13, "hardwar": 13, "relat": [13, 27, 29], "o": 13, "catch": 13, "along": 13, "setup_logg": 13, "path_log": 13, "level": [13, 15, 20, 33], "liter": [13, 20], "trace": [13, 20], "debug": [13, 19, 20], "info": [13, 20], "critic": [13, 20, 25], "loguru": [13, 20], "logger": 13, "redirect": [13, 20], "stderr": [13, 20], "monitorbas": [13, 27], "metric_nam": 13, "increas": 13, "get_metr": [13, 27], "metric_valu": 13, "metric_unit": [13, 27], "quota": 13, "filter_regex": 13, "regular": 13, "express": 13, "metric_name_a": 13, "metric_name_b": 13, "get_quota": [13, 27], "get_unit": [13, 27], "get_valu": [13, 27], "regist": [13, 18], "must": [13, 19, 21], "alert": 13, "accumul": 13, "abov": [13, 18, 19, 27], "register_budget": [13, 27], "prefix": 13, "quotaexceedederror": [13, 27], "exceed": [13, 27], "distinguish": [13, 24, 25], "registr": [13, 27], "first": [13, 15, 16, 30, 33, 34], "set_quota": [13, 27], "updat": [13, 17, 19, 21, 25, 29], "onc": [13, 18, 23, 27, 30], "monitorfactori": [13, 27], "factori": 13, "singleton": 13, "get_monitor": [13, 27], "impl_typ": 13, "db_path": 13, "db": 13, "sqlitemonitor": [13, 27], "table_nam": 13, "monitor_metr": 13, "drop_exist": 13, "get_full_nam": [13, 27], "full": 13, "sqlite_cursor": 13, "cursor": 13, "yield": 13, "sqlite_transact": 13, "transact": 13, "count_openai_token": 13, "count": [13, 27], "get_openai_max_length": 13, "length": [13, 26], "num_tokens_from_cont": 13, "extract_json_str": 13, "json_str": 13, "extract": [13, 24], "try": [13, 19, 21, 24, 27], "fix": [13, 29, 30], "manual": [13, 22], "to_dialog_str": 13, "item": [13, 24], "style": [13, 26], "to_openai_dict": 13, "innov": [15, 33], "multi": [15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 27, 29, 33], "platform": [15, 16, 17, 18, 23, 29, 33], "empow": [15, 33], "develop": [15, 16, 20, 21, 24, 27, 28, 29, 30, 33], "build": [15, 18, 19, 21, 23, 33], "applic": [15, 16, 17, 18, 20, 21, 22, 23, 27, 29, 31, 33, 34], "eas": [15, 22, 33], "reliabl": [15, 17, 33], "high": [15, 23, 33], "featur": [15, 17, 20, 27, 29, 31, 32, 33], "capabl": [15, 17, 19, 31, 33], "program": [15, 19, 22, 24, 25, 28, 33], "pure": [15, 33], "prebuilt": [15, 33], "suitabl": [15, 21, 25, 26, 33], "robust": [15, 33], "toler": [15, 33], "retri": [15, 24, 33], "mechan": [15, 22, 33], "enhanc": [15, 20, 31, 33], "stabil": [15, 33], "actor": [15, 33], "enabl": [15, 21, 22, 23, 25, 27, 33], "central": [15, 16, 33], "manner": [15, 33], "streamlin": [15, 17, 22, 33], "instal": [15, 17, 19, 30, 33, 34], "guid": [15, 19, 20, 21, 23, 24, 26, 33], "fundament": [15, 21, 33, 34], "concept": [15, 19, 22, 28, 33, 34], "craft": [15, 21, 24, 26, 33, 34], "webui": [15, 17, 23, 33, 34], "dive": [15, 18, 19, 31, 33], "deeper": [15, 18, 19, 31, 33], "pipelin": [15, 17, 18, 31, 33], "deploy": [15, 17, 31, 33], "commun": [15, 17, 18, 19, 22, 30, 32, 33], "contribut": [15, 29, 32, 33], "packag": [15, 16, 28], "util": [15, 17, 18, 19, 20, 24, 27], "ui": 15, "modul": [15, 17, 20], "page": [15, 25], "To": [16, 18, 19, 20, 21, 22, 23, 24, 27, 30], "9": 16, "recommend": [16, 20, 23], "up": [16, 18, 27, 29], "re": [16, 19, 23, 24, 26, 30], "tool": [16, 17, 24], "command": [16, 23], "activ": 16, "altern": 16, "prefer": [16, 22, 26], "shown": [16, 19, 28], "python3": 16, "bin": 16, "On": 16, "window": 16, "script": [16, 17, 18], "pypi": 16, "so": 16, "easili": [16, 19, 22], "mac": 16, "who": [16, 19], "step": [16, 18, 21, 22, 23, 24, 28, 30, 34], "clone": 16, "repositori": [16, 29], "edit": 16, "under": [16, 20, 27], "pull": [16, 29], "git": [16, 30], "modelscop": [16, 18], "cd": [16, 19, 30], "rememb": [16, 17, 19, 23, 25, 30], "tutori": [17, 18, 19, 20, 21, 26, 27, 28], "ll": [17, 19, 20, 27], "understand": [17, 18, 20, 22, 31], "focu": 17, "familiar": 17, "let": [17, 19], "autonom": [17, 19], "entiti": 17, "achiev": [17, 19], "probabl": 17, "power": [17, 19], "llm": [17, 23, 24, 26], "simul": 17, "discuss": [17, 19, 29, 30], "debat": 17, "cooper": 17, "finish": 17, "complic": 17, "runnabl": 17, "carrier": 17, "convei": 17, "modal": [17, 23, 25], "inter": 17, "identif": 17, "payload": 17, "deliveri": 17, "interpret": [17, 24], "independ": 17, "state": [17, 20, 21], "reusabl": 17, "across": [17, 22, 23, 24], "scenario": [17, 22, 24, 25, 26], "pattern": [17, 22], "collabor": [17, 22, 29], "predecessor": 17, "successor": 17, "intermedi": 17, "src": 17, "core": [17, 19, 21, 22, 23], "pertain": 17, "integr": [17, 18, 23, 34], "divers": [17, 21, 30], "offer": [17, 18, 24, 26], "auxiliari": 17, "helper": [17, 19, 22], "definit": [17, 25], "pre": [17, 18, 21, 30], "doc": [17, 23], "unittest": 17, "licens": 17, "offici": [17, 23, 30], "versatil": [18, 24], "quickli": 18, "learn": [18, 19, 27], "basic": [18, 19], "composit": 18, "avali": 18, "varieti": [18, 19], "train": 18, "here": [18, 19, 20, 21, 22, 23, 24, 25, 27, 29, 30], "tabl": [18, 21, 22, 23, 24], "outlin": [18, 19, 22, 23, 24], "would": [18, 19], "fill": 18, "yaml": 18, "model_config": [18, 19, 23], "choos": [18, 19, 24], "ada": 18, "002": 18, "xxx": [18, 19, 23], "unset": 18, "variabl": [18, 19, 26], "openai_api_kei": 18, "openai_organ": 18, "defer": [18, 21], "initil": 18, "besid": [18, 19, 21, 25], "mutlipl": 18, "openai_cfg_dict": 18, "dict_fil": 18, "modelscope_cfg_dict": 18, "straightforward": 18, "openai_model_config": 18, "model_config_nam": [18, 19, 21, 23], "pool": [18, 19, 21], "primari": [18, 21, 24], "thei": [18, 19, 22, 24], "compris": 18, "essenti": [18, 21, 25, 34], "sender": 18, "either": [18, 19, 24, 25], "video": [18, 21], "audio": [18, 21], "websit": [18, 21, 23], "alic": 18, "message_from_alic": 18, "hi": 18, "bob": 18, "attach": 18, "message_from_bob": 18, "about": [18, 21, 24, 25, 27, 29], "pictur": 18, "took": 18, "jpg": 18, "dialog_ag": 18, "user_ag": 18, "until": [18, 19, 22], "exit": [18, 22, 28], "advanc": [18, 19], "approach": [18, 22], "stand": [18, 20], "speech": 18, "receiv": [18, 22, 28], "accordingli": 18, "complex": [18, 22, 28], "topic": 19, "give": 19, "glanc": 19, "box": 19, "known": 19, "social": 19, "deduct": 19, "involv": [19, 30], "imaginari": 19, "villag": 19, "few": [19, 23], "secretli": 19, "werewolv": 19, "elimin": 19, "player": 19, "good": 19, "demonstr": [19, 21, 24], "adventur": 19, "unlock": 19, "firstli": 19, "ensur": [19, 21, 22, 27], "properli": 19, "describ": [19, 22], "overview": [19, 31], "below": [19, 21, 22, 24, 28, 29], "As": [19, 21, 25], "assum": [19, 27], "endow": [19, 21], "distinct": [19, 21], "abil": 19, "ordinari": 19, "townsfolk": 19, "surviv": 19, "predat": 19, "disguis": 19, "aim": 19, "outlast": 19, "seer": 19, "night": 19, "witch": 19, "poison": 19, "myagent": 19, "someth": [19, 20], "sever": [19, 21, 28], "assign": [19, 20, 25], "player1": 19, "nthere": 19, "total": [19, 27], "6": 19, "player2": 19, "player3": 19, "player4": 19, "player5": 19, "player6": 19, "nplayer": 19, "nin": 19, "divid": 19, "know": 19, "teammat": 19, "nwerewolv": 19, "ident": 19, "remain": [19, 22], "undetect": 19, "nvillag": 19, "togeth": 19, "dure": [19, 25], "dai": 19, "deduc": 19, "might": [19, 24, 30], "vote": 19, "nseer": 19, "crucial": [19, 20, 26, 27], "gain": 19, "nwitch": 19, "charact": [19, 26], "sometim": 19, "potion": 19, "life": 19, "death": 19, "ngame": 19, "rule": 19, "nthe": 19, "consist": [19, 20, 21, 24], "phase": 19, "repeat": 19, "win": 19, "n1": 19, "decid": [19, 24], "n2": 19, "suspect": 19, "No": 19, "reveal": 19, "unless": 19, "serv": [19, 21, 22, 25, 27], "strateg": 19, "most": [19, 25], "lynch": 19, "nvictori": 19, "nfor": 19, "equal": 19, "greater": 19, "nconstraint": 19, "person": 19, "respond": [19, 26], "plai": 19, "use_memori": [19, 21], "flag": 19, "past": [19, 21, 25], "locat": [19, 26], "agent_config": 19, "simplifi": [19, 22, 24, 26], "line": [19, 20, 21], "ve": [19, 30], "survivor": 19, "logger_level": [19, 20], "u": [19, 29, 30], "wolv": 19, "through": [19, 21, 22, 26, 28], "alloc": 19, "dictat": 19, "orchestr": [19, 22], "anoth": [19, 21, 22, 24, 28], "even": 19, "don": 19, "dynam": [19, 21, 22], "welcom": [19, 20, 29, 30], "agent4": [19, 22], "major": 19, "daytim": 19, "section": [19, 22], "themselv": [19, 22], "everi": 19, "max_game_round": 19, "hint": [19, 21, 26], "hostmsg": 19, "to_wolv": 19, "max_werewolf_discussion_round": 19, "proce": 19, "choic": 19, "to_wolves_vot": 19, "extract_name_and_id": 19, "wolf": 19, "dead_play": 19, "majority_vot": 19, "to_wolves_r": 19, "turn": 19, "still": [19, 20, 27], "aliv": 19, "she": 19, "opportun": 19, "her": 19, "healing_used_tonight": 19, "heal": 19, "to_witch_resurrect": 19, "witch_nam": 19, "dead_nam": 19, "resurrect": 19, "pop": 19, "chanc": 19, "to_seer": 19, "idx": 19, "to_seer_result": 19, "update_alive_play": 19, "to_all_vot": 19, "vote_r": 19, "to_all_r": 19, "won": 19, "side": 19, "check_win": 19, "moder": 19, "round": 19, "neither": 19, "nor": 19, "hasn": 19, "end": 19, "to_all_continu": 19, "readi": [19, 21, 28, 30], "By": [19, 20, 24, 28], "predefin": [19, 21], "illustr": [19, 22], "unfold": 19, "alon": 19, "reach": 19, "tonight": 19, "think": 19, "seem": 19, "suspici": 19, "me": 19, "agre": 19, "player_nam": 19, "consid": 19, "okai": 19, "come": [19, 21, 24], "ey": [19, 30], "peac": 19, "grasp": 19, "conveni": 19, "feel": [19, 30], "free": [19, 30], "tailor": [19, 21], "introduc": [19, 21, 23, 28], "sophist": 19, "delv": 19, "explor": 19, "look": 19, "touch": 20, "visual": 20, "track": [20, 27], "clearer": 20, "over": 20, "color": 20, "speaker": [20, 25], "readabl": 20, "log_level": 20, "hello": 20, "world": 20, "m": [20, 23, 30], "fine": 20, "thank": 20, "isn": 20, "problemat": 20, "slower": 20, "gone": 20, "wrong": 20, "encount": [20, 29], "unexpect": 20, "path_sav": 20, "your_save_path": 20, "127": [20, 23], "5000": 20, "click": 20, "experi": [20, 29], "depth": 21, "navig": 21, "Then": [21, 28], "go": 21, "ensembl": 21, "mind": 21, "final": [21, 26], "fit": 21, "architectur": 21, "cornerston": 21, "superclass": 21, "comprehens": [21, 24], "underpin": 21, "deriv": 21, "compos": [21, 24], "characterist": 21, "retain": 21, "recal": 21, "ongo": 21, "pivot": 21, "incom": 21, "unifi": [21, 26], "And": 21, "omit": [21, 22, 24, 25], "breviti": [21, 22, 24, 25], "memory_config": 21, "intern": [21, 25], "enrich": 21, "notimplementederror": [21, 25], "f": [21, 24, 25, 27, 28], "__name__": [21, 24], "curat": 21, "equip": 21, "expedit": 21, "descript": [21, 22, 24, 30], "foundat": 21, "coher": [21, 25], "bot": 21, "virtual": [21, 34], "expand": 21, "demand": 21, "flexibl": 21, "minim": 21, "effort": 21, "adjust": [21, 27], "extens": 21, "engag": [21, 29], "secondari": 21, "prepar": [21, 34], "dialog_agent_config": 21, "servicebot": 21, "repons": 21, "service_bot": 21, "gather": 21, "later": 21, "isinst": 21, "require_url": 21, "user_agent_config": 21, "user_proxy_ag": 21, "conduit": 22, "abstractmethod": 22, "environment": 22, "orient": 22, "instanti": 22, "clspipelin": 22, "standalon": 22, "funcpipelin": 22, "categor": [22, 24], "next": [22, 24, 34], "facilit": [22, 25], "evalu": 22, "repeatedli": 22, "met": 22, "versu": 22, "term": [22, 27, 34], "replac": [22, 23], "thu": 22, "mix": 22, "practic": 22, "switch_result": 22, "case1": 22, "elif": 22, "case2": 22, "default_ag": 22, "max_iter": 22, "break_condit": 22, "worth": 22, "parallelpipelin": 22, "pipe1": 22, "parallel": [22, 28], "pipe2": 22, "agent5": 22, "pipe3": 22, "addition": [22, 25], "suppli": 22, "upon": [22, 25], "msg_hub": 22, "hub_manag": 22, "initial_announc": 22, "teardown": 22, "Or": 22, "some_messag": 22, "unintend": 22, "outsid": 22, "new_ag": 22, "existing_ag": 22, "global": 23, "appropri": [23, 24], "path_to_model_config": 23, "could": [23, 26], "1024x1024": 23, "fulli": [23, 28], "visit": 23, "introduct": 23, "fast": 23, "lightweight": 23, "modif": 23, "pip": [23, 30], "meta": 23, "llama": 23, "2": 23, "7b": 23, "hf": 23, "8000": 23, "flask_transform": 23, "setup_hf_servic": 23, "model_name_or_path": 23, "devic": 23, "cuda": 23, "cpu": 23, "card": 23, "flask_llama2": 23, "4096": 23, "flask_modelscop": 23, "setup_ms_servic": 23, "quick": 23, "rest": 23, "model_work": 23, "bash": 23, "fastchat_script": 23, "fastchat_setup": 23, "sh": 23, "p": 23, "base_url": 23, "v1": 23, "throughput": 23, "vllm_script": 23, "vllm_setup": 23, "gpt2": 23, "your_api_token": 23, "co": 23, "entir": 23, "possibl": [23, 30], "automodelforcausallm": 23, "autotoken": 23, "from_pretrain": 23, "yourag": [23, 24], "often": 24, "simpli": [24, 26], "constitut": 24, "suit": 24, "reus": 24, "behind": 24, "instead": [24, 25], "sub": [24, 28], "demo_servic": 24, "specifc": 24, "failur": 24, "stack": 24, "why": 24, "benefici": 24, "flexibli": [24, 26], "fallback": 24, "analyz": 24, "improv": [24, 29, 30], "outcom": 24, "domain": 24, "criteria": [24, 25], "against": 24, "highlight": 24, "point": 24, "renam": 24, "further": 24, "consult": 24, "docstr": 24, "meticul": 24, "inspect": 24, "complet": [24, 28], "sig": 24, "signatur": 24, "params_prompt": 24, "annot": 24, "dump": [24, 25], "model_respons": 24, "individu": 25, "storag": 25, "histor": 25, "media": 25, "uuid4": 25, "hex": 25, "_get_timestamp": 25, "denot": 25, "substanc": 25, "itself": 25, "form": 25, "extern": [25, 27], "resourc": 25, "direct": 25, "wa": 25, "creation": 25, "concret": 25, "__type": 25, "someon": 25, "outwardli": 25, "manipul": 25, "return_typ": 25, "recent": 25, "appli": 25, "singl": [25, 28], "bulk": 25, "purg": 25, "reset": 25, "runtim": 25, "seek": [26, 29], "toward": 26, "desir": 26, "combin": 26, "underli": 26, "polici": 26, "part": [26, 29, 30], "space": 26, "arbitrari": 26, "newlin": 26, "hint_prompt": 26, "weather": 26, "todai": 26, "whose": 26, "user_messag": 26, "inject": 26, "london": 26, "user_input": 26, "particularli": 27, "those": 27, "reli": 27, "cost": 27, "overutil": 27, "complianc": 27, "rate": 27, "regul": 27, "focus": [27, 30], "made": [27, 30], "enforc": 27, "batch": 27, "zero": 27, "period": 27, "particular": 27, "fetch": 27, "obtain": 27, "seri": 27, "calcul": 27, "sure": [27, 28], "sqlite3": 27, "token_num": 27, "1000": 27, "20": 27, "thrown": 27, "api_cal": 27, "amount": 27, "paus": 27, "token_num_us": 27, "longer": 27, "want": 27, "separ": [27, 28, 30], "model_a": 27, "model_b": 27, "prompt_token": 27, "completion_token": 27, "openai_respons": 27, "model_dump": 27, "model_a_metr": 27, "model_b_metr": 27, "suppos": [27, 28], "throw": 27, "experiment": 27, "stage": 27, "_get_pric": 27, "popular": 28, "concurr": 28, "adopt": 28, "impli": 28, "consum": 28, "figur": 28, "arrow": 28, "c": 28, "simultan": 28, "d": 28, "thing": 28, "howev": 28, "pai": 28, "attent": 28, "procedur": 28, "paradigm": 28, "y": 28, "z": 28, "although": 28, "appear": 28, "detect": 28, "graph": 28, "80": 28, "transfer": 28, "exactli": 28, "ip_a": 28, "server_a": 28, "12001": 28, "similarli": 28, "ip_b": 28, "access": 28, "server_b": 28, "12002": 28, "becom": 29, "connect": 29, "insight": 29, "ask": [29, 32], "date": 29, "latest": 29, "interest": 29, "star": 29, "watch": 29, "stai": 29, "progress": 29, "submit": 29, "problem": [29, 30], "suggest": [29, 30], "bug": [29, 32], "real": 29, "scan": 29, "qr": 29, "invit": 29, "everyon": 29, "growth": 29, "thrive": 30, "idea": 30, "member": 30, "did": 30, "tracker": 30, "reproduc": 30, "propos": 30, "checkout": 30, "hook": 30, "dev": 30, "concis": 30, "explain": 30, "brief": 30, "resolv": 30, "again": 30, "feedback": 30, "notif": 30, "agentpool": 31, "msghub": 31, "discord": 32, "dingtalk": 32, "\u9489\u9489": 32, "wechat": 32, "report": 32, "codebas": 32, "step1": 34, "step2": 34, "step3": 34}, "objects": {"agentscope.agents": [[1, 0, 0, "-", "agent"], [1, 0, 0, "-", "dialog_agent"], [1, 0, 0, "-", "dict_dialog_agent"], [1, 0, 0, "-", "operator"], [1, 0, 0, "-", "rpc_agent"], [1, 0, 0, "-", "text_to_image_agent"], [1, 0, 0, "-", "user_agent"]], "agentscope.agents.agent": [[1, 1, 1, "", "AgentBase"]], "agentscope.agents.agent.AgentBase": [[1, 2, 1, "", "clear_audience"], [1, 2, 1, "", "export_config"], [1, 2, 1, "", "load_from_config"], [1, 2, 1, "", "load_memory"], [1, 2, 1, "", "observe"], [1, 2, 1, "", "reply"], [1, 2, 1, "", "reset_audience"], [1, 2, 1, "", "rm_audience"], [1, 2, 1, "", "speak"], [1, 2, 1, "", "to_dist"]], "agentscope.agents.dialog_agent": [[1, 1, 1, "", "DialogAgent"]], "agentscope.agents.dialog_agent.DialogAgent": [[1, 2, 1, "", "reply"]], "agentscope.agents.dict_dialog_agent": [[1, 1, 1, "", "DictDialogAgent"]], "agentscope.agents.dict_dialog_agent.DictDialogAgent": [[1, 2, 1, "", "reply"]], "agentscope.agents.operator": [[1, 1, 1, "", "Operator"]], "agentscope.agents.rpc_agent": [[1, 1, 1, "", "RpcAgent"], [1, 1, 1, "", "RpcAgentServerLauncher"], [1, 1, 1, "", "RpcServerSideWrapper"], [1, 3, 1, "", "check_port"], [1, 3, 1, "", "find_available_port"], [1, 3, 1, "", "rpc_servicer_method"], [1, 3, 1, "", "setup_rcp_agent_server"]], "agentscope.agents.rpc_agent.RpcAgent": [[1, 2, 1, "", "observe"], [1, 2, 1, "", "reply"], [1, 2, 1, "", "stop"]], "agentscope.agents.rpc_agent.RpcAgentServerLauncher": [[1, 2, 1, "", "launch"], [1, 2, 1, "", "shutdown"], [1, 2, 1, "", "wait_until_terminate"]], "agentscope.agents.rpc_agent.RpcServerSideWrapper": [[1, 2, 1, "", "call_func"], [1, 2, 1, "", "get_task_id"], [1, 2, 1, "", "process_tasks"]], "agentscope.agents.text_to_image_agent": [[1, 1, 1, "", "TextToImageAgent"]], "agentscope.agents.text_to_image_agent.TextToImageAgent": [[1, 2, 1, "", "reply"]], "agentscope.agents.user_agent": [[1, 1, 1, "", "UserAgent"]], "agentscope.agents.user_agent.UserAgent": [[1, 2, 1, "", "reply"]], "agentscope.memory": [[2, 0, 0, "-", "memory"], [2, 0, 0, "-", "temporary_memory"]], "agentscope.memory.memory": [[2, 1, 1, "", "MemoryBase"]], "agentscope.memory.memory.MemoryBase": [[2, 2, 1, "", "add"], [2, 2, 1, "", "clear"], [2, 2, 1, "", "delete"], [2, 2, 1, "", "export"], [2, 2, 1, "", "get_memory"], [2, 2, 1, "", "load"], [2, 2, 1, "", "size"], [2, 2, 1, "", "update_config"]], "agentscope.memory.temporary_memory": [[2, 1, 1, "", "TemporaryMemory"]], "agentscope.memory.temporary_memory.TemporaryMemory": [[2, 2, 1, "", "add"], [2, 2, 1, "", "clear"], [2, 2, 1, "", "delete"], [2, 2, 1, "", "export"], [2, 2, 1, "", "get_embeddings"], [2, 2, 1, "", "get_memory"], [2, 2, 1, "", "load"], [2, 2, 1, "", "retrieve_by_embedding"], [2, 2, 1, "", "size"]], "agentscope": [[3, 0, 0, "-", "models"]], "agentscope.models": [[3, 3, 1, "", "clear_model_configs"], [3, 0, 0, "-", "config"], [3, 3, 1, "", "load_model_by_config_name"], [3, 0, 0, "-", "model"], [3, 0, 0, "-", "openai_model"], [3, 0, 0, "-", "post_model"], [3, 3, 1, "", "read_model_configs"]], "agentscope.models.config": [[3, 1, 1, "", "ModelConfig"]], "agentscope.models.config.ModelConfig": [[3, 2, 1, "", "format_configs"]], "agentscope.models.model": [[3, 1, 1, "", "ModelResponse"], [3, 1, 1, "", "ModelWrapperBase"]], "agentscope.models.model.ModelResponse": [[3, 4, 1, "", "embedding"], [3, 4, 1, "", "image_urls"], [3, 4, 1, "", "raw"], [3, 4, 1, "", "text"]], "agentscope.models.model.ModelWrapperBase": [[3, 5, 1, "", "registry"], [3, 5, 1, "", "type_registry"]], "agentscope.models.openai_model": [[3, 1, 1, "", "OpenAIChatWrapper"], [3, 1, 1, "", "OpenAIDALLEWrapper"], [3, 1, 1, "", "OpenAIEmbeddingWrapper"], [3, 1, 1, "", "OpenAIWrapper"]], "agentscope.models.openai_model.OpenAIChatWrapper": [[3, 5, 1, "", "model_type"]], "agentscope.models.openai_model.OpenAIDALLEWrapper": [[3, 5, 1, "", "model_type"]], "agentscope.models.openai_model.OpenAIEmbeddingWrapper": [[3, 5, 1, "", "model_type"]], "agentscope.models.post_model": [[3, 1, 1, "", "PostAPIChatWrapper"], [3, 1, 1, "", "PostAPIDALLEWrapper"], [3, 1, 1, "", "PostAPIModelWrapperBase"]], "agentscope.models.post_model.PostAPIChatWrapper": [[3, 5, 1, "", "model_type"]], "agentscope.models.post_model.PostAPIDALLEWrapper": [[3, 5, 1, "", "model_type"]], "agentscope.models.post_model.PostAPIModelWrapperBase": [[3, 5, 1, "", "model_type"]], "agentscope.pipelines": [[4, 0, 0, "-", "functional"], [4, 0, 0, "-", "pipeline"]], "agentscope.pipelines.functional": [[4, 3, 1, "", "forlooppipeline"], [4, 3, 1, "", "ifelsepipeline"], [4, 3, 1, "", "placeholder"], [4, 3, 1, "", "sequentialpipeline"], [4, 3, 1, "", "switchpipeline"], [4, 3, 1, "", "whilelooppipeline"]], "agentscope.pipelines.pipeline": [[4, 1, 1, "", "ForLoopPipeline"], [4, 1, 1, "", "IfElsePipeline"], [4, 1, 1, "", "PipelineBase"], [4, 1, 1, "", "SequentialPipeline"], [4, 1, 1, "", "SwitchPipeline"], [4, 1, 1, "", "WhileLoopPipeline"]], "agentscope.rpc": [[5, 0, 0, "-", "rpc_agent_client"], [5, 0, 0, "-", "rpc_agent_pb2_grpc"]], "agentscope.rpc.rpc_agent_client": [[5, 1, 1, "", "RpcAgentClient"]], "agentscope.rpc.rpc_agent_client.RpcAgentClient": [[5, 2, 1, "", "call_func"]], "agentscope.rpc.rpc_agent_pb2_grpc": [[5, 1, 1, "", "RpcAgent"], [5, 1, 1, "", "RpcAgentServicer"], [5, 1, 1, "", "RpcAgentStub"], [5, 3, 1, "", "add_RpcAgentServicer_to_server"]], "agentscope.rpc.rpc_agent_pb2_grpc.RpcAgent": [[5, 2, 1, "", "call_func"]], "agentscope.rpc.rpc_agent_pb2_grpc.RpcAgentServicer": [[5, 2, 1, "", "call_func"]], "agentscope.service.code": [[7, 0, 0, "-", "exec_python"]], "agentscope.service.code.exec_python": [[7, 3, 1, "", "execute_python_code"], [7, 3, 1, "", "sys_python_guard"]], "agentscope.service.file": [[8, 0, 0, "-", "common"], [8, 0, 0, "-", "json"], [8, 0, 0, "-", "text"]], "agentscope.service.file.common": [[8, 3, 1, "", "create_directory"], [8, 3, 1, "", "create_file"], [8, 3, 1, "", "delete_directory"], [8, 3, 1, "", "delete_file"], [8, 3, 1, "", "move_directory"], [8, 3, 1, "", "move_file"]], "agentscope.service.file.json": [[8, 3, 1, "", "read_json_file"], [8, 3, 1, "", "write_json_file"]], "agentscope.service.file.text": [[8, 3, 1, "", "read_text_file"], [8, 3, 1, "", "write_text_file"]], "agentscope.service.retrieval": [[9, 0, 0, "-", "retrieval_from_list"], [9, 0, 0, "-", "similarity"]], "agentscope.service.retrieval.retrieval_from_list": [[9, 3, 1, "", "retrieve_from_list"]], "agentscope.service.retrieval.similarity": [[9, 3, 1, "", "cos_sim"]], "agentscope.service.sql_query": [[10, 0, 0, "-", "mongodb"], [10, 0, 0, "-", "mysql"], [10, 0, 0, "-", "sqlite"]], "agentscope.service.sql_query.mongodb": [[10, 3, 1, "", "query_mongodb"]], "agentscope.service.sql_query.mysql": [[10, 3, 1, "", "query_mysql"]], "agentscope.service.sql_query.sqlite": [[10, 3, 1, "", "query_sqlite"]], "agentscope.service.text_processing": [[11, 0, 0, "-", "summarization"]], "agentscope.service.text_processing.summarization": [[11, 3, 1, "", "summarization"]], "agentscope.service.web_search": [[12, 0, 0, "-", "search"]], "agentscope.service.web_search.search": [[12, 3, 1, "", "web_search"]], "agentscope.utils": [[13, 0, 0, "-", "common"], [13, 0, 0, "-", "logging_utils"], [13, 0, 0, "-", "monitor"], [13, 0, 0, "-", "token_utils"], [13, 0, 0, "-", "tools"]], "agentscope.utils.common": [[13, 3, 1, "", "chdir"], [13, 3, 1, "", "create_tempdir"], [13, 3, 1, "", "if_change_database"], [13, 3, 1, "", "requests_get"], [13, 3, 1, "", "timer"], [13, 3, 1, "", "write_file"]], "agentscope.utils.logging_utils": [[13, 3, 1, "", "setup_logger"]], "agentscope.utils.monitor": [[13, 1, 1, "", "MonitorBase"], [13, 1, 1, "", "MonitorFactory"], [13, 6, 1, "", "QuotaExceededError"], [13, 1, 1, "", "SqliteMonitor"], [13, 3, 1, "", "get_full_name"], [13, 3, 1, "", "sqlite_cursor"], [13, 3, 1, "", "sqlite_transaction"]], "agentscope.utils.monitor.MonitorBase": [[13, 2, 1, "", "add"], [13, 2, 1, "", "clear"], [13, 2, 1, "", "exists"], [13, 2, 1, "", "get_metric"], [13, 2, 1, "", "get_metrics"], [13, 2, 1, "", "get_quota"], [13, 2, 1, "", "get_unit"], [13, 2, 1, "", "get_value"], [13, 2, 1, "", "register"], [13, 2, 1, "", "register_budget"], [13, 2, 1, "", "remove"], [13, 2, 1, "", "set_quota"], [13, 2, 1, "", "update"]], "agentscope.utils.monitor.MonitorFactory": [[13, 2, 1, "", "get_monitor"]], "agentscope.utils.monitor.SqliteMonitor": [[13, 2, 1, "", "add"], [13, 2, 1, "", "clear"], [13, 2, 1, "", "exists"], [13, 2, 1, "", "get_metric"], [13, 2, 1, "", "get_metrics"], [13, 2, 1, "", "get_quota"], [13, 2, 1, "", "get_unit"], [13, 2, 1, "", "get_value"], [13, 2, 1, "", "register"], [13, 2, 1, "", "register_budget"], [13, 2, 1, "", "remove"], [13, 2, 1, "", "set_quota"], [13, 2, 1, "", "update"]], "agentscope.utils.token_utils": [[13, 3, 1, "", "count_openai_token"], [13, 3, 1, "", "get_openai_max_length"], [13, 3, 1, "", "num_tokens_from_content"]], "agentscope.utils.tools": [[13, 3, 1, "", "extract_json_str"], [13, 3, 1, "", "to_dialog_str"], [13, 3, 1, "", "to_openai_dict"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:function", "4": "py:property", "5": "py:attribute", "6": "py:exception"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "function", "Python function"], "4": ["py", "property", "Python property"], "5": ["py", "attribute", "Python attribute"], "6": ["py", "exception", "Python exception"]}, "titleterms": {"modul": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "content": [0, 3], "constant": 0, "file_manag": 0, "messag": [0, 20, 22, 25], "msghub": [0, 19, 22], "prompt": [0, 26], "agent": [1, 18, 19, 21, 22, 24, 28], "packag": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "oper": 1, "rpc_agent": 1, "user_ag": 1, "dialog_ag": 1, "dict_dialog_ag": 1, "text_to_image_ag": 1, "memori": [2, 23, 25], "temporary_memori": 2, "model": [3, 18, 19, 23], "config": [3, 18, 19], "openai_model": 3, "post_model": 3, "pipelin": [4, 19, 22], "function": [4, 24], "rpc": 5, "rpc_agent_cli": 5, "rpc_agent_pb2_grpc": 5, "servic": [6, 24], "service_statu": 6, "service_respons": 6, "code": [7, 17, 30], "exec_python": 7, "file": 8, "common": [8, 13], "json": 8, "text": [8, 11], "retriev": [9, 27], "retrieval_from_list": 9, "similar": 9, "sql": 10, "queri": 10, "mongodb": 10, "mysql": 10, "sqlite": 10, "process": [11, 28], "summar": 11, "web": [12, 14], "search": 12, "util": 13, "logging_util": 13, "monitor": [13, 27], "token_util": 13, "tool": 13, "ui": 14, "app": 14, "agentscop": [15, 16, 19, 23, 27, 29, 30, 33], "document": 15, "welcom": [15, 33], "tutori": [15, 33], "hub": [15, 22, 33], "navig": [15, 33], "get": [15, 18, 19, 27, 32, 33, 34], "start": [15, 18, 19, 33, 34], "advanc": [15, 27, 31, 33], "explor": [15, 21, 31, 33], "involv": [15, 32, 33], "api": [15, 19, 23, 27], "refer": 15, "indic": 15, "tabl": 15, "instal": [16, 23], "creat": [16, 18, 22, 30], "virtual": 16, "environ": 16, "us": [16, 23, 27], "conda": 16, "virtualenv": 16, "pip": 16, "from": [16, 21], "sourc": [16, 23], "fundament": 17, "concept": 17, "essenti": 17, "term": 17, "structur": 17, "simpl": 18, "exampl": [18, 19], "step1": 18, "prepar": [18, 19], "step2": 18, "step3": 18, "convers": 18, "craft": 19, "your": [19, 21, 28, 30], "first": 19, "applic": [19, 28], "step": 19, "1": 19, "set": [19, 20, 23], "2": 19, "defin": 19, "role": 19, "each": 19, "3": 19, "initi": [19, 26], "4": 19, "up": [19, 20, 23], "game": 19, "logic": 19, "leverag": 19, "implement": 19, "werewolf": 19, "5": 19, "run": [19, 20, 28], "next": 19, "other": 19, "log": 20, "webui": 20, "logger": 20, "chat": 20, "system": 20, "inform": 20, "integr": 20, "quick": 20, "note": [20, 23], "custom": 21, "own": 21, "understand": [21, 25, 26, 27], "agentbas": 21, "agentpool": 21, "dialogag": 21, "userag": 21, "interact": 22, "dive": 22, "deeper": 22, "categori": 22, "usag": [22, 24, 27], "sequentialpipelin": 22, "ifelsepipelin": 22, "switchpipelin": 22, "forlooppipelin": 22, "whilelooppipelin": 22, "combin": 22, "broadcast": 22, "ad": 22, "delet": 22, "particip": 22, "differ": 23, "standard": 23, "openai": 23, "self": 23, "host": 23, "flask": 23, "base": 23, "serv": 23, "With": 23, "transform": 23, "librari": 23, "how": 23, "modelscop": 23, "fastchat": 23, "support": 23, "vllm": 23, "infer": 23, "In": 23, "without": 23, "enhanc": 24, "capabl": 24, "servicerespons": 24, "overview": 24, "manag": 25, "messagebas": 25, "its": 25, "subclass": 25, "msg": 25, "tht": 25, "memorybas": 25, "temporarymemori": 25, "engin": 26, "promptengin": 26, "class": 26, "kei": 26, "featur": [26, 28, 30], "join": [26, 29], "compon": 26, "output": 26, "string": 26, "type": 26, "list": 26, "format": 26, "dynam": 26, "wai": 26, "instanc": 27, "basic": 27, "regist": 27, "metric": 27, "updat": 27, "handl": 27, "quota": 27, "reset": 27, "remov": 27, "prefix": 27, "distinguish": 27, "budget": 27, "an": [27, 28], "make": [28, 30], "distribut": 28, "everi": 28, "i": 28, "actor": 28, "write": 28, "central": 28, "distributedli": 28, "easi": 28, "deploy": 28, "convert": 28, "multi": 28, "mode": 28, "multipl": 28, "machin": 28, "The": 29, "commun": 29, "github": 29, "discord": 29, "dingtalk": 29, "\u9489\u9489": 29, "wechat": 29, "contribut": 30, "report": 30, "bug": 30, "ask": 30, "For": 30, "new": 30, "codebas": 30, "fork": 30, "clone": 30, "repositori": 30, "branch": 30, "chang": 30, "commit": 30, "submit": 30, "pull": 30, "request": 30, "review": 30}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx": 60}, "alltitles": {"Module contents": [[0, "module-contents"], [3, "module-agentscope.models"]], "constants module": [[0, "constants-module"]], "file_manager module": [[0, "file-manager-module"]], "message module": [[0, "message-module"]], "msghub module": [[0, "msghub-module"]], "prompt module": [[0, "prompt-module"]], "Agents package": [[1, "agents-package"]], "operator module": [[1, "module-agentscope.agents.operator"]], "agent module": [[1, "module-agentscope.agents.agent"]], "rpc_agent module": [[1, "module-agentscope.agents.rpc_agent"]], "user_agent module": [[1, "module-agentscope.agents.user_agent"]], "dialog_agent module": [[1, "module-agentscope.agents.dialog_agent"]], "dict_dialog_agent module": [[1, "module-agentscope.agents.dict_dialog_agent"]], "text_to_image_agent module": [[1, "module-agentscope.agents.text_to_image_agent"]], "Memory package": [[2, "memory-package"]], "memory module": [[2, "module-agentscope.memory.memory"]], "temporary_memory module": [[2, "module-agentscope.memory.temporary_memory"]], "Models package": [[3, "models-package"]], "config module": [[3, "module-agentscope.models.config"]], "model module": [[3, "module-agentscope.models.model"]], "openai_model module": [[3, "module-agentscope.models.openai_model"]], "post_model module": [[3, "module-agentscope.models.post_model"]], "Pipelines package": [[4, "pipelines-package"]], "pipeline module": [[4, "module-agentscope.pipelines.pipeline"]], "functional module": [[4, "module-agentscope.pipelines.functional"]], "RPC package": [[5, "rpc-package"]], "rpc_agent_client module": [[5, "module-agentscope.rpc.rpc_agent_client"]], "rpc_agent_pb2_grpc module": [[5, "module-agentscope.rpc.rpc_agent_pb2_grpc"]], "Service package": [[6, "service-package"]], "service_status module": [[6, "service-status-module"]], "service_response module": [[6, "service-response-module"]], "Code package": [[7, "code-package"]], "exec_python module": [[7, "module-agentscope.service.code.exec_python"]], "File package": [[8, "file-package"]], "common module": [[8, "module-agentscope.service.file.common"], [13, "module-agentscope.utils.common"]], "json module": [[8, "module-agentscope.service.file.json"]], "text module": [[8, "module-agentscope.service.file.text"]], "Retrieval package": [[9, "retrieval-package"]], "retrieval_from_list module": [[9, "module-agentscope.service.retrieval.retrieval_from_list"]], "similarity module": [[9, "module-agentscope.service.retrieval.similarity"]], "SQL query package": [[10, "sql-query-package"]], "mongodb module": [[10, "module-agentscope.service.sql_query.mongodb"]], "mysql module": [[10, "module-agentscope.service.sql_query.mysql"]], "sqlite module": [[10, "module-agentscope.service.sql_query.sqlite"]], "Text processing package": [[11, "text-processing-package"]], "summarization module": [[11, "module-agentscope.service.text_processing.summarization"]], "Web search package": [[12, "web-search-package"]], "search module": [[12, "module-agentscope.service.web_search.search"]], "Utils package": [[13, "utils-package"]], "logging_utils module": [[13, "module-agentscope.utils.logging_utils"]], "monitor module": [[13, "module-agentscope.utils.monitor"]], "token_utils module": [[13, "module-agentscope.utils.token_utils"]], "tools module": [[13, "module-agentscope.utils.tools"]], "Web UI package": [[14, "web-ui-package"]], "app module": [[14, "app-module"]], "AgentScope Documentation": [[15, "agentscope-documentation"]], "Welcome to AgentScope Tutorial Hub": [[15, "welcome-to-agentscope-tutorial-hub"], [33, "welcome-to-agentscope-tutorial-hub"]], "Tutorial Navigator": [[15, "tutorial-navigator"], [33, "tutorial-navigator"]], "Getting Started": [[15, "getting-started"], [19, "getting-started"], [33, "getting-started"], [34, "getting-started"]], "Advanced Exploration": [[15, "advanced-exploration"], [31, "advanced-exploration"], [33, "advanced-exploration"]], "Getting Involved": [[15, "getting-involved"], [33, "getting-involved"]], "AgentScope API Reference": [[15, null]], "Indices and tables": [[15, "indices-and-tables"]], "Installation": [[16, "installation"]], "Create a Virtual Environment": [[16, "create-a-virtual-environment"]], "Using Conda": [[16, "using-conda"]], "Using Virtualenv": [[16, "using-virtualenv"]], "Installing AgentScope": [[16, "installing-agentscope"]], "Install with Pip": [[16, "install-with-pip"]], "Install from Source": [[16, "install-from-source"]], "Fundamental Concepts": [[17, "fundamental-concepts"]], "Essential Terms and Concepts": [[17, "essential-terms-and-concepts"]], "Code Structure": [[17, "code-structure"]], "Getting Started with a Simple Example": [[18, "getting-started-with-a-simple-example"]], "Step1: Prepare Model Configs": [[18, "step1-prepare-model-configs"]], "Step2: Create Agents": [[18, "step2-create-agents"]], "Step3: Agent Conversation": [[18, "step3-agent-conversation"]], "Crafting Your First Application": [[19, "crafting-your-first-application"]], "Step 1: Prepare Model API and Set Model Configs": [[19, "step-1-prepare-model-api-and-set-model-configs"]], "Step 2: Define the Roles of Each Agent": [[19, "step-2-define-the-roles-of-each-agent"]], "Step 3: Initialize AgentScope and the Agents": [[19, "step-3-initialize-agentscope-and-the-agents"]], "Step 4: Set Up the Game Logic": [[19, "step-4-set-up-the-game-logic"]], "Leverage Pipeline and MsgHub": [[19, "leverage-pipeline-and-msghub"]], "Implement Werewolf Pipeline": [[19, "implement-werewolf-pipeline"]], "Step 5: Run the Application": [[19, "step-5-run-the-application"]], "Next step": [[19, "next-step"]], "Other Example Applications": [[19, "other-example-applications"]], "Logging and WebUI": [[20, "logging-and-webui"]], "Logging": [[20, "id1"]], "Setting Up the Logger": [[20, "setting-up-the-logger"]], "Logging a Chat Message": [[20, "logging-a-chat-message"]], "Logging a System information": [[20, "logging-a-system-information"]], "Integrating logging with WebUI": [[20, "integrating-logging-with-webui"]], "Quick Running": [[20, "quick-running"]], "Note": [[20, "note"], [23, "note"], [23, "id2"]], "Customizing Your Own Agent": [[21, "customizing-your-own-agent"]], "Understanding AgentBase": [[21, "understanding-agentbase"]], "Exploring the AgentPool": [[21, "exploring-the-agentpool"]], "Customizing Agents from the AgentPool": [[21, "customizing-agents-from-the-agentpool"]], "DialogAgent": [[21, "dialogagent"]], "UserAgent": [[21, "useragent"]], "Agent Interactions: Dive deeper into Pipelines and Message Hub": [[22, "agent-interactions-dive-deeper-into-pipelines-and-message-hub"]], "Pipelines": [[22, "pipelines"]], "Category": [[22, "category"]], "Usage": [[22, "usage"], [22, "id1"], [24, "usage"]], "SequentialPipeline": [[22, "sequentialpipeline"]], "IfElsePipeline": [[22, "ifelsepipeline"]], "SwitchPipeline": [[22, "switchpipeline"]], "ForLoopPipeline": [[22, "forlooppipeline"]], "WhileLoopPipeline": [[22, "whilelooppipeline"]], "Pipeline Combination": [[22, "pipeline-combination"]], "MsgHub": [[22, "msghub"]], "Creating a MsgHub": [[22, "creating-a-msghub"]], "Broadcast message in MsgHub": [[22, "broadcast-message-in-msghub"]], "Adding and Deleting Participants": [[22, "adding-and-deleting-participants"]], "Using Different Model Sources with Model API": [[23, "using-different-model-sources-with-model-api"]], "Standard OpenAI API": [[23, "standard-openai-api"]], "Self-host Model API": [[23, "self-host-model-api"]], "Flask-based Model API Serving": [[23, "flask-based-model-api-serving"]], "With Transformers Library": [[23, "with-transformers-library"]], "Install Libraries and Set up Serving": [[23, "install-libraries-and-set-up-serving"], [23, "id1"], [23, "id3"], [23, "id5"]], "How to use in AgentScope": [[23, "how-to-use-in-agentscope"], [23, "id4"], [23, "id7"]], "With ModelScope Library": [[23, "with-modelscope-library"]], "How to use AgentScope": [[23, "how-to-use-agentscope"]], "FastChat": [[23, "fastchat"]], "Supported Models": [[23, "supported-models"]], "vllm": [[23, "vllm"]], "Supported models": [[23, "id6"]], "Model Inference API": [[23, "model-inference-api"]], "In-memory Models without API": [[23, "in-memory-models-without-api"]], "Enhancing Agent Capabilities with Service Functions": [[24, "enhancing-agent-capabilities-with-service-functions"]], "ServiceResponse": [[24, "serviceresponse"]], "Overview of Service Functions": [[24, "overview-of-service-functions"]], "Memory and Message Management": [[25, "memory-and-message-management"]], "Understanding MessageBase and its subclasses": [[25, "understanding-messagebase-and-its-subclasses"]], "MessageBase": [[25, "messagebase"]], "Msg": [[25, "msg"]], "Tht": [[25, "tht"]], "Understanding MemoryBase and its subclasses": [[25, "understanding-memorybase-and-its-subclasses"]], "MemoryBase": [[25, "memorybase"]], "TemporaryMemory": [[25, "temporarymemory"]], "Prompt Engine": [[26, "prompt-engine"]], "Understanding the PromptEngine Class": [[26, "understanding-the-promptengine-class"]], "Key Features of PromptEngine": [[26, "key-features-of-promptengine"]], "Initialization": [[26, "initialization"]], "Joining Prompt Components": [[26, "joining-prompt-components"]], "Output String Type Prompt": [[26, "output-string-type-prompt"]], "Output List Type Prompt": [[26, "output-list-type-prompt"]], "Formatting Prompts in Dynamic Way": [[26, "formatting-prompts-in-dynamic-way"]], "Monitor": [[27, "monitor"]], "Understanding the Monitor in AgentScope": [[27, "understanding-the-monitor-in-agentscope"]], "Using the Monitor": [[27, "using-the-monitor"]], "Get a Monitor Instance": [[27, "get-a-monitor-instance"]], "Basic Usage": [[27, "basic-usage"]], "Registering API Usage Metrics": [[27, "registering-api-usage-metrics"]], "Updating Metrics": [[27, "updating-metrics"]], "Handling Quotas": [[27, "handling-quotas"]], "Retrieving Metrics": [[27, "retrieving-metrics"]], "Resetting and Removing Metrics": [[27, "resetting-and-removing-metrics"]], "Advanced Usage": [[27, "advanced-usage"]], "Using prefix to Distinguish Metrics": [[27, "using-prefix-to-distinguish-metrics"]], "Register a budget for an API": [[27, "register-a-budget-for-an-api"]], "Make Your Applications Distributed": [[28, "make-your-applications-distributed"]], "Features": [[28, "features"]], "Every agent is an \u201cActor\u201d": [[28, "every-agent-is-an-actor"]], "Write centrally, run distributedly": [[28, "write-centrally-run-distributedly"]], "Easy Distributed Deployment": [[28, "easy-distributed-deployment"]], "Convert your agents": [[28, "convert-your-agents"]], "Run in multi-process mode": [[28, "run-in-multi-process-mode"]], "Run on multiple machines": [[28, "run-on-multiple-machines"]], "Joining The AgentScope Community": [[29, "joining-the-agentscope-community"]], "GitHub": [[29, "github"]], "Discord": [[29, "discord"]], "DingTalk (\u9489\u9489)": [[29, "dingtalk"]], "Wechat": [[29, "wechat"]], "Contributing to AgentScope": [[30, "contributing-to-agentscope"]], "Report Bugs and Ask For New Features?": [[30, "report-bugs-and-ask-for-new-features"]], "Contribute to Codebase": [[30, "contribute-to-codebase"]], "Fork and Clone the Repository": [[30, "fork-and-clone-the-repository"]], "Create a New Branch": [[30, "create-a-new-branch"]], "Making Changes": [[30, "making-changes"]], "Commit Your Changes": [[30, "commit-your-changes"]], "Submit a Pull Request": [[30, "submit-a-pull-request"]], "Code Review": [[30, "code-review"]], "Get Involved": [[32, "get-involved"]]}, "indexentries": {"agentbase (class in agentscope.agents.agent)": [[1, "agentscope.agents.agent.AgentBase"]], "dialogagent (class in agentscope.agents.dialog_agent)": [[1, "agentscope.agents.dialog_agent.DialogAgent"]], "dictdialogagent (class in agentscope.agents.dict_dialog_agent)": [[1, "agentscope.agents.dict_dialog_agent.DictDialogAgent"]], "operator (class in agentscope.agents.operator)": [[1, "agentscope.agents.operator.Operator"]], "rpcagent (class in agentscope.agents.rpc_agent)": [[1, "agentscope.agents.rpc_agent.RpcAgent"]], "rpcagentserverlauncher (class in agentscope.agents.rpc_agent)": [[1, "agentscope.agents.rpc_agent.RpcAgentServerLauncher"]], "rpcserversidewrapper (class in agentscope.agents.rpc_agent)": [[1, "agentscope.agents.rpc_agent.RpcServerSideWrapper"]], "texttoimageagent (class in agentscope.agents.text_to_image_agent)": [[1, "agentscope.agents.text_to_image_agent.TextToImageAgent"]], "useragent (class in agentscope.agents.user_agent)": [[1, "agentscope.agents.user_agent.UserAgent"]], "agentscope.agents.agent": [[1, "module-agentscope.agents.agent"]], "agentscope.agents.dialog_agent": [[1, "module-agentscope.agents.dialog_agent"]], "agentscope.agents.dict_dialog_agent": [[1, "module-agentscope.agents.dict_dialog_agent"]], "agentscope.agents.operator": [[1, "module-agentscope.agents.operator"]], "agentscope.agents.rpc_agent": [[1, "module-agentscope.agents.rpc_agent"]], "agentscope.agents.text_to_image_agent": [[1, "module-agentscope.agents.text_to_image_agent"]], "agentscope.agents.user_agent": [[1, "module-agentscope.agents.user_agent"]], "call_func() (agentscope.agents.rpc_agent.rpcserversidewrapper method)": [[1, "agentscope.agents.rpc_agent.RpcServerSideWrapper.call_func"]], "check_port() (in module agentscope.agents.rpc_agent)": [[1, "agentscope.agents.rpc_agent.check_port"]], "clear_audience() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.clear_audience"]], "export_config() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.export_config"]], "find_available_port() (in module agentscope.agents.rpc_agent)": [[1, "agentscope.agents.rpc_agent.find_available_port"]], "get_task_id() (agentscope.agents.rpc_agent.rpcserversidewrapper method)": [[1, "agentscope.agents.rpc_agent.RpcServerSideWrapper.get_task_id"]], "launch() (agentscope.agents.rpc_agent.rpcagentserverlauncher method)": [[1, "agentscope.agents.rpc_agent.RpcAgentServerLauncher.launch"]], "load_from_config() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.load_from_config"]], "load_memory() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.load_memory"]], "module": [[1, "module-agentscope.agents.agent"], [1, "module-agentscope.agents.dialog_agent"], [1, "module-agentscope.agents.dict_dialog_agent"], [1, "module-agentscope.agents.operator"], [1, "module-agentscope.agents.rpc_agent"], [1, "module-agentscope.agents.text_to_image_agent"], [1, "module-agentscope.agents.user_agent"], [2, "module-agentscope.memory.memory"], [2, "module-agentscope.memory.temporary_memory"], [3, "module-agentscope.models"], [3, "module-agentscope.models.config"], [3, "module-agentscope.models.model"], [3, "module-agentscope.models.openai_model"], [3, "module-agentscope.models.post_model"], [4, "module-agentscope.pipelines.functional"], [4, "module-agentscope.pipelines.pipeline"], [5, "module-agentscope.rpc.rpc_agent_client"], [5, "module-agentscope.rpc.rpc_agent_pb2_grpc"], [7, "module-agentscope.service.code.exec_python"], [8, "module-agentscope.service.file.common"], [8, "module-agentscope.service.file.json"], [8, "module-agentscope.service.file.text"], [9, "module-agentscope.service.retrieval.retrieval_from_list"], [9, "module-agentscope.service.retrieval.similarity"], [10, "module-agentscope.service.sql_query.mongodb"], [10, "module-agentscope.service.sql_query.mysql"], [10, "module-agentscope.service.sql_query.sqlite"], [11, "module-agentscope.service.text_processing.summarization"], [12, "module-agentscope.service.web_search.search"], [13, "module-agentscope.utils.common"], [13, "module-agentscope.utils.logging_utils"], [13, "module-agentscope.utils.monitor"], [13, "module-agentscope.utils.token_utils"], [13, "module-agentscope.utils.tools"]], "observe() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.observe"]], "observe() (agentscope.agents.rpc_agent.rpcagent method)": [[1, "agentscope.agents.rpc_agent.RpcAgent.observe"]], "process_tasks() (agentscope.agents.rpc_agent.rpcserversidewrapper method)": [[1, "agentscope.agents.rpc_agent.RpcServerSideWrapper.process_tasks"]], "reply() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.reply"]], "reply() (agentscope.agents.dialog_agent.dialogagent method)": [[1, "agentscope.agents.dialog_agent.DialogAgent.reply"]], "reply() (agentscope.agents.dict_dialog_agent.dictdialogagent method)": [[1, "agentscope.agents.dict_dialog_agent.DictDialogAgent.reply"]], "reply() (agentscope.agents.rpc_agent.rpcagent method)": [[1, "agentscope.agents.rpc_agent.RpcAgent.reply"]], "reply() (agentscope.agents.text_to_image_agent.texttoimageagent method)": [[1, "agentscope.agents.text_to_image_agent.TextToImageAgent.reply"]], "reply() (agentscope.agents.user_agent.useragent method)": [[1, "agentscope.agents.user_agent.UserAgent.reply"]], "reset_audience() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.reset_audience"]], "rm_audience() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.rm_audience"]], "rpc_servicer_method() (in module agentscope.agents.rpc_agent)": [[1, "agentscope.agents.rpc_agent.rpc_servicer_method"]], "setup_rcp_agent_server() (in module agentscope.agents.rpc_agent)": [[1, "agentscope.agents.rpc_agent.setup_rcp_agent_server"]], "shutdown() (agentscope.agents.rpc_agent.rpcagentserverlauncher method)": [[1, "agentscope.agents.rpc_agent.RpcAgentServerLauncher.shutdown"]], "speak() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.speak"]], "stop() (agentscope.agents.rpc_agent.rpcagent method)": [[1, "agentscope.agents.rpc_agent.RpcAgent.stop"]], "to_dist() (agentscope.agents.agent.agentbase method)": [[1, "agentscope.agents.agent.AgentBase.to_dist"]], "wait_until_terminate() (agentscope.agents.rpc_agent.rpcagentserverlauncher method)": [[1, "agentscope.agents.rpc_agent.RpcAgentServerLauncher.wait_until_terminate"]], "memorybase (class in agentscope.memory.memory)": [[2, "agentscope.memory.memory.MemoryBase"]], "temporarymemory (class in agentscope.memory.temporary_memory)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory"]], "add() (agentscope.memory.memory.memorybase method)": [[2, "agentscope.memory.memory.MemoryBase.add"]], "add() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.add"]], "agentscope.memory.memory": [[2, "module-agentscope.memory.memory"]], "agentscope.memory.temporary_memory": [[2, "module-agentscope.memory.temporary_memory"]], "clear() (agentscope.memory.memory.memorybase method)": [[2, "agentscope.memory.memory.MemoryBase.clear"]], "clear() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.clear"]], "delete() (agentscope.memory.memory.memorybase method)": [[2, "agentscope.memory.memory.MemoryBase.delete"]], "delete() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.delete"]], "export() (agentscope.memory.memory.memorybase method)": [[2, "agentscope.memory.memory.MemoryBase.export"]], "export() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.export"]], "get_embeddings() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.get_embeddings"]], "get_memory() (agentscope.memory.memory.memorybase method)": [[2, "agentscope.memory.memory.MemoryBase.get_memory"]], "get_memory() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.get_memory"]], "load() (agentscope.memory.memory.memorybase method)": [[2, "agentscope.memory.memory.MemoryBase.load"]], "load() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.load"]], "retrieve_by_embedding() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.retrieve_by_embedding"]], "size() (agentscope.memory.memory.memorybase method)": [[2, "agentscope.memory.memory.MemoryBase.size"]], "size() (agentscope.memory.temporary_memory.temporarymemory method)": [[2, "agentscope.memory.temporary_memory.TemporaryMemory.size"]], "update_config() (agentscope.memory.memory.memorybase method)": [[2, "agentscope.memory.memory.MemoryBase.update_config"]], "modelconfig (class in agentscope.models.config)": [[3, "agentscope.models.config.ModelConfig"]], "modelresponse (class in agentscope.models.model)": [[3, "agentscope.models.model.ModelResponse"]], "modelwrapperbase (class in agentscope.models.model)": [[3, "agentscope.models.model.ModelWrapperBase"]], "openaichatwrapper (class in agentscope.models.openai_model)": [[3, "agentscope.models.openai_model.OpenAIChatWrapper"]], "openaidallewrapper (class in agentscope.models.openai_model)": [[3, "agentscope.models.openai_model.OpenAIDALLEWrapper"]], "openaiembeddingwrapper (class in agentscope.models.openai_model)": [[3, "agentscope.models.openai_model.OpenAIEmbeddingWrapper"]], "openaiwrapper (class in agentscope.models.openai_model)": [[3, "agentscope.models.openai_model.OpenAIWrapper"]], "postapichatwrapper (class in agentscope.models.post_model)": [[3, "agentscope.models.post_model.PostAPIChatWrapper"]], "postapidallewrapper (class in agentscope.models.post_model)": [[3, "agentscope.models.post_model.PostAPIDALLEWrapper"]], "postapimodelwrapperbase (class in agentscope.models.post_model)": [[3, "agentscope.models.post_model.PostAPIModelWrapperBase"]], "agentscope.models": [[3, "module-agentscope.models"]], "agentscope.models.config": [[3, "module-agentscope.models.config"]], "agentscope.models.model": [[3, "module-agentscope.models.model"]], "agentscope.models.openai_model": [[3, "module-agentscope.models.openai_model"]], "agentscope.models.post_model": [[3, "module-agentscope.models.post_model"]], "clear_model_configs() (in module agentscope.models)": [[3, "agentscope.models.clear_model_configs"]], "embedding (agentscope.models.model.modelresponse property)": [[3, "agentscope.models.model.ModelResponse.embedding"]], "format_configs() (agentscope.models.config.modelconfig class method)": [[3, "agentscope.models.config.ModelConfig.format_configs"]], "image_urls (agentscope.models.model.modelresponse property)": [[3, "agentscope.models.model.ModelResponse.image_urls"]], "load_model_by_config_name() (in module agentscope.models)": [[3, "agentscope.models.load_model_by_config_name"]], "model_type (agentscope.models.openai_model.openaichatwrapper attribute)": [[3, "agentscope.models.openai_model.OpenAIChatWrapper.model_type"]], "model_type (agentscope.models.openai_model.openaidallewrapper attribute)": [[3, "agentscope.models.openai_model.OpenAIDALLEWrapper.model_type"]], "model_type (agentscope.models.openai_model.openaiembeddingwrapper attribute)": [[3, "agentscope.models.openai_model.OpenAIEmbeddingWrapper.model_type"]], "model_type (agentscope.models.post_model.postapichatwrapper attribute)": [[3, "agentscope.models.post_model.PostAPIChatWrapper.model_type"]], "model_type (agentscope.models.post_model.postapidallewrapper attribute)": [[3, "agentscope.models.post_model.PostAPIDALLEWrapper.model_type"]], "model_type (agentscope.models.post_model.postapimodelwrapperbase attribute)": [[3, "agentscope.models.post_model.PostAPIModelWrapperBase.model_type"]], "raw (agentscope.models.model.modelresponse property)": [[3, "agentscope.models.model.ModelResponse.raw"]], "read_model_configs() (in module agentscope.models)": [[3, "agentscope.models.read_model_configs"]], "registry (agentscope.models.model.modelwrapperbase attribute)": [[3, "agentscope.models.model.ModelWrapperBase.registry"]], "text (agentscope.models.model.modelresponse property)": [[3, "agentscope.models.model.ModelResponse.text"]], "type_registry (agentscope.models.model.modelwrapperbase attribute)": [[3, "agentscope.models.model.ModelWrapperBase.type_registry"]], "forlooppipeline (class in agentscope.pipelines.pipeline)": [[4, "agentscope.pipelines.pipeline.ForLoopPipeline"]], "ifelsepipeline (class in agentscope.pipelines.pipeline)": [[4, "agentscope.pipelines.pipeline.IfElsePipeline"]], "pipelinebase (class in agentscope.pipelines.pipeline)": [[4, "agentscope.pipelines.pipeline.PipelineBase"]], "sequentialpipeline (class in agentscope.pipelines.pipeline)": [[4, "agentscope.pipelines.pipeline.SequentialPipeline"]], "switchpipeline (class in agentscope.pipelines.pipeline)": [[4, "agentscope.pipelines.pipeline.SwitchPipeline"]], "whilelooppipeline (class in agentscope.pipelines.pipeline)": [[4, "agentscope.pipelines.pipeline.WhileLoopPipeline"]], "agentscope.pipelines.functional": [[4, "module-agentscope.pipelines.functional"]], "agentscope.pipelines.pipeline": [[4, "module-agentscope.pipelines.pipeline"]], "forlooppipeline() (in module agentscope.pipelines.functional)": [[4, "agentscope.pipelines.functional.forlooppipeline"]], "ifelsepipeline() (in module agentscope.pipelines.functional)": [[4, "agentscope.pipelines.functional.ifelsepipeline"]], "placeholder() (in module agentscope.pipelines.functional)": [[4, "agentscope.pipelines.functional.placeholder"]], "sequentialpipeline() (in module agentscope.pipelines.functional)": [[4, "agentscope.pipelines.functional.sequentialpipeline"]], "switchpipeline() (in module agentscope.pipelines.functional)": [[4, "agentscope.pipelines.functional.switchpipeline"]], "whilelooppipeline() (in module agentscope.pipelines.functional)": [[4, "agentscope.pipelines.functional.whilelooppipeline"]], "rpcagent (class in agentscope.rpc.rpc_agent_pb2_grpc)": [[5, "agentscope.rpc.rpc_agent_pb2_grpc.RpcAgent"]], "rpcagentclient (class in agentscope.rpc.rpc_agent_client)": [[5, "agentscope.rpc.rpc_agent_client.RpcAgentClient"]], "rpcagentservicer (class in agentscope.rpc.rpc_agent_pb2_grpc)": [[5, "agentscope.rpc.rpc_agent_pb2_grpc.RpcAgentServicer"]], "rpcagentstub (class in agentscope.rpc.rpc_agent_pb2_grpc)": [[5, "agentscope.rpc.rpc_agent_pb2_grpc.RpcAgentStub"]], "add_rpcagentservicer_to_server() (in module agentscope.rpc.rpc_agent_pb2_grpc)": [[5, "agentscope.rpc.rpc_agent_pb2_grpc.add_RpcAgentServicer_to_server"]], "agentscope.rpc.rpc_agent_client": [[5, "module-agentscope.rpc.rpc_agent_client"]], "agentscope.rpc.rpc_agent_pb2_grpc": [[5, "module-agentscope.rpc.rpc_agent_pb2_grpc"]], "call_func() (agentscope.rpc.rpc_agent_client.rpcagentclient method)": [[5, "agentscope.rpc.rpc_agent_client.RpcAgentClient.call_func"]], "call_func() (agentscope.rpc.rpc_agent_pb2_grpc.rpcagent static method)": [[5, "agentscope.rpc.rpc_agent_pb2_grpc.RpcAgent.call_func"]], "call_func() (agentscope.rpc.rpc_agent_pb2_grpc.rpcagentservicer method)": [[5, "agentscope.rpc.rpc_agent_pb2_grpc.RpcAgentServicer.call_func"]], "agentscope.service.code.exec_python": [[7, "module-agentscope.service.code.exec_python"]], "execute_python_code() (in module agentscope.service.code.exec_python)": [[7, "agentscope.service.code.exec_python.execute_python_code"]], "sys_python_guard() (in module agentscope.service.code.exec_python)": [[7, "agentscope.service.code.exec_python.sys_python_guard"]], "agentscope.service.file.common": [[8, "module-agentscope.service.file.common"]], "agentscope.service.file.json": [[8, "module-agentscope.service.file.json"]], "agentscope.service.file.text": [[8, "module-agentscope.service.file.text"]], "create_directory() (in module agentscope.service.file.common)": [[8, "agentscope.service.file.common.create_directory"]], "create_file() (in module agentscope.service.file.common)": [[8, "agentscope.service.file.common.create_file"]], "delete_directory() (in module agentscope.service.file.common)": [[8, "agentscope.service.file.common.delete_directory"]], "delete_file() (in module agentscope.service.file.common)": [[8, "agentscope.service.file.common.delete_file"]], "move_directory() (in module agentscope.service.file.common)": [[8, "agentscope.service.file.common.move_directory"]], "move_file() (in module agentscope.service.file.common)": [[8, "agentscope.service.file.common.move_file"]], "read_json_file() (in module agentscope.service.file.json)": [[8, "agentscope.service.file.json.read_json_file"]], "read_text_file() (in module agentscope.service.file.text)": [[8, "agentscope.service.file.text.read_text_file"]], "write_json_file() (in module agentscope.service.file.json)": [[8, "agentscope.service.file.json.write_json_file"]], "write_text_file() (in module agentscope.service.file.text)": [[8, "agentscope.service.file.text.write_text_file"]], "agentscope.service.retrieval.retrieval_from_list": [[9, "module-agentscope.service.retrieval.retrieval_from_list"]], "agentscope.service.retrieval.similarity": [[9, "module-agentscope.service.retrieval.similarity"]], "cos_sim() (in module agentscope.service.retrieval.similarity)": [[9, "agentscope.service.retrieval.similarity.cos_sim"]], "retrieve_from_list() (in module agentscope.service.retrieval.retrieval_from_list)": [[9, "agentscope.service.retrieval.retrieval_from_list.retrieve_from_list"]], "agentscope.service.sql_query.mongodb": [[10, "module-agentscope.service.sql_query.mongodb"]], "agentscope.service.sql_query.mysql": [[10, "module-agentscope.service.sql_query.mysql"]], "agentscope.service.sql_query.sqlite": [[10, "module-agentscope.service.sql_query.sqlite"]], "query_mongodb() (in module agentscope.service.sql_query.mongodb)": [[10, "agentscope.service.sql_query.mongodb.query_mongodb"]], "query_mysql() (in module agentscope.service.sql_query.mysql)": [[10, "agentscope.service.sql_query.mysql.query_mysql"]], "query_sqlite() (in module agentscope.service.sql_query.sqlite)": [[10, "agentscope.service.sql_query.sqlite.query_sqlite"]], "agentscope.service.text_processing.summarization": [[11, "module-agentscope.service.text_processing.summarization"]], "summarization() (in module agentscope.service.text_processing.summarization)": [[11, "agentscope.service.text_processing.summarization.summarization"]], "agentscope.service.web_search.search": [[12, "module-agentscope.service.web_search.search"]], "web_search() (in module agentscope.service.web_search.search)": [[12, "agentscope.service.web_search.search.web_search"]], "monitorbase (class in agentscope.utils.monitor)": [[13, "agentscope.utils.monitor.MonitorBase"]], "monitorfactory (class in agentscope.utils.monitor)": [[13, "agentscope.utils.monitor.MonitorFactory"]], "quotaexceedederror": [[13, "agentscope.utils.monitor.QuotaExceededError"]], "sqlitemonitor (class in agentscope.utils.monitor)": [[13, "agentscope.utils.monitor.SqliteMonitor"]], "add() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.add"]], "add() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.add"]], "agentscope.utils.common": [[13, "module-agentscope.utils.common"]], "agentscope.utils.logging_utils": [[13, "module-agentscope.utils.logging_utils"]], "agentscope.utils.monitor": [[13, "module-agentscope.utils.monitor"]], "agentscope.utils.token_utils": [[13, "module-agentscope.utils.token_utils"]], "agentscope.utils.tools": [[13, "module-agentscope.utils.tools"]], "chdir() (in module agentscope.utils.common)": [[13, "agentscope.utils.common.chdir"]], "clear() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.clear"]], "clear() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.clear"]], "count_openai_token() (in module agentscope.utils.token_utils)": [[13, "agentscope.utils.token_utils.count_openai_token"]], "create_tempdir() (in module agentscope.utils.common)": [[13, "agentscope.utils.common.create_tempdir"]], "exists() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.exists"]], "exists() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.exists"]], "extract_json_str() (in module agentscope.utils.tools)": [[13, "agentscope.utils.tools.extract_json_str"]], "get_full_name() (in module agentscope.utils.monitor)": [[13, "agentscope.utils.monitor.get_full_name"]], "get_metric() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.get_metric"]], "get_metric() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.get_metric"]], "get_metrics() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.get_metrics"]], "get_metrics() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.get_metrics"]], "get_monitor() (agentscope.utils.monitor.monitorfactory class method)": [[13, "agentscope.utils.monitor.MonitorFactory.get_monitor"]], "get_openai_max_length() (in module agentscope.utils.token_utils)": [[13, "agentscope.utils.token_utils.get_openai_max_length"]], "get_quota() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.get_quota"]], "get_quota() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.get_quota"]], "get_unit() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.get_unit"]], "get_unit() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.get_unit"]], "get_value() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.get_value"]], "get_value() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.get_value"]], "if_change_database() (in module agentscope.utils.common)": [[13, "agentscope.utils.common.if_change_database"]], "num_tokens_from_content() (in module agentscope.utils.token_utils)": [[13, "agentscope.utils.token_utils.num_tokens_from_content"]], "register() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.register"]], "register() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.register"]], "register_budget() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.register_budget"]], "register_budget() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.register_budget"]], "remove() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.remove"]], "remove() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.remove"]], "requests_get() (in module agentscope.utils.common)": [[13, "agentscope.utils.common.requests_get"]], "set_quota() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.set_quota"]], "set_quota() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.set_quota"]], "setup_logger() (in module agentscope.utils.logging_utils)": [[13, "agentscope.utils.logging_utils.setup_logger"]], "sqlite_cursor() (in module agentscope.utils.monitor)": [[13, "agentscope.utils.monitor.sqlite_cursor"]], "sqlite_transaction() (in module agentscope.utils.monitor)": [[13, "agentscope.utils.monitor.sqlite_transaction"]], "timer() (in module agentscope.utils.common)": [[13, "agentscope.utils.common.timer"]], "to_dialog_str() (in module agentscope.utils.tools)": [[13, "agentscope.utils.tools.to_dialog_str"]], "to_openai_dict() (in module agentscope.utils.tools)": [[13, "agentscope.utils.tools.to_openai_dict"]], "update() (agentscope.utils.monitor.monitorbase method)": [[13, "agentscope.utils.monitor.MonitorBase.update"]], "update() (agentscope.utils.monitor.sqlitemonitor method)": [[13, "agentscope.utils.monitor.SqliteMonitor.update"]], "write_file() (in module agentscope.utils.common)": [[13, "agentscope.utils.common.write_file"]]}}) \ No newline at end of file diff --git a/tutorial/101-installation.html b/tutorial/101-installation.html index 5a180d62f..22fd4a955 100644 --- a/tutorial/101-installation.html +++ b/tutorial/101-installation.html @@ -78,7 +78,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/tutorial/102-concepts.html b/tutorial/102-concepts.html index b374de77a..aa98c12f4 100644 --- a/tutorial/102-concepts.html +++ b/tutorial/102-concepts.html @@ -70,7 +70,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • @@ -127,7 +127,7 @@

    Code Structure | ├── service # Services offering functions independent of memory and state. | ├── utils # Auxiliary utilities and helper functions. | ├── message.py # Definitions and implementations of messaging between agents. -| | ├── web_ui # WebUI used to show dialogs. +| | ├── web # WebUI used to show dialogs. | ├── prompt.py # Prompt engineering module for model input. | ├── ... .. │ | ├── ... .. diff --git a/tutorial/103-example.html b/tutorial/103-example.html index 98f60b5a8..9c01b38bf 100644 --- a/tutorial/103-example.html +++ b/tutorial/103-example.html @@ -71,7 +71,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/tutorial/104-usecase.html b/tutorial/104-usecase.html index 18c83c05e..7569d5506 100644 --- a/tutorial/104-usecase.html +++ b/tutorial/104-usecase.html @@ -78,7 +78,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/tutorial/105-logging.html b/tutorial/105-logging.html index 88c9adf5f..20daac1e6 100644 --- a/tutorial/105-logging.html +++ b/tutorial/105-logging.html @@ -60,7 +60,7 @@
  • Integrating logging with WebUI
  • @@ -79,7 +79,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • @@ -169,39 +169,27 @@

    Logging a System information

    Integrating logging with WebUI

    -

    To visualize these logs, we provide a customized gradio component in src/agentscope/web_ui.

    +

    To visualize these logs and running details, AgentScope provides a simple +web interface.

    Quick Running

    -

    For convince, we provide the pre-built app in a wheel file, you can run the WebUI in the following command:

    -
    pip install gradio_groupchat-0.0.1-py3-none-any.whl
    -python app.py
    +

    You can run the WebUI in the following python code:

    +
    import agentscope
    +
    +agentscope.web.init(
    +    path_save="YOUR_SAVE_PATH"
    +)
     
    -

    After the init and entering the UI port printed by app.py, e.g., http://127.0.0.1:7860/, you can choose run.log.demo in the top-middle FileSelector window (it’s a demo log file provided by us). Then, the dialog and system log should be shown correctly in the bottom windows.

    -

    webui

    +

    By this way, you can see all the running instances and projects in http://127. 0.0.1:5000 as follows:

    +

    webui

    +

    By clicking a running instance, we can observe more details.

    +

    The running details

    -
    -

    For Other Customization

    -

    To customize the backend, or the frontend of the provided WebUI, you can

    -
    # generate the template codes
    -# for network connectivity problem, try to run
    -# `npm config rm proxy && npm config rm https-proxy` first
    -gradio cc create GroupChat --template Chatbot
    -# replace the generated app.py into our built-in app.py
    -cp -f app.py groupchat/demo
    -# debug and develop your web_ui
    -cd groupchat
    -# edit the app.py, or other parts you want, reference link:
    -# https://www.gradio.app/guides/custom-components-in-five-minutes
    -gradio cc dev
    -
    -
    -

    If you want to release the modification, you can do

    -
    gradio cc build
    -pip install <path-to-whl>
    -python app.py
    -
    -
    +
    +

    Note

    +

    The WebUI is still under development. We will provide more features and +better user experience in the future.

    [Return to the top]

    diff --git a/tutorial/201-agent.html b/tutorial/201-agent.html index 7be0c5674..bcc4546a2 100644 --- a/tutorial/201-agent.html +++ b/tutorial/201-agent.html @@ -78,7 +78,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/tutorial/202-pipeline.html b/tutorial/202-pipeline.html index 578004cf1..a3cbf354e 100644 --- a/tutorial/202-pipeline.html +++ b/tutorial/202-pipeline.html @@ -81,7 +81,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/tutorial/203-model.html b/tutorial/203-model.html index b92fee32a..efbb7c748 100644 --- a/tutorial/203-model.html +++ b/tutorial/203-model.html @@ -80,7 +80,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/tutorial/204-service.html b/tutorial/204-service.html index d4babca71..5f004d61a 100644 --- a/tutorial/204-service.html +++ b/tutorial/204-service.html @@ -74,7 +74,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/tutorial/205-memory.html b/tutorial/205-memory.html index da86c11b9..d93b95d1e 100644 --- a/tutorial/205-memory.html +++ b/tutorial/205-memory.html @@ -82,7 +82,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/tutorial/206-prompt.html b/tutorial/206-prompt.html index 64442c5f6..46574e691 100644 --- a/tutorial/206-prompt.html +++ b/tutorial/206-prompt.html @@ -77,7 +77,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/tutorial/207-monitor.html b/tutorial/207-monitor.html index fde1f83d3..6390508a2 100644 --- a/tutorial/207-monitor.html +++ b/tutorial/207-monitor.html @@ -78,7 +78,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/tutorial/208-distribute.html b/tutorial/208-distribute.html index be5e86e2d..9251c397f 100644 --- a/tutorial/208-distribute.html +++ b/tutorial/208-distribute.html @@ -84,7 +84,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/tutorial/301-community.html b/tutorial/301-community.html index cf01bd716..51ce565d4 100644 --- a/tutorial/301-community.html +++ b/tutorial/301-community.html @@ -69,7 +69,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/tutorial/302-contribute.html b/tutorial/302-contribute.html index 19383cb8f..9ac2029e5 100644 --- a/tutorial/302-contribute.html +++ b/tutorial/302-contribute.html @@ -75,7 +75,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/tutorial/advance.html b/tutorial/advance.html index 28a185b15..8d3f1654f 100644 --- a/tutorial/advance.html +++ b/tutorial/advance.html @@ -69,7 +69,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/tutorial/contribute.html b/tutorial/contribute.html index cead4587f..6df681e33 100644 --- a/tutorial/contribute.html +++ b/tutorial/contribute.html @@ -63,7 +63,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/tutorial/main.html b/tutorial/main.html index 5b2c45d8d..1caae27e1 100644 --- a/tutorial/main.html +++ b/tutorial/main.html @@ -57,7 +57,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents
  • diff --git a/tutorial/quick_start.html b/tutorial/quick_start.html index 52425adbc..37c59ad61 100644 --- a/tutorial/quick_start.html +++ b/tutorial/quick_start.html @@ -66,7 +66,7 @@
  • Service package
  • RPC package
  • Utils package
  • -
  • Web UI package
  • +
  • Web UI package
  • Module contents