Source: client/openapi/api/AgentsApi.js

/**
 * OpenAPI definition
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */


import {ApiClient} from "../ApiClient.js";
import { SearchAgentResponse } from '../model/SearchAgentResponse.js';

/**
* Agents service.
* @module api/AgentsApi
* @version v0
*/
export class AgentsApi {

    /**
    * Constructs a new AgentsApi. 
    * @alias module:api/AgentsApi
    * @class
    * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
    * default to {@link module:ApiClient#instance} if unspecified.
    */
    constructor(apiClient) {
        this.apiClient = apiClient || ApiClient.instance;
    }



    /**
     * @return {Promise< Boolean >} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Boolean} and HTTP response
     */
    agentsEnabledWithHttpInfo() {
      let postBody = null;

      let pathParams = {
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = [];
      let contentTypes = [];
      let accepts = ['*/*'];
      let returnType = 'Boolean';
      return this.apiClient.callApi(
        '/vrspace/api/agents/enabled', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * @return {Promise< Boolean >} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Boolean}
     */
    agentsEnabled() {
      return this.agentsEnabledWithHttpInfo()
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


    /**
     * Scene agent has access to the scene of the client, so it can answer user queries from the same point of view.
     * Scene agent has access to the scene of the client, so it can answer user queries from the same point of view. Builds the   description of the visible part of the world, and uses it as the context to answer the user query (e.g. what is this, where   is that). Chat memory is bound to the client session, and number of messages memorized is configured on the server.
     * @param {String} body Question related to the scene.
     * @return {Promise< String >} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link String} and HTTP response
     */
    sceneAgentWithHttpInfo(body) {
      let postBody = body;
      // verify the required parameter 'body' is set
      if (body === undefined || body === null) {
        throw new Error("Missing the required parameter 'body' when calling sceneAgent");
      }

      let pathParams = {
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = [];
      let contentTypes = ['application/json'];
      let accepts = ['*/*'];
      let returnType = 'String';
      return this.apiClient.callApi(
        '/vrspace/api/agents/scene', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * Scene agent has access to the scene of the client, so it can answer user queries from the same point of view.
     * Scene agent has access to the scene of the client, so it can answer user queries from the same point of view. Builds the   description of the visible part of the world, and uses it as the context to answer the user query (e.g. what is this, where   is that). Chat memory is bound to the client session, and number of messages memorized is configured on the server.
     * @param {String} body Question related to the scene.
     * @return {Promise< String >} a {@link https://www.promisejs.org/|Promise}, with data of type {@link String}
     */
    sceneAgent(body) {
      return this.sceneAgentWithHttpInfo(body)
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


    /**
     * Semantic and contextual search agent.
     * Semantic and contextual search agent. It can search Sketchfab, or local database, for models that user described. Chat   memory is bound to the client session, and number of messages memorized is configured on the server.
     * @param {String} body 
     * @return {Promise< SearchAgentResponse >} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link SearchAgentResponse} and HTTP response
     */
    searchAgentWithHttpInfo(body) {
      let postBody = body;
      // verify the required parameter 'body' is set
      if (body === undefined || body === null) {
        throw new Error("Missing the required parameter 'body' when calling searchAgent");
      }

      let pathParams = {
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = [];
      let contentTypes = ['application/json'];
      let accepts = ['*/*'];
      let returnType = SearchAgentResponse;
      return this.apiClient.callApi(
        '/vrspace/api/agents/search', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * Semantic and contextual search agent.
     * Semantic and contextual search agent. It can search Sketchfab, or local database, for models that user described. Chat   memory is bound to the client session, and number of messages memorized is configured on the server.
     * @param {String} body 
     * @return {Promise< SearchAgentResponse >} a {@link https://www.promisejs.org/|Promise}, with data of type {@link SearchAgentResponse}
     */
    searchAgent(body) {
      return this.searchAgentWithHttpInfo(body)
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


}