fix msg, urls

This commit is contained in:
Xi Yan 2024-11-06 13:09:04 -08:00
parent 711edb3448
commit 6b1b3d02ee
4 changed files with 9 additions and 7 deletions

View file

@ -14,10 +14,11 @@ from pydantic import BaseModel, Field
class TGIImplConfig(BaseModel):
host: str = "localhost"
port: int = 8080
protocol: str = "http"
@property
def url(self) -> str:
return f"http://{self.host}:{self.port}"
return f"{self.protocol}://{self.host}:{self.port}"
api_token: Optional[str] = Field(
default=None,