Skip to content

Commit

Permalink
chore(doc): modify OpenAPI spec and README.md (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
goatman committed Feb 24, 2022
1 parent 3c9f861 commit 5f8300e
Show file tree
Hide file tree
Showing 4 changed files with 219 additions and 162 deletions.
84 changes: 30 additions & 54 deletions model/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,21 @@
- [DetectionOutputs](#instill.model.DetectionOutputs)
- [GetModelRequest](#instill.model.GetModelRequest)
- [HealthCheckResponse](#instill.model.HealthCheckResponse)
- [ImageRequest](#instill.model.ImageRequest)
- [ListModelRequest](#instill.model.ListModelRequest)
- [ListModelResponse](#instill.model.ListModelResponse)
- [LoadModelRequest](#instill.model.LoadModelRequest)
- [LoadModelResponse](#instill.model.LoadModelResponse)
- [ModelInfo](#instill.model.ModelInfo)
- [ModelVersion](#instill.model.ModelVersion)
- [PredictModelImageRequest](#instill.model.PredictModelImageRequest)
- [PredictModelRequest](#instill.model.PredictModelRequest)
- [UnloadModelRequest](#instill.model.UnloadModelRequest)
- [UnloadModelResponse](#instill.model.UnloadModelResponse)
- [UpdateModelInfo](#instill.model.UpdateModelInfo)
- [UpdateModelRequest](#instill.model.UpdateModelRequest)

- [CVTask](#instill.model.CVTask)
- [ModelStatus](#instill.model.ModelStatus)

- [Model](#instill.model.Model)

- [Scalar Value Types](#scalar-value-types)


Expand Down Expand Up @@ -218,56 +216,41 @@



<a name="instill.model.ListModelRequest"></a>

### ListModelRequest







<a name="instill.model.ListModelResponse"></a>
<a name="instill.model.ImageRequest"></a>

### ListModelResponse
### ImageRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| models | [ModelInfo](#instill.model.ModelInfo) | repeated | |
| url | [string](#string) | | image url |
| base64 | [string](#string) | | base 64 byte array of image content |






<a name="instill.model.LoadModelRequest"></a>
<a name="instill.model.ListModelRequest"></a>

### LoadModelRequest
### ListModelRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | |






<a name="instill.model.LoadModelResponse"></a>
<a name="instill.model.ListModelResponse"></a>

### LoadModelResponse
### ListModelResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| sizeInBytes | [uint64](#uint64) | | OPTIONAL - If nontrivial cost is involved in determining the size, return 0 here and do the sizing in the modelSize function |
| maxConcurrency | [uint32](#uint32) | | EXPERIMENTAL - Applies only if limitModelConcurrency = true was returned from runtimeStatus rpc. See RuntimeStatusResponse.limitModelConcurrency for more detail |
| models | [ModelInfo](#instill.model.ModelInfo) | repeated | |



Expand Down Expand Up @@ -313,42 +296,34 @@



<a name="instill.model.PredictModelRequest"></a>
<a name="instill.model.PredictModelImageRequest"></a>

### PredictModelRequest
### PredictModelImageRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | model name |
| version | [int32](#int32) | | model version |
| content | [bytes](#bytes) | | byte array of image content |
| contents | [ImageRequest](#instill.model.ImageRequest) | repeated | image content request |






<a name="instill.model.UnloadModelRequest"></a>
<a name="instill.model.PredictModelRequest"></a>

### UnloadModelRequest
### PredictModelRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | |






<a name="instill.model.UnloadModelResponse"></a>

### UnloadModelResponse

| name | [string](#string) | | model name |
| version | [int32](#int32) | | model version |
| content | [bytes](#bytes) | | byte array of image content |



Expand All @@ -363,8 +338,6 @@

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | |
| version | [int32](#int32) | | |
| status | [ModelStatus](#instill.model.ModelStatus) | | |
| description | [string](#string) | | |

Expand All @@ -381,14 +354,16 @@

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | |
| version | [int32](#int32) | | |
| model | [UpdateModelInfo](#instill.model.UpdateModelInfo) | | |
| update_mask | [google.protobuf.FieldMask](#google.protobuf.FieldMask) | | |








<a name="instill.model.CVTask"></a>
Expand Down Expand Up @@ -416,9 +391,9 @@
| ERROR | 2 | |









<a name="instill.model.Model"></a>
Expand All @@ -434,13 +409,13 @@
| CreateModel | [CreateModelRequest](#instill.model.CreateModelRequest) | [ModelInfo](#instill.model.ModelInfo) | |
| UpdateModel | [UpdateModelRequest](#instill.model.UpdateModelRequest) | [ModelInfo](#instill.model.ModelInfo) | |
| PredictModelByUpload | [PredictModelRequest](#instill.model.PredictModelRequest) stream | [.google.protobuf.Struct](#google.protobuf.Struct) | This method handle upload file request |
| PredictModel | [PredictModelRequest](#instill.model.PredictModelRequest) | [.google.protobuf.Struct](#google.protobuf.Struct) | This method handle request with file in body such as url/base64 encode |
| PredictModel | [PredictModelImageRequest](#instill.model.PredictModelImageRequest) | [.google.protobuf.Struct](#google.protobuf.Struct) | This method handle request with file in body such as url/base64 encode |
| ListModels | [ListModelRequest](#instill.model.ListModelRequest) | [ListModelResponse](#instill.model.ListModelResponse) | |
| GetModel | [GetModelRequest](#instill.model.GetModelRequest) | [ModelInfo](#instill.model.ModelInfo) | |
| DeleteModel | [DeleteModelRequest](#instill.model.DeleteModelRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | |
| DeleteModelVersion | [DeleteModelVersionRequest](#instill.model.DeleteModelVersionRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | |





Expand All @@ -463,3 +438,4 @@
| <a name="bool" /> bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass |
| <a name="string" /> string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
| <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |

Loading

0 comments on commit 5f8300e

Please sign in to comment.