Class OpenAIRequest
Inheritance
OpenAIRequest
Implements
Inherited Members
Namespace: Glitch9.AIDevKit.OpenAI
Assembly: Glitch9.AIDevKit.Provider.OpenAI.dll
Syntax
public abstract class OpenAIRequest : IJsonRequest
Properties
| Edit this page View SourceMetadata
Optional (OpenAI only). Custom metadata in key-value format (max 16 pairs). Keys: max 64 characters. Values: max 512 characters. Useful for storing additional structured data.
Declaration
[JsonProperty("metadata")]
public ServerDictionary Metadata { get; set; }
Property Value
| Type | Description |
|---|---|
| ServerDictionary |
Model
The AI model to use for the request.
Declaration
[JsonProperty("model")]
public string Model { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
N
The number of responses to generate. Defaults to 1.
Declaration
[JsonProperty("n")]
public int? N { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
SafetyIdentifier
A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers
Declaration
[JsonProperty("safety_identifier")]
public SafetyIdentifier SafetyIdentifier { get; set; }
Property Value
| Type | Description |
|---|---|
| SafetyIdentifier |
User
Optional. A unique identifier for the end user. Helps OpenAI monitor and prevent abuse.
Declaration
[Obsolete("Use SafetyIdentifier instead. 'user' is deprecated by OpenAI.")]
[JsonProperty("user")]
public SafetyIdentifier User { get; set; }
Property Value
| Type | Description |
|---|---|
| SafetyIdentifier |