with { "prompt": "rrrr", "industry": "tttt", ...
# ask-for-help
p
with { "prompt": "rrrr", "industry": "tttt", "target_audience": "ooo", "temperature": 0.1 }
c
could you share the service code and client code used for the test?
p
class 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"
I see. My request is not named params.
👍 1