openai/openai-dotnet

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
copilot/sub-pr-1011-another-one

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/Generated/Models/Embeddings/InternalCreateEmbeddingRequestModel.cs

46lines · modecode

1// <auto-generated/>
2
3#nullable disable
4
5using System;
6using System.ComponentModel;
7
8namespace OpenAI.Embeddings
9{
10 internal readonly partial struct InternalCreateEmbeddingRequestModel : IEquatable<InternalCreateEmbeddingRequestModel>
11 {
12 private readonly string _value;
13 private const string TextEmbeddingAda002Value = "text-embedding-ada-002";
14 private const string TextEmbedding3SmallValue = "text-embedding-3-small";
15 private const string TextEmbedding3LargeValue = "text-embedding-3-large";
16
17 public InternalCreateEmbeddingRequestModel(string value)
18 {
19 _value = value;
20 }
21
22 internal static InternalCreateEmbeddingRequestModel TextEmbeddingAda002 { get; } = new InternalCreateEmbeddingRequestModel(TextEmbeddingAda002Value);
23
24 internal static InternalCreateEmbeddingRequestModel TextEmbedding3Small { get; } = new InternalCreateEmbeddingRequestModel(TextEmbedding3SmallValue);
25
26 internal static InternalCreateEmbeddingRequestModel TextEmbedding3Large { get; } = new InternalCreateEmbeddingRequestModel(TextEmbedding3LargeValue);
27
28 public static bool operator ==(InternalCreateEmbeddingRequestModel left, InternalCreateEmbeddingRequestModel right) => left.Equals(right);
29
30 public static bool operator !=(InternalCreateEmbeddingRequestModel left, InternalCreateEmbeddingRequestModel right) => !left.Equals(right);
31
32 public static implicit operator InternalCreateEmbeddingRequestModel(string value) => new InternalCreateEmbeddingRequestModel(value);
33
34 public static implicit operator InternalCreateEmbeddingRequestModel?(string value) => value == null ? null : new InternalCreateEmbeddingRequestModel(value);
35
36 [EditorBrowsable(EditorBrowsableState.Never)]
37 public override bool Equals(object obj) => obj is InternalCreateEmbeddingRequestModel other && Equals(other);
38
39 public bool Equals(InternalCreateEmbeddingRequestModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
40
41 [EditorBrowsable(EditorBrowsableState.Never)]
42 public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
43
44 public override string ToString() => _value;
45 }
46}
47