Skip to content

Commit 7dc7323

Browse files
authored
Add user-location config to web-search config (#25)
# Changes - Add `WebSearchUserLocation` proto - Add `user_location` field to `WebSearch` tool
1 parent f6d4d70 commit 7dc7323

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

proto/xai/api/v1/chat.proto

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,26 @@ message WebSearch {
622622
// Enable image understanding in downstream tools (e.g. allow fetching and interpreting images).
623623
// When true, the server may add image viewing tools to the active MCP toolset.
624624
optional bool enable_image_understanding = 3;
625+
626+
// The user location to use for a preference on the search results.
627+
// Setting this will make the agentic search results more relevant to the specified location,
628+
// which is useful for geolocation-based search results refinement.
629+
optional WebSearchUserLocation user_location = 4;
630+
}
631+
632+
// The user location to use for a preference on the search results.
633+
message WebSearchUserLocation {
634+
// Two-letter ISO 3166-1 alpha-2 country code, like US, GB, etc.
635+
optional string country = 1;
636+
637+
// Free text string for the city.
638+
optional string city = 2;
639+
640+
// Free text string for the region.
641+
optional string region = 3;
642+
643+
// IANA timezone like America/Chicago, Europe/London, etc.
644+
optional string timezone = 4;
625645
}
626646

627647
message XSearch {

0 commit comments

Comments
 (0)