Class CosmosChatDataSource
Represents a data source configuration that will use an Azure CosmosDB resource.
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.AI.OpenAI.dll
Syntax
[OpenAI.CodeGenType("AzureCosmosDBChatDataSource")]
public class CosmosChatDataSource : Azure.AI.OpenAI.Chat.ChatDataSource, System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Chat.CosmosChatDataSource>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Chat.CosmosChatDataSource>
Constructors
CosmosChatDataSource()
Initializes a new instance of CosmosChatDataSource.
Declaration
[System.Obsolete("Constructors of types with required members are not supported in this version of your compiler.", true)]
public CosmosChatDataSource ();
Properties
AllowPartialResults
If set to true, the system will allow partial search results to be used and the request will fail if all partial queries fail. If not specified or specified as false, the request will fail if any search query fails.
Declaration
public Nullable<bool> AllowPartialResults { get; set; }
Property Value
System.Nullable<System.Boolean>
|
Authentication
The authentication options to use with the Azure CosmosDB data source.
Declaration
public Azure.AI.OpenAI.Chat.DataSourceAuthentication Authentication { get; set; }
Property Value
DataSourceAuthentication
|
Remarks
Azure CosmosDB data sources support any of the following options:
ContainerName
Gets the ContainerName.
Declaration
public string ContainerName { get; set; }
Property Value
System.String
|
DatabaseName
Gets the DatabaseName.
Declaration
public string DatabaseName { get; set; }
Property Value
System.String
|
FieldMappings
Gets the index field mappings.
Declaration
public Azure.AI.OpenAI.Chat.DataSourceFieldMappings FieldMappings { get; set; }
Property Value
DataSourceFieldMappings
|
Remarks
Supported field mappings for Elasticsearch data sources include:
IndexName
Gets the IndexName.
Declaration
public string IndexName { get; set; }
Property Value
System.String
|
InScope
Whether queries should be restricted to use of the indexed data.
Declaration
public Nullable<bool> InScope { get; set; }
Property Value
System.Nullable<System.Boolean>
|
MaxSearchQueries
The maximum number of rewritten queries that should be sent to the search provider for a single user message. By default, the system will make an automatic determination.
Declaration
public Nullable<int> MaxSearchQueries { get; set; }
Property Value
System.Nullable<System.Int32>
|
OutputContexts
The include_context
flags to request for an On Your Data retrieval result, which control what information
will be available on ChatMessageContext instances in the response.
Declaration
public Nullable<Azure.AI.OpenAI.Chat.DataSourceOutputContexts> OutputContexts { get; set; }
Property Value
System.Nullable<DataSourceOutputContexts>
|
Remarks
By default, intent
and citations
will be requested.
This value is provided as a bitmask flag. For example, to request intent
and all_retrieved_documents
contexts, use the bitwise OR operator by assigning
Intent | AllRetrievedDocuments
.
Strictness
The configured strictness of the search relevance filtering. Higher strictness will increase precision but lower recall of the answer.
Declaration
public Nullable<int> Strictness { get; set; }
Property Value
System.Nullable<System.Int32>
|
TopNDocuments
The configured number of documents to feature in the query.
Declaration
public Nullable<int> TopNDocuments { get; set; }
Property Value
System.Nullable<System.Int32>
|
VectorizationSource
The vectorization dependency used for embeddings.
Declaration
public Azure.AI.OpenAI.Chat.DataSourceVectorizer VectorizationSource { get; set; }
Property Value
DataSourceVectorizer
|
Remarks
Supported vectorization dependencies for Azure CosmosDB data sources include:
Methods
JsonModelCreateCore(Utf8JsonReader, ModelReaderWriterOptions)
Declaration
protected override Azure.AI.OpenAI.Chat.ChatDataSource JsonModelCreateCore (ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options);
Parameters
System.Text.Json.Utf8JsonReader
reader
The JSON reader. |
System.ClientModel.Primitives.ModelReaderWriterOptions
options
The client options for reading and writing models. |
Returns
ChatDataSource
|
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
Declaration
protected override void JsonModelWriteCore (System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options);
Parameters
System.Text.Json.Utf8JsonWriter
writer
The JSON writer. |
System.ClientModel.Primitives.ModelReaderWriterOptions
options
The client options for reading and writing models. |
PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)
Declaration
protected override Azure.AI.OpenAI.Chat.ChatDataSource PersistableModelCreateCore (BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options);
Parameters
System.BinaryData
data
The data to parse. |
System.ClientModel.Primitives.ModelReaderWriterOptions
options
The client options for reading and writing models. |
Returns
ChatDataSource
|
PersistableModelWriteCore(ModelReaderWriterOptions)
Declaration
protected override BinaryData PersistableModelWriteCore (System.ClientModel.Primitives.ModelReaderWriterOptions options);
Parameters
System.ClientModel.Primitives.ModelReaderWriterOptions
options
The client options for reading and writing models. |
Returns
System.BinaryData
|
Operators
Explicit(ClientResult to CosmosChatDataSource)
Declaration
public static explicit operator Azure.AI.OpenAI.Chat.CosmosChatDataSource (System.ClientModel.ClientResult result);
Parameters
System.ClientModel.ClientResult
result
The System.ClientModel.ClientResult to deserialize the CosmosChatDataSource from. |
Returns
CosmosChatDataSource
|
Implicit(CosmosChatDataSource to BinaryContent)
Declaration
public static implicit operator System.ClientModel.BinaryContent (Azure.AI.OpenAI.Chat.CosmosChatDataSource cosmosChatDataSource);
Parameters
CosmosChatDataSource
cosmosChatDataSource
The CosmosChatDataSource to serialize into System.ClientModel.BinaryContent. |
Returns
System.ClientModel.BinaryContent
|
Explicit Interface Implementations
IJsonModel<CosmosChatDataSource>.Create(Utf8JsonReader, ModelReaderWriterOptions)
Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.
Declaration
Azure.AI.OpenAI.Chat.CosmosChatDataSource IJsonModel<CosmosChatDataSource>.Create (ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options);
Parameters
System.Text.Json.Utf8JsonReader
reader
The System.Text.Json.Utf8JsonReader to read. |
System.ClientModel.Primitives.ModelReaderWriterOptions
options
The System.ClientModel.Primitives.ModelReaderWriterOptions to use. |
Returns
CosmosChatDataSource
A |
Exceptions
System.FormatException
If the model does not support the requested System.ClientModel.Primitives.ModelReaderWriterOptions.Format. |
IJsonModel<CosmosChatDataSource>.Write(Utf8JsonWriter, ModelReaderWriterOptions)
Writes the model to the provided System.Text.Json.Utf8JsonWriter.
Declaration
void IJsonModel<CosmosChatDataSource>.Write (System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options);
Parameters
System.Text.Json.Utf8JsonWriter
writer
The System.Text.Json.Utf8JsonWriter to write into. |
System.ClientModel.Primitives.ModelReaderWriterOptions
options
The System.ClientModel.Primitives.ModelReaderWriterOptions to use. |
Exceptions
System.FormatException
If the model does not support the requested System.ClientModel.Primitives.ModelReaderWriterOptions.Format. |
IPersistableModel<CosmosChatDataSource>.Create(BinaryData, ModelReaderWriterOptions)
Converts the provided System.BinaryData into a model.
Declaration
Azure.AI.OpenAI.Chat.CosmosChatDataSource IPersistableModel<CosmosChatDataSource>.Create (BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options);
Parameters
System.BinaryData
data
The System.BinaryData to parse. |
System.ClientModel.Primitives.ModelReaderWriterOptions
options
The System.ClientModel.Primitives.ModelReaderWriterOptions to use. |
Returns
CosmosChatDataSource
A |
Exceptions
System.FormatException
If the model does not support the requested System.ClientModel.Primitives.ModelReaderWriterOptions.Format. |
IPersistableModel<CosmosChatDataSource>.GetFormatFromOptions(ModelReaderWriterOptions)
Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.
Declaration
string IPersistableModel<CosmosChatDataSource>.GetFormatFromOptions (System.ClientModel.Primitives.ModelReaderWriterOptions options);
Parameters
System.ClientModel.Primitives.ModelReaderWriterOptions
options
The System.ClientModel.Primitives.ModelReaderWriterOptions to consider when serializing and deserializing the model. |
Returns
System.String
The format that the model uses when communicating with the serivce. |
IPersistableModel<CosmosChatDataSource>.Write(ModelReaderWriterOptions)
Writes the model into a System.BinaryData.
Declaration
BinaryData IPersistableModel<CosmosChatDataSource>.Write (System.ClientModel.Primitives.ModelReaderWriterOptions options);
Parameters
System.ClientModel.Primitives.ModelReaderWriterOptions
options
The System.ClientModel.Primitives.ModelReaderWriterOptions to use. |
Returns
System.BinaryData
A binary representation of the written model. |
Exceptions
System.FormatException
If the model does not support the requested System.ClientModel.Primitives.ModelReaderWriterOptions.Format. |