You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: OpenAI_API/Chat/ChatEndpoint.cs
+2-2
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ public class ChatEndpoint : EndpointBase, IChatEndpoint
16
16
/// <summary>
17
17
/// This allows you to set default parameters for every request, for example to set a default temperature or max tokens. For every request, if you do not have a parameter set on the request but do have it set here as a default, the request will automatically pick up the default value.
/// Creates an ongoing chat which can easily encapsulate the conversation. This is the simplest way to use the Chat endpoint.
34
34
/// </summary>
35
35
/// <param name="defaultChatRequestArgs">Allows setting the parameters to use when calling the ChatGPT API. Can be useful for setting temperature, presence_penalty, and more. See <see href="https://platform.openai.com/docs/api-reference/chat/create">OpenAI documentation for a list of possible parameters to tweak.</see></param>
36
-
/// <returns>A <see cref="Conversation"/> which encapulates a back and forth chat betwen a user and an assistant.</returns>
36
+
/// <returns>A <see cref="Conversation"/> which encapsulates a back and forth chat between a user and an assistant.</returns>
Copy file name to clipboardexpand all lines: OpenAI_API/Chat/ChatRequest.cs
+1-1
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ public class ChatRequest
43
43
publicint?NumChoicesPerMessage{get;set;}
44
44
45
45
/// <summary>
46
-
/// Specifies where the results should stream and be returned at one time. Do not set this yourself, use the appropriate methods on <see cref="CompletionEndpoint"/> instead.
46
+
/// Specifies where the results should stream and be returned at one time. Do not set this yourself, use the appropriate methods on <see cref="OpenAI_API.Completions.CompletionEndpoint"/> instead.
Copy file name to clipboardexpand all lines: OpenAI_API/Chat/Conversation.cs
+4-4
Original file line number
Diff line number
Diff line change
@@ -49,15 +49,15 @@ public OpenAI_API.Models.Model Model
49
49
/// Creates a new conversation with ChatGPT chat
50
50
/// </summary>
51
51
/// <param name="endpoint">A reference to the API endpoint, needed for API requests. Generally should be <see cref="OpenAIAPI.Chat"/>.</param>
52
-
/// <param name="model">Optionally specify the model to use for ChatGPT requests. If not specified, used <paramref name="defaultChatRequestArgs"/>.Model or falls back to <see cref="OpenAI_API.Models.Model.ChatGPTTurbo"/></param>
52
+
/// <param name="model">Optionally specify the model to use for ChatGPT requests. If not specified, used <paramref name="defaultChatRequestArgs"/>.Model or falls back to <see cref="OpenAI_API.Models.Model.DefaultChatModel"/></param>
53
53
/// <param name="defaultChatRequestArgs">Allows setting the parameters to use when calling the ChatGPT API. Can be useful for setting temperature, presence_penalty, and more. See <see href="https://platform.openai.com/docs/api-reference/chat/create">OpenAI documentation for a list of possible parameters to tweak.</see></param>
@@ -66,9 +66,9 @@ public Conversation(ChatEndpoint endpoint, OpenAI_API.Models.Model model = null,
66
66
}
67
67
68
68
/// <summary>
69
-
/// A list of messages exchanged so far. Do not modify this list directly. Instead, use <see cref="AppendMessage(ChatMessage)"/>, <see cref="AppendUserInput(string)"/>, <see cref="AppendSystemMessage(string)"/>, or <see cref="AppendExampleChatbotOutput(string)"/>.
69
+
/// A list of messages exchanged so far. To append to this list, use <see cref="AppendMessage(ChatMessage)"/>, <see cref="AppendUserInput(string)"/>, <see cref="AppendSystemMessage(string)"/>, or <see cref="AppendExampleChatbotOutput(string)"/>.
Copy file name to clipboardexpand all lines: OpenAI_API/Chat/IChatEndpoint.cs
+1-1
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ public interface IChatEndpoint
19
19
/// Creates an ongoing chat which can easily encapsulate the conversation. This is the simplest way to use the Chat endpoint.
20
20
/// </summary>
21
21
/// <param name="defaultChatRequestArgs">Allows setting the parameters to use when calling the ChatGPT API. Can be useful for setting temperature, presence_penalty, and more. See <see href="https://platform.openai.com/docs/api-reference/chat/create">OpenAI documentation for a list of possible parameters to tweak.</see></param>
22
-
/// <returns>A <see cref="Conversation"/> which encapulates a back and forth chat betwen a user and an assistant.</returns>
22
+
/// <returns>A <see cref="Conversation"/> which encapsulates a back and forth chat between a user and an assistant.</returns>
Copy file name to clipboardexpand all lines: OpenAI_API/Completions/CompletionRequest.cs
+1-1
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ public class CompletionRequest
13
13
/// ID of the model to use. You can use <see cref="ModelsEndpoint.GetModelsAsync()"/> to see all of your available models, or use a standard model like <see cref="Model.DavinciText"/>.
Copy file name to clipboardexpand all lines: OpenAI_API/Images/ImageGenerationRequest.cs
+107-7
Original file line number
Diff line number
Diff line change
@@ -7,22 +7,40 @@
7
7
8
8
namespaceOpenAI_API.Images
9
9
{
10
-
/// <summary>
10
+
/// <summary>
11
11
/// Represents a request to the Images API. Mostly matches the parameters in <see href="https://platform.openai.com/docs/api-reference/images/create">the OpenAI docs</see>, although some have been renamed or expanded into single/multiple properties for ease of use.
12
12
/// </summary>
13
-
publicclassImageGenerationRequest
14
-
{
13
+
publicclassImageGenerationRequest
14
+
{
15
+
privateint?numOfImages=1;
16
+
privateImageSizesize=ImageSize._1024;
17
+
privatestringquality="standard";
18
+
15
19
/// <summary>
16
20
/// A text description of the desired image(s). The maximum length is 1000 characters.
17
21
/// </summary>
18
22
[JsonProperty("prompt")]
19
23
publicstringPrompt{get;set;}
20
24
21
25
/// <summary>
22
-
/// How many different choices to request for each prompt. Defaults to 1.
26
+
/// How many different choices to request for each prompt. Defaults to 1. Only for DALL-E 2. For DALL-E 3, only 1 is allowed.
thrownewArgumentException("For DALL-E 2, only 256x256, 512x512, or 1024x1024 is allowed.");
63
+
returnsize;
64
+
}
65
+
set=>size=value;
66
+
}
67
+
68
+
/// <summary>
69
+
/// By default, images are generated at `standard` quality, but when using DALL·E 3 you can set quality to `hd` for enhanced detail. Square, standard quality images are the fastest to generate.
thrownewArgumentException("Quality must be either 'standard' or 'hd'.");
94
+
}
95
+
}
96
+
}
38
97
39
98
/// <summary>
40
99
/// The format in which the generated images are returned. Must be one of url or b64_json. Defaults to Url.
@@ -50,6 +109,47 @@ public ImageGenerationRequest()
50
109
51
110
}
52
111
112
+
/// <summary>
113
+
/// Creates a new <see cref="ImageGenerationRequest"/> with the specified parameters
114
+
/// </summary>
115
+
/// <param name="prompt">A text description of the desired image(s). The maximum length is 1000 characters.</param>
116
+
/// <param name="model">The model to use for this request. Defaults to DALL-E 2.</param>
117
+
/// <param name="size">The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024.</param>
118
+
/// <param name="quality">By default, images are generated at `standard` quality, but when using DALL·E 3 you can set quality to `hd` for enhanced detail.</param>
119
+
/// <param name="user">A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.</param>
120
+
/// <param name="responseFormat">The format in which the generated images are returned. Must be one of url or b64_json.</param>
0 commit comments