struct AI::OpenAI::Tools::WebSearch

Overview

Web Search tool.

Allows models to access up-to-date information from the internet and provide answers with sourced citations.

Defined in:

ai/openai/tool/openai_tools.cr

Constant Summary

ID = "openai.web_search"
NAME = "web_search"

Constructors

Instance Method Summary

Constructor Detail

def self.new(external_web_access : Bool | Nil = nil, filters : WebSearchFilters | Nil = nil, search_context_size : String | Nil = nil, user_location : UserLocation | Nil = nil) #

[View source]

Instance Method Detail

def args : Hash(String, JSON::Any) #

[View source]
def external_web_access : Bool | Nil #

Whether to use external web access for fetching live content.


[View source]
def filters : WebSearchFilters | Nil #

Filters for the search.


[View source]
def id : String #

[View source]
def name : String #

[View source]
def search_context_size : String | Nil #

Search context size: low, medium, high.


[View source]
def type : String #

[View source]
def user_location : UserLocation | Nil #

User location information for geographically relevant results.


[View source]