AssistantAgent
Bases: WiseAgent
This utility agent start a web interface and pass the user input to another agent. The web interface will be running at http://127.0.0.1:7860
Source code in wiseagents/agents/assistant.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
destination_agent_name: str
property
Get the name of the agent to send requests to.
name: str
property
Get the name of the agent.
response_delivery: Optional[Callable[[], WiseAgentMessage]]
property
Get the function to deliver the response to the client. return (Callable[[], WiseAgentMessage]): the function to deliver the response to the client
__init__(name, metadata, transport, destination_agent_name)
Initialize the agent.
Parameters: |
|
---|
Source code in wiseagents/agents/assistant.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|
__new__(*args, **kwargs)
Create a new instance of the class, setting default values for the optional instance variables.
Source code in wiseagents/agents/assistant.py
26 27 28 29 |
|
__repr__()
Return a string representation of the agent.
Source code in wiseagents/agents/assistant.py
46 47 48 49 50 51 |
|
process_error(error)
Do nothing
Source code in wiseagents/agents/assistant.py
101 102 103 |
|
process_event(event)
Do nothing
Source code in wiseagents/agents/assistant.py
97 98 99 |
|
process_request(request, conversation_history)
Process a request message by just passing it to another agent.
Parameters: |
|
---|
Returns: |
|
---|
Source code in wiseagents/agents/assistant.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
|
process_response(response)
Process a response message just sending it back to the client.
Source code in wiseagents/agents/assistant.py
89 90 91 92 93 94 95 |
|
set_response_delivery(response_delivery)
Set the function to deliver the response to the client.
Parameters: |
|
---|
Source code in wiseagents/agents/assistant.py
125 126 127 128 129 130 131 132 |
|
stop()
Do nothing
Source code in wiseagents/agents/assistant.py
105 106 107 |
|