painless
03/05/2024, 3:24 AMChaoyu
03/05/2024, 3:25 AMpainless
03/05/2024, 3:27 AMclass AdsGenerationParams(BaseModel):
prompt: str = Field(description="The prompt text")
industry: str = Field(description="The industry the company belongs to")
target_audience: str = Field(description="Target audience for the advertisement")
temperature: float = Field(default=0.0, description="A sampling temperature between 0 and 2")
@bentoml.service(
resources={"cpu": "1", "memory": "500MiB"},
traffic={"timeout": 30},
)
class point:
def __init__(self) -> None:
@bentoml.api(route="/v1/test")
def generate(self, params: AdsGenerationParams) -> str:
return "tttttttttttt"painless
03/05/2024, 3:49 AM