traceloop / openllmetry

Open-source observability for your LLM application, based on OpenTelemetry
https://www.traceloop.com/openllmetry
Apache License 2.0
1.52k stars 114 forks source link

🚀 Feature: Add OpenAI support for parallel tool calls #1427

Closed achang97 closed 6 days ago

achang97 commented 1 week ago

Which component is this feature for?

OpenAI Instrumentation

🔖 Feature description

Turn function_call attribute into an array, to account for multiple/parallel function calls from OpenAI. In addition, include the tool call ID in each function object, which is used to distinguish between different function calls.

🎤 Why is this feature needed ?

Parallel function calls have been added to the OpenAI tool calling architecture.

✌️ How do you aim to achieve this?

Remove the assumption in the current implementation that there will always be exactly 1 tool call. Instead, iterate through the tool call array.

🔄️ Additional Information

No response

👀 Have you spent some time to check if this feature request has been raised before?

Are you willing to submit PR?

Yes I am willing to submit a PR!

nirga commented 6 days ago

Fixed with #1424