Elffuss BraidHub

kikocis/llama-stack public

566afbf5da2b · 782 BRawPermalink
1# Copyright (c) Meta Platforms, Inc. and affiliates.
2# All rights reserved.
3#
4# This source code is licensed under the terms described in the LICENSE file in
5# the root directory of this source tree.
6
7from typing import Dict
8
9from llama_stack.distribution.datatypes import Api, ProviderSpec
10
11from .config import MetaReferenceImplConfig
12
13
14async def get_provider_impl(
15 config: MetaReferenceImplConfig, deps: Dict[Api, ProviderSpec]
16):
17 from .agents import MetaReferenceAgentsImpl
18
19 assert isinstance(
20 config, MetaReferenceImplConfig
21 ), f"Unexpected config type: {type(config)}"
22
23 impl = MetaReferenceAgentsImpl(
24 config,
25 deps[Api.inference],
26 deps[Api.memory],
27 deps[Api.safety],
28 )
29 await impl.initialize()
30 return impl