Skip to content

Commit 8a05a53

Browse files
authored
fix web search options; skip serializing if none (#379)
1 parent 43c744b commit 8a05a53

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

async-openai/src/types/chat.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,7 @@ pub struct CreateChatCompletionRequest {
847847

848848
/// This tool searches the web for relevant results to use in a response.
849849
/// Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat).
850+
#[serde(skip_serializing_if = "Option::is_none")]
850851
pub web_search_options: Option<WebSearchOptions>,
851852

852853
/// Deprecated in favor of `tool_choice`.

0 commit comments

Comments
 (0)