Share via


FileSearchTool Class

Definition

A tool that searches for relevant content from uploaded files. Learn more about the file search tool.

public class FileSearchTool : Azure.AI.AgentServer.Contracts.Generated.OpenAI.Tool, System.ClientModel.Primitives.IJsonModel<Azure.AI.AgentServer.Contracts.Generated.OpenAI.FileSearchTool>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.AgentServer.Contracts.Generated.OpenAI.FileSearchTool>
type FileSearchTool = class
    inherit Tool
    interface IUtf8JsonSerializable
    interface IJsonModel<FileSearchTool>
    interface IPersistableModel<FileSearchTool>
Public Class FileSearchTool
Inherits Tool
Implements IJsonModel(Of FileSearchTool), IPersistableModel(Of FileSearchTool)
Inheritance
FileSearchTool
Implements

Constructors

Name Description
FileSearchTool()

Initializes a new instance of FileSearchTool for deserialization.

FileSearchTool(IEnumerable<String>)

Initializes a new instance of FileSearchTool.

FileSearchTool(ToolType, IDictionary<String,BinaryData>, IList<String>, Nullable<Int32>, RankingOptions, BinaryData)

Initializes a new instance of FileSearchTool.

Properties

Name Description
Filters

A filter to apply.

To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

<remarks> Supported types:

</remarks> Examples:
  • BinaryData.FromObjectAsJson("foo"): Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""): Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }): Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"): Creates a payload of { "key": "value" }.

MaxNumResults

The maximum number of results to return. This number should be between 1 and 50 inclusive.

RankingOptions

Ranking options for search.

Type

Gets or sets the type.

(Inherited from Tool)
VectorStoreIds

The IDs of the vector stores to search.

Methods

Name Description
DeserializeFileSearchTool(JsonElement, ModelReaderWriterOptions)
FromResponse(Response)

Deserializes the model from a raw response.

JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
ToRequestContent()

Convert into a RequestContent.

Explicit Interface Implementations

Name Description
IJsonModel<FileSearchTool>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<FileSearchTool>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IJsonModel<Tool>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

(Inherited from Tool)
IJsonModel<Tool>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

(Inherited from Tool)
IPersistableModel<FileSearchTool>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<FileSearchTool>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<FileSearchTool>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

IPersistableModel<Tool>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

(Inherited from Tool)
IPersistableModel<Tool>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

(Inherited from Tool)
IPersistableModel<Tool>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

(Inherited from Tool)
IUtf8JsonSerializable.Write(Utf8JsonWriter)

Applies to