feat: optimize performance (#1928)
This commit is contained in:
parent
5a756ca981
commit
3fa5204b0c
5 changed files with 215 additions and 75 deletions
|
|
@ -30,6 +30,10 @@ class ModelProviderExtension(BaseModel):
|
|||
class ModelProviderFactory:
|
||||
model_provider_extensions: dict[str, ModelProviderExtension] = None
|
||||
|
||||
def __init__(self) -> None:
|
||||
# for cache in memory
|
||||
self.get_providers()
|
||||
|
||||
def get_providers(self) -> list[ProviderEntity]:
|
||||
"""
|
||||
Get all providers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue