openai/openai-dotnet

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
achandmsft-patch-2

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/Generated/Models/Embeddings/InternalCreateEmbeddingRequestEncodingFormat.cs

44lines · modecode

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