openai/openai-dotnet

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
OpenAI_2.2.0-beta.2

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/Custom/Embeddings/EmbeddingGenerationOptions.cs

38lines · modecode

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