promptflow icon indicating copy to clipboard operation
promptflow copied to clipboard

[Feature Request]Support for tool_calls

Open M-Hietala opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. Promptflow is only supporting deprecated function calls: https://github.com/openai/openai-python/blob/0cbce3f6777fd8f137ed7445e9bc2f2aa5c9f5b4/src/openai/resources/chat/completions.py#L322C1-L322C53

Describe the solution you'd like Add support for tool_call and using functions in that context

Here is a link to the code that adds the deprecated function info to the chat completion API call parameters: https://github.com/microsoft/promptflow/blob/dfbdee0ccecdee3381930e114a5aa84c9586c3e1/src/promptflow-tools/promptflow/tools/aoai.py#L137

Also, this sample requires updating to handle the tool_calls: https://github.com/microsoft/promptflow/blob/dfbdee0ccecdee3381930e114a5aa84c9586c3e1/examples/flows/chat/use_functions_with_chat_models/run_function.py#L29

Describe alternatives you've considered

Additional context

M-Hietala avatar Apr 10 '24 19:04 M-Hietala

Hi @M-Hietala "tools"/"tool_choice" support are under testing, and hopefully may ship in a few weeks. We will let you know when it is available to have a try!

chjinche avatar Apr 11 '24 03:04 chjinche

Hi, we're sending this friendly reminder because we haven't heard back from you in 30 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 7 days of this comment, the issue will be automatically closed. Thank you!

github-actions[bot] avatar May 11 '24 21:05 github-actions[bot]