ai-jail
다중 OS 샌드박스로 AI 에이전트를 제한된 환경에서 실행, 완전 안전은 아니지만 충분히 안전
메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗This package provides an API for the MaxMind minFraud web services.
We recommend installing this package with Composer.
To download Composer, run in the root directory of your project:
curl -sS https://getcomposer.org/installer | php
You should now have the file composer.phar in your project directory.
Run in your project root:
php composer.phar require maxmind/minfraud:^3.7.0
You should now have the files composer.json and composer.lock as well as
the directory vendor in your project directory. If you use a version control
system, composer.json should be added to it.
After installing the dependencies, you need to require the Composer autoloader from your code:
require 'vendor/autoload.php';
Although we strongly recommend using Composer, we also provide a phar archive containing most of the dependencies for this API. The latest phar archive is available on our releases page.
Please note that you must have the PHP
cURL extension installed to use
this archive. For Debian based distributions, this can typically be found in
the php-curl package. For other operating systems, please consult the
relevant documentation. After installing the extension you may need to restart
your web server.
If you are missing this extension, you will see errors like the following:
PHP Fatal error: Uncaught Error: Call to undefined function MaxMind\WebService\curl_version()
To use the archive, just require it from your script:
require 'minfraud.phar';
More detailed API documentation is available on our GitHub Page under the "API" tab.
This library provides access to both the minFraud (Score, Insights and Factors) and Report Transaction APIs.
To use the minFraud API, create a new \MaxMind\MinFraud object. The
constructor takes your MaxMind account ID, license key, and an optional
options array as arguments. This object is immutable. See the API
documentation for the possible options.
For instance, to use the Sandbox web service instead of the production web service, you can provide the host option:
$mf = new MinFraud(1, 'ABCD567890', [ 'host' => 'sandbox.maxmind.com' ]);
Build up the request using the ->with* methods as shown below. Each method
call returns a new object. The previous object is not modified.
If there is a validation error in the data passed to a ->with* method, an
exception in the \MaxMind\Exception namespace will be thrown. This
validation can be disabled by setting validateInput to false in the
options array for \MaxMind\MinFraud, but it is recommended that you keep it
on at least through development as it will help ensure that you are sending
valid data to the web service.
A value with the wrong type in an array argument, such as an array where a
string is expected, is always rejected, except in custom inputs.
After creating the request object, send a Score request by calling
->score(), an Insights request by calling ->insights(), or a Factors
request by calling ->factors(). If the request succeeds, a model object will
be returned for the endpoint. If the request fails, an exception will be
thrown.
See the API documentation for more details.
All externally visible exceptions are in the \MaxMind\Exception namespace.
The possible exceptions are:
InvalidInputException - This will be thrown when a ->with* method is
called with invalid input data.AuthenticationException - This will be thrown on calling ->score(),
->insights(), or ->factors() when the server is unable to authenticate
the request, e.g., if the license key or account ID is invalid.InsufficientFundsException - This will be thrown on calling ->score(),
->insights(), or ->factors() when your account is out of funds.InvalidRequestException - This will be thrown on calling ->score(),
->insights(), or ->factors() when the server rejects the request for
another reason such as invalid JSON in the POST.HttpException - This will be thrown on calling ->score(),
->insights(), or ->factors() when an unexpected HTTP error occurs such
as a firewall interfering with the request to the server.WebServiceException - This will be thrown on calling ->score(),
->insights(), or ->factors() when some other error occurs. This also
serves as the base class for the above exceptions.여기까지가 README 앞부분입니다. 나머지는 원문에서 읽을 수 있습니다. README 전문 보기 ↗