File size: 853 Bytes
2eafbc4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from typing import Any, Dict, List, Optional

from pydantic import BaseModel, Field

from inference.enterprise.workflows.entities.workflows_specification import (
    WorkflowSpecificationV1,
)


class WorkflowInferenceRequest(BaseModel):
    api_key: str = Field(
        description="Roboflow API Key that will be passed to the model during initialization for artifact retrieval",
    )
    inputs: Dict[str, Any] = Field(
        description="Dictionary that contains each parameter defined as an input for chosen workflow"
    )
    excluded_fields: Optional[List[str]] = Field(
        default=None,
        description="List of field that shall be excluded from the response (among those defined in workflow specification)",
    )


class WorkflowSpecificationInferenceRequest(WorkflowInferenceRequest):
    specification: WorkflowSpecificationV1