Skip to content

[QUESTION] How to set allowed_domains in web search tool #710

@webwarrior06

Description

@webwarrior06

I am trying to use web search. But I am unable to find a strongly-typed usage of "allowed_domains" property which is available on the API now.

One alternative would be to use BinaryContent for all the request body. But I would like to see a standalone solution to this. And I wonder if it is possible to tweak only relevant tool from a BinaryContent?

This is dynamic representation of the web search tool:
tools=[ { "type": "web_search", "filters": { "allowed_domains": [ "mywebsite.com" ] }, "search_context_size": "medium", "user_location": { "type": "approximate", "city": null, "country": null, "region": null, "timezone": null } } ]

Metadata

Metadata

Assignees

Labels

area: responsesThis item is related to Responsesissue-addressedWorkflow: The OpenAI maintainers believe the issue to be addressed and ready to close.questionCategory: The issue is seeking information about the library or its usage.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions