feat: optimize icon url

This commit is contained in:
takatost
2024-09-30 17:46:31 +08:00
parent 6dfc31a542
commit e12f4009d3
7 changed files with 103 additions and 135 deletions

View File

@ -58,9 +58,9 @@ class PluginModelSchemaEntity(BaseModel):
class PluginModelProviderEntity(BaseModel):
id: str = Field(alias="ID", description="ID")
created_at: datetime = Field(alias="CreatedAt", description="The created at time of the model provider.")
updated_at: datetime = Field(alias="UpdatedAt", description="The updated at time of the model provider.")
id: str = Field(description="ID")
created_at: datetime = Field(description="The created at time of the model provider.")
updated_at: datetime = Field(description="The updated at time of the model provider.")
provider: str = Field(description="The provider of the model.")
tenant_id: str = Field(description="The tenant ID.")
plugin_unique_identifier: str = Field(description="The plugin unique identifier.")

View File

@ -6,7 +6,7 @@ class PluginAssetManager(BasePluginManager):
"""
Fetch an asset by id.
"""
response = self._request(method="GET", path=f"plugin/{tenant_id}/assets/{id}")
response = self._request(method="GET", path=f"plugin/{tenant_id}/asset/{id}")
if response.status_code != 200:
raise ValueError(f"can not found asset {id}")
return response.content