-
-
Notifications
You must be signed in to change notification settings - Fork 6
OpenAI.Request.Set
Sub Set(KeyName As String, KeyValue As Variant)
Name | Type | Comment |
---|---|---|
KeyName | String | The name of the JSON key to add to the request. |
KeyValue | Variant | The value of the JSON key to add to the request. |
Sets the specified request parameter. The KeyName
must exactly match the parameter name used by the API, which might not match the name of property exposed by this class. For example, the NumberOfResults property corresponds to the "n"
API parameter.
The KeyValue
must be the correct type and format for the parameter.
This method allows you to set a request parameter or parameter value that cannot be set through one of this class's properties. For example, some endpoints accept either a single string value or an array of string values for the input
parameter, but the Input
class property doesn't accept string arrays. To set an array value for a request parameter, we have to use this method.
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2023-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.