メニュー

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Model Build

A Model Build is a trained natural language understanding model that performs intent recognition and field extraction.

Models are created asynchronously and their status can be monitored as they are built, either via the API or Status Callbacks. Once a model is built, you can query the model using the Query Resource.

All Autopilot REST API resources use the following base URL:

https://autopilot.twilio.com/v1

ModelBuild properties

Names in PHP format
accountSid
sid<AC> Not PII

The SID of the Account that created the ModelBuild resource.

dateCreated
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in RFC 2822 format.

dateUpdated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in RFC 2822 format.

assistantSid
sid<UA> Not PII

The SID of the Assistant that is the parent of the resource.

sid
sid<UG> Not PII

The unique string that we created to identify the ModelBuild resource.

status
enum:status Not PII

The status of the model build process. Can be: enqueued, building, completed, or failed

uniqueName
文字列 Not PII

An application-defined string that uniquely identifies the resource. It can be used as an alternative to the sid in the URL path to address the resource.

url
url Not PII

The absolute URL of the ModelBuild resource.

buildDuration
integer? Not PII

The time in seconds it took to build the model.

errorCode
integer? Not PII

If the status for the model build is failed, this value is a code to more information about the failure. This value will be null for all other statuses. See error code dictionary for a description of the error.

Create a ModelBuild resource

post
https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/ModelBuilds

POST'ing to the Model Build list resource starts a training process that creates a new model based on the Tasks, Samples, Field Types, and Field Values for an Assistant.

When you define new Tasks, Field Types, and Fields, you should create a new Model Build so that Twilio Autopilot can train a new model using the new data.

Similarly, whenever you have a new set of Samples you should train a new model. There is no need to create a Model Build on every new Sample. We recommend creating a new Model Build once you have finished uploading all of your samples.

Model Building is an asynchronous process that returns an HTTP 201 Created response when the Model Build is successfully enqueued for training.

Training times vary depending on the size of your dataset. You can expect longer times for larger datasets.

パラメーター
Names in None format
assistant_sid
必須
post sid_like<UA> Not PII

The SID of the Assistant that is the parent of the new resource.

status_callback
オプション
post url Not PII

The URL we should call using a POST method to send status information to your application.

unique_name
オプション
post 文字列 Not PII

An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the sid in the URL path to address the resource.

例 1
        
        
        
        
        例 2
              
              
              
              
              Specifying a unique name for your Model Builds will help you track your Assistant's machine learning models over time.

              Create a Model Build and specify a unique name

              Specifying a unique name for your Model Builds will help you track your Assistant's machine learning models over time.

              Fetch a ModelBuild resource

              GET
              https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}

              Returns the Model Build instance identified by {ModelBuildSid} or {ModelBuildUniqueName}.

              パラメーター
              Names in None format
              assistant_sid
              必須
              GET sid_like<UA> Not PII

              The SID of the Assistant that is the parent of the resource to fetch.

              sid
              必須
              GET sid_like<UG> Not PII

              The Twilio-provided string that uniquely identifies the ModelBuild resource to fetch.

              例 1
                    
                    
                    
                    

                    Read multiple ModelBuild resources

                    GET
                    https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/ModelBuilds

                    Returns a list of Model Builds for a given Assistant.

                    The list returned includes paging information.

                    パラメーター
                    Names in None format
                    assistant_sid
                    必須
                    GET sid_like<UA> Not PII

                    The SID of the Assistant that is the parent of the resources to read.

                    例 1
                          
                          
                          
                          

                          Update a ModelBuild resource

                          post
                          https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}

                          Updates the ModelBuild instance identified by {ModelBuildSid} or {ModelBuildUniqueName}.

                          パラメーター
                          Names in None format
                          assistant_sid
                          必須
                          post sid_like<UA> Not PII

                          The SID of the Assistant that is the parent of the resource to update.

                          sid
                          必須
                          post sid_like<UG> Not PII

                          The Twilio-provided string that uniquely identifies the ModelBuild resource to update.

                          unique_name
                          オプション
                          post 文字列 Not PII

                          An application-defined string that uniquely identifies the resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the sid in the URL path to address the resource.

                          例 1
                                
                                
                                
                                

                                Delete a ModelBuild resource

                                削除する
                                https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}

                                Deletes a Model Build identified by {ModelBuildSid} or {ModelBuildUniqueName}.

                                パラメーター
                                Names in None format
                                assistant_sid
                                必須
                                削除する sid_like<UA> Not PII

                                The SID of the Assistant that is the parent of the resources to delete.

                                sid
                                必須
                                削除する sid_like<UG> Not PII

                                The Twilio-provided string that uniquely identifies the ModelBuild resource to delete.

                                例 1
                                      
                                      
                                      
                                      
                                      Rate this page:

                                      ヘルプが必要ですか?

                                      誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。