mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
Merge 3b3a2d0ceb into 91f1b352b4
This commit is contained in:
commit
62839a91d8
9 changed files with 510 additions and 229 deletions
6
tests/unit/providers/inline/agents/dana/__init__.py
Normal file
6
tests/unit/providers/inline/agents/dana/__init__.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the terms described in the LICENSE file in
|
||||
# the root directory of this source tree.
|
||||
|
||||
46
tests/unit/providers/inline/agents/dana/test_dana.py
Normal file
46
tests/unit/providers/inline/agents/dana/test_dana.py
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the terms described in the LICENSE file in
|
||||
# the root directory of this source tree.
|
||||
|
||||
"""
|
||||
Test suite for the Dana agent provider implementation (stub).
|
||||
|
||||
TODO: Add tests when implementation is complete.
|
||||
"""
|
||||
|
||||
from llama_stack.core.datatypes import Api
|
||||
from llama_stack.core.distribution import get_provider_registry
|
||||
from llama_stack.providers.inline.agents.dana.agents import DanaAgentsImpl
|
||||
from llama_stack.providers.inline.agents.dana.config import DanaAgentsImplConfig
|
||||
|
||||
|
||||
def test_dana_provider_in_registry():
|
||||
"""Test that the Dana provider is registered and can be found in the registry."""
|
||||
provider_registry = get_provider_registry()
|
||||
agents_providers = provider_registry.get(Api.agents, {})
|
||||
|
||||
# Verify the provider is in the registry
|
||||
assert "inline::dana" in agents_providers, "Dana provider should be registered"
|
||||
|
||||
provider_spec = agents_providers["inline::dana"]
|
||||
assert provider_spec.provider_type == "inline::dana"
|
||||
assert provider_spec.api == Api.agents
|
||||
assert provider_spec.module == "llama_stack.providers.inline.agents.dana"
|
||||
assert provider_spec.config_class == "llama_stack.providers.inline.agents.dana.DanaAgentsImplConfig"
|
||||
|
||||
|
||||
def test_dana_provider_config():
|
||||
"""Test that the Dana provider config can be instantiated."""
|
||||
config = DanaAgentsImplConfig.sample_run_config(__distro_dir__="test")
|
||||
assert isinstance(config, dict)
|
||||
assert "persistence" in config
|
||||
assert "agent_state" in config["persistence"]
|
||||
assert "responses" in config["persistence"]
|
||||
|
||||
|
||||
def test_dana_provider_class_exists():
|
||||
"""Test that Dana provider class exists."""
|
||||
assert DanaAgentsImpl is not None
|
||||
# TODO: Add actual tests when the provider is implemented
|
||||
Loading…
Add table
Add a link
Reference in a new issue