vocode-python icon indicating copy to clipboard operation
vocode-python copied to clipboard

update transfer call to pass in the TN to transfer to

Open rjheeta opened this issue 1 year ago • 1 comments

All TransferCall action to accept to_phone as a parameter so the LLM can feed the TN to transfer to at runtime.

rjheeta avatar Mar 05 '24 21:03 rjheeta

@ajar98 Do you agree with this? Slight modification to allow LLM to pass in the phone number.

rjheeta avatar Mar 07 '24 12:03 rjheeta

@ajar98 Thanks for the feedback! If you're open to giving a bit of guidance / direction on your indicated preferred route, I'm happy to take a stab at it.

rjheeta avatar Jun 03 '24 12:06 rjheeta

@rjheeta awesome! Really excited to work with you on this -

BaseAction has a parameters_type method[0] that is usually implemented statically like this: https://github.com/vocodedev/vocode-python/blob/main/vocode/streaming/action/transfer_call.py#L37

We can override this for TransferCall to point to a TransferCallParameters that has a to_phone or not depending on self.action_config - i.e. if self.action_config.to_phone is None, then use the TransferCallParameters where to_phone is required.

[0] https://github.com/vocodedev/vocode-python/blob/main/vocode/streaming/action/base_action.py#L44-L46

ajar98 avatar Jun 03 '24 20:06 ajar98

@ajar98 Ajay, I just pushed an update. Could you have a look and advise if this is what you had in mind? Or let me know where/how I can improve it.

rjheeta avatar Jun 04 '24 01:06 rjheeta

my history got mangled. Will re-do this on new branch

rjheeta avatar Jun 14 '24 20:06 rjheeta