mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 18:00:36 +00:00
feat: add connectors implementation for static config
Signed-off-by: Jaideep Rao <jrao@redhat.com>
This commit is contained in:
parent
8a5a56f166
commit
3b1b37862e
14 changed files with 558 additions and 203 deletions
|
|
@ -13,6 +13,7 @@ from typing import Any
|
|||
|
||||
import yaml
|
||||
|
||||
from llama_stack.core.connectors.connectors import ConnectorServiceConfig, ConnectorServiceImpl
|
||||
from llama_stack.core.conversations.conversations import ConversationServiceConfig, ConversationServiceImpl
|
||||
from llama_stack.core.datatypes import Provider, SafetyConfig, StackRunConfig, VectorStoresConfig
|
||||
from llama_stack.core.distribution import get_provider_registry
|
||||
|
|
@ -39,6 +40,7 @@ from llama_stack_api import (
|
|||
Api,
|
||||
Batches,
|
||||
Benchmarks,
|
||||
Connectors,
|
||||
Conversations,
|
||||
DatasetIO,
|
||||
Datasets,
|
||||
|
|
@ -64,6 +66,7 @@ logger = get_logger(name=__name__, category="core")
|
|||
|
||||
class LlamaStack(
|
||||
Providers,
|
||||
Connectors,
|
||||
Inference,
|
||||
Agents,
|
||||
Batches,
|
||||
|
|
@ -100,6 +103,7 @@ RESOURCES = [
|
|||
),
|
||||
("benchmarks", Api.benchmarks, "register_benchmark", "list_benchmarks"),
|
||||
("tool_groups", Api.tool_groups, "register_tool_group", "list_tool_groups"),
|
||||
("connectors", Api.connectors, "register_connector", "list_connectors"),
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -372,6 +376,11 @@ def add_internal_implementations(impls: dict[Api, Any], run_config: StackRunConf
|
|||
)
|
||||
impls[Api.conversations] = conversations_impl
|
||||
|
||||
connectors_impl = ConnectorServiceImpl(
|
||||
ConnectorServiceConfig(run_config=run_config),
|
||||
)
|
||||
impls[Api.connectors] = connectors_impl
|
||||
|
||||
|
||||
def _initialize_storage(run_config: StackRunConfig):
|
||||
kv_backends: dict[str, StorageBackendConfig] = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue