class
PlaceOS::Api::ChatGPT::Plugin
- PlaceOS::Api::ChatGPT::Plugin
- PlaceOS::Api::Application
- ActionController::Base
- Reference
- Object
Included Modules
Defined in:
placeos-rest-api/controllers/chat_gpt/plugins.crConstant Summary
-
Log =
::PlaceOS::Api::Log.for(self)
-
PARSER_LIST =
["application/json"]
-
RESPONDER_LIST =
["application/json"]
-
ROUTE_RESOURCE =
"plugin"
Class Method Summary
-
.base_route
Helper for obtaining base route
-
.capabilities(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)
Helper methods for performing redirect_to calls
Macro Summary
Instance Method Summary
- #authority : PlaceOS::Model::Authority | Nil
- #authority? : PlaceOS::Model::Authority | Nil | Nil
-
#base_route(*args, **options)
Helper for obtaining base route
-
#base_route(*args, **options, &)
Helper for obtaining base route
-
#call_function(capability_id : String, function_name : String, payload : NamedTuple(function_params: String)) : NamedTuple(response: String) | RequestError
Executes functionality offered by a capability, you'll need to obtain the function schema to perform requests.
-
#capabilities : Details
obtain the list of capabilities that this API can provide, must be called if the user requests some related functionality, to abtain details of the current user such as their name and email address and the current local time of the user.
- #check_authority
-
#function_schema(capability_id : String) : Array(FunctionSchema)
if a request could benefit from a capability, obtain the list of function schemas by providing the id string
- #system_id : String
Instance methods inherited from module PlaceOS::Api::Utils::CoreHelper
driver_clearance(user : PlaceOS::Model::User | PlaceOS::Model::UserJWT)
driver_clearance
Instance methods inherited from class PlaceOS::Api::Application
bad_media_type(error) : ContentError
bad_media_type,
build_search_params(query : String = "*", limit : UInt32 = 100_u32, offset : UInt32 = 0_u32, ref : String | Nil = nil, fields : Array(String) = [] of String)
build_search_params,
invalid_param(error) : ParameterError
invalid_param,
model_validation(error) : ValidationError
model_validation,
paginate_results(elastic, query, route = base_route)
paginate_results,
request_id : String
request_id,
resource_access_forbidden(error) : Nil
resource_access_forbidden,
resource_conflict(error) : CommonError
resource_conflict,
resource_not_found(error) : CommonError
resource_not_found,
resource_requires_authentication(error) : CommonError
resource_requires_authentication,
resource_timeout(error) : CommonError
resource_timeout,
search_params : Hash(String, String | Array(String))
search_params,
search_params? : Hash(String, String | Array(String)) | Nil
search_params?,
set_collection_headers(size : Int32, content_type : String)
set_collection_headers,
set_request_id
set_request_id,
set_user_id
set_user_id,
validation_failed(error) : CommonError
validation_failed
Class methods inherited from module PlaceOS::Api::Utils::Scopes
can_scope_access?(user_token : UserJWT, scope : String, access : Access)
can_scope_access?,
can_scopes_access!(user_token : UserJWT, scopes : Enumerable(String), access : Access)
can_scopes_access!
Macros inherited from module PlaceOS::Api::Utils::Scopes
__create_scope_checks__
__create_scope_checks__,
can_scope_access?(scope, access)
can_scope_access?,
can_scopes_access!(scopes, access)
can_scopes_access!
Instance methods inherited from module PlaceOS::Api::Utils::CurrentUser
authorize! : PlaceOS::Model::UserJWT
authorize!,
check_admin
check_admin,
check_oauth_scope
check_oauth_scope,
check_support
check_support,
current_authority : PlaceOS::Model::Authority | Nil
current_authority,
current_user : PlaceOS::Model::User
current_user,
user_admin?
user_admin?,
user_support?
user_support?,
user_token : PlaceOS::Model::UserJWT
user_token
Instance methods inherited from module PlaceOS::Api::Utils::Responders
handle_execute_error(error : Driver::Proxy::RemoteDriver::Error, respond : Bool = true)
handle_execute_error,
render_error(status : HTTP::Status, message : String | Nil, **additional)
render_error
Class Method Detail
Helper methods for performing redirect_to calls
Macro Detail
Instance Method Detail
Executes functionality offered by a capability, you'll need to obtain the function schema to perform requests. Then to use this operation you'll need to provide the capability id and the function name params
obtain the list of capabilities that this API can provide, must be called if the user requests some related functionality, to abtain details of the current user such as their name and email address and the current local time of the user.
if a request could benefit from a capability, obtain the list of function schemas by providing the id string