openai/openai-dotnet

Public

mirrored from https://github.com/openai/openai-dotnetAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
OpenAI_2.3.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/Custom/Embeddings/EmbeddingGenerationOptions.cs

36lines · modecode

1using System;
2using System.ClientModel;
3
4namespace OpenAI.Embeddings;
5
6[CodeGenType("CreateEmbeddingRequest")]
7[CodeGenVisibility(nameof(EmbeddingGenerationOptions), CodeGenVisibility.Public)]
8[CodeGenSuppress(nameof(EmbeddingGenerationOptions), typeof(BinaryData), typeof(InternalCreateEmbeddingRequestModel))]
9public partial class EmbeddingGenerationOptions
10{
11 // CUSTOM:
12 // - Made internal. This value comes from a parameter on the client method.
13 // - Added setter.
14 [CodeGenMember("Input")]
15 internal BinaryData Input { get; set; }
16
17 // CUSTOM:
18 // - Made internal. The model is specified by the client.
19 // - Added setter.
20 [CodeGenMember("Model")]
21 internal InternalCreateEmbeddingRequestModel Model { get; set; }
22
23 // CUSTOM: Made internal. We always request the embedding as a base64-encoded string for better performance.
24 [CodeGenMember("EncodingFormat")]
25 internal InternalCreateEmbeddingRequestEncodingFormat? EncodingFormat { get; set; }
26
27 // CUSTOM: Renamed.
28 /// <summary>
29 /// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
30 /// <see href="https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids">Learn more</see>.
31 /// </summary>
32 [CodeGenMember("User")]
33 public string EndUserId { get; set; }
34
35 internal BinaryContent ToBinaryContent() => BinaryContent.Create(this, ModelSerializationExtensions.WireOptions);
36}