... but using the Together.AI Python library and it was successful in selecting a function and providing arguments, however if I feed the result of the function call back to try and get another response it throws an exception that it doesn't accept the role='tool' in the message.
1 validation error for ChatCompletionRequest messages.
2.role
Input should be 'assistant', 'system' or 'user' [type=enum, input_value='tool', input_type=str]
Describe the bug I tried running the function calling code from the website...
https://docs.together.ai/docs/function-calling#multi-turn-example
... but using the Together.AI Python library and it was successful in selecting a function and providing arguments, however if I feed the result of the function call back to try and get another response it throws an exception that it doesn't accept the role='tool' in the message.
Failing Line:
Exception thrown:
To Reproduce
Use the multi-turn example code here: https://docs.together.ai/docs/function-calling#multi-turn-example
Replace:
with
client = Together(api_key=os.environ.get("TOGETHER_API_KEY"))
Run it
Expected behaviour No exception is throw and the response is processed by the LLM and a response is returned.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):