modelscope / agentscope

Start building LLM-empowered multi-agent applications in an easier way.
https://doc.agentscope.io/
Apache License 2.0
4.81k stars 294 forks source link

[Bug]: RPC client functions #382

Open Harinisri29 opened 1 month ago

Harinisri29 commented 1 month ago

https://github.com/modelscope/agentscope/tree/main/src/agentscope/rpc In this repo below files are there

init.py rpc_agent.proto rpc_agent_client.py rpc_agent_pb2.py rpc_agent_pb2_grpc.py

In the rpc_agent_client.py set of functions are defined right? How can I call those? can someone help me to test any of these functions?

from agentscope.rpc.rpc_agent_client import RpcAgentClient
client = RpcAgentClient(host="localhost", port=12010)
agent_list = client.get_agent_list()
print(agent_list)

I get the below error. But my Server agent is running on that port AttributeError: 'RpcAgentClient' object has no attribute 'get_agent_list'

also for
ok = client.delete_agent(agent_id) TypeError: RpcAgentClient.delete_agent() takes 1 positional argument but 2 were given

ok = client.delete_all_agent() AttributeError: 'RpcAgentClient' object has no attribute 'delete_all_agent'. Did you mean: 'delete_agent'?

pan-x-c commented 1 month ago

You can find some examples in test_agent_server_management_funcs of tests/rpc_agent_test.py.

The wrong version of AgentScope may cause the reported error. Please reinstall AgentScope from the latest source code pip install -e .[full]