feat(multimodal): 实现本地模型管线与请求用量配置
This commit is contained in:
@@ -88,7 +88,7 @@ def build_container() -> ApplicationContainer:
|
||||
return ApplicationContainer(
|
||||
providers=providers,
|
||||
provider_factory=provider_factory,
|
||||
model_routing=ModelRoutingService(providers, provider_factory.credentials),
|
||||
model_routing=_local_model_routing(providers, provider_factory.credentials),
|
||||
credentials=credentials,
|
||||
tools=tools,
|
||||
permissions=permissions,
|
||||
@@ -99,4 +99,9 @@ def build_container() -> ApplicationContainer:
|
||||
)
|
||||
|
||||
|
||||
def _local_model_routing(providers, credentials):
|
||||
from app.local_models.runtime import LocalEmbedding, LocalSpeech
|
||||
return ModelRoutingService(providers, credentials, local_embedding=LocalEmbedding(), local_speech=LocalSpeech())
|
||||
|
||||
|
||||
container = build_container()
|
||||
|
||||
Reference in New Issue
Block a user