fix user implemented agent types
This commit is contained in:
parent
37b5ffd674
commit
40a94f94be
2 changed files with 8 additions and 6 deletions
|
|
@ -1,11 +1,11 @@
|
|||
from vocode.user_implemented_agent.restful_agent import RESTfulAgent
|
||||
from vocode.user_implemented_agent.websocket_agent import WebSocketAgent
|
||||
|
||||
class EchoAgent(RESTfulAgent):
|
||||
class EchoAgent(WebSocketAgent):
|
||||
|
||||
async def respond(self, input: str) -> str:
|
||||
return input
|
||||
|
||||
if __name__ == "__main__":
|
||||
agent = EchoAgent()
|
||||
agent.run()
|
||||
agent.run()
|
||||
|
|
|
|||
|
|
@ -44,8 +44,9 @@ class RESTfulUserImplementedAgentConfig(AgentConfig, type=AgentType.RESTFUL_USER
|
|||
method: str = "POST"
|
||||
|
||||
respond: EndpointConfig
|
||||
generate_response: Optional[EndpointConfig]
|
||||
update_last_bot_message_on_cut_off: Optional[EndpointConfig]
|
||||
generate_responses: bool = False
|
||||
# generate_response: Optional[EndpointConfig]
|
||||
# update_last_bot_message_on_cut_off: Optional[EndpointConfig]
|
||||
|
||||
class RESTfulAgentInput(BaseModel):
|
||||
human_input: str
|
||||
|
|
@ -58,8 +59,9 @@ class WebSocketUserImplementedAgentConfig(AgentConfig, type=AgentType.WEBSOCKET_
|
|||
url: str
|
||||
|
||||
respond: RouteConfig
|
||||
generate_response: Optional[RouteConfig]
|
||||
send_message_on_cut_off: bool = False
|
||||
generate_responses: bool = False
|
||||
# generate_response: Optional[RouteConfig]
|
||||
# send_message_on_cut_off: bool = False
|
||||
|
||||
class WebSocketAgentMessageType(str, Enum):
|
||||
AGENT_BASE = 'agent_base'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue