createAnswerWithHttpInfo method

Future<Response> createAnswerWithHttpInfo(
  1. CreateAnswerRequest createAnswerRequest
)

Answers the specified question using the provided documents and examples. The endpoint first searches over provided documents or files to find relevant context. The relevant context is combined with the provided examples and question to create the prompt for completion.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> createAnswerWithHttpInfo(CreateAnswerRequest createAnswerRequest,) async {
  // ignore: prefer_const_declarations
  final path = r'/answers';

  // ignore: prefer_final_locals
  Object? postBody = createAnswerRequest;

  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,
  );
}