Class ChatGptModel
OpenAI model to use with gpt-3.5-turbo model
Inheritance
object
ChatGptModel
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DotnetPrompt.LLM.OpenAI
Assembly: DotnetPrompt.LLM.OpenAI.dll
Syntax
public class ChatGptModel : BaseModel, ILargeLanguageModel
Constructors
|
Improve this Doc
View Source
ChatGptModel(string, ChatGptModelConfiguration, ILogger, IDistributedCache)
Default constructor without logging
Declaration
public ChatGptModel(string openAIApiKey, ChatGptModelConfiguration defaultModelConfiguration, ILogger logger = null, IDistributedCache cache = null)
Parameters
Type |
Name |
Description |
string |
openAIApiKey |
|
ChatGptModelConfiguration |
defaultModelConfiguration |
|
ILogger |
logger |
|
IDistributedCache |
cache |
|
Fields
|
Improve this Doc
View Source
Model
Declaration
public const string Model = "gpt-3.5-turbo"
Field Value
Properties
|
Improve this Doc
View Source
DefaultModelConfiguration
Declaration
public ChatGptModelConfiguration DefaultModelConfiguration { get; set; }
Property Value
|
Improve this Doc
View Source
LLMType
Declaration
public override string LLMType { get; }
Property Value
Overrides
|
Improve this Doc
View Source
MaxRequestTokens
Declaration
public override int MaxRequestTokens { get; }
Property Value
Overrides
|
Improve this Doc
View Source
OpenAiApiKey
Declaration
public string OpenAiApiKey { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
AsUniqueString()
Declaration
protected override string AsUniqueString()
Returns
Overrides
|
Improve this Doc
View Source
CompletionsResponseValue(ChatGptModelConfiguration)
Declaration
protected Task<Completions> CompletionsResponseValue(ChatGptModelConfiguration options)
Parameters
Returns
|
Improve this Doc
View Source
GenerateInternalAsync(IList<string>, IList<string>)
Declaration
protected override Task<ModelResult> GenerateInternalAsync(IList<string> prompts, IList<string> stop = null)
Parameters
Type |
Name |
Description |
IList<string> |
prompts |
|
IList<string> |
stop |
|
Returns
Overrides
|
Improve this Doc
View Source
ValidateJSON(string)
Declaration
public static bool ValidateJSON(string jsonString)
Parameters
Type |
Name |
Description |
string |
jsonString |
|
Returns
Implements