postPromptWithHttpInfo method
Create records a prompt for the caller's org and answers 201 with it.
Create records a prompt for the caller's org and answers 201 with it. A name the org already uses is NOT an error and NOT an overwrite: it appends a new version, so the library keeps real, inspectable history and the response carries the whole version list. The name is also the URL segment the prompt is fetched by, which is why its shape is constrained and a handful of names are reserved.
Note: This method returns the HTTP Response.
Parameters:
- PromptReq promptReq (required):
Implementation
Future<Response> postPromptWithHttpInfo(PromptReq promptReq,) async {
// ignore: prefer_const_declarations
final path = r'/v1/prompt';
// ignore: prefer_final_locals
Object? postBody = promptReq;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}