Add bedrock command r models (#4521)
Co-authored-by: Justin Wu <justin.wu@ringcentral.com> Co-authored-by: Chenhe Gu <guchenhe@gmail.com>
This commit is contained in:
parent
07387e9586
commit
61f4f08744
5 changed files with 176 additions and 0 deletions
|
|
@ -17,6 +17,10 @@ class CotAgentOutputParser:
|
|||
action_name = None
|
||||
action_input = None
|
||||
|
||||
# cohere always returns a list
|
||||
if isinstance(action, list) and len(action) == 1:
|
||||
action = action[0]
|
||||
|
||||
for key, value in action.items():
|
||||
if 'input' in key.lower():
|
||||
action_input = value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue