You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/parallel.md
+77-34Lines changed: 77 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,58 +5,101 @@ description: Learn about OpenAI's experimental parallel function calling to redu
5
5
6
6
# Parallel Tools
7
7
8
-
One of the latest capabilities that OpenAI has recently introduced is parallel function calling.
9
-
To learn more you can read up on [this](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
8
+
Parallel Tool Calling is a feature that allows you to call multiple functions in a single request. This makes it faster to get a response from the language model, especially if your tool calls are independent of each other.
10
9
11
10
!!! warning "Experimental Feature"
12
11
13
-
This feature is currently in preview and is subject to change. only supported by the `gpt-4-turbo-preview` model.
12
+
Parallel tool calling is only supported by Gemini and OpenAI at the moment
14
13
15
14
## Understanding Parallel Function Calling
16
15
17
16
By using parallel function callings that allow you to call multiple functions in a single request, you can significantly reduce the latency of your application without having to use tricks with now one builds a schema.
1. Set the mode to `PARALLEL_TOOLS` to enable parallel function calling.
62
105
2. Set the response model to `Iterable[Weather | GoogleSearch]` to indicate that the response will be a list of `Weather` and `GoogleSearch` objects. This is necessary because the response will be a list of objects, and we need to specify the types of the objects in the list.
0 commit comments