mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-31 16:01:46 +00:00
Refactored code and undid certain changes in the previous commit
This commit is contained in:
parent
862ff6c653
commit
46795b9bbf
2 changed files with 6 additions and 8 deletions
|
@ -14,8 +14,7 @@ from llama_stack.providers.tests.resolver import resolve_impls_for_test
|
||||||
from llama_stack.providers.datatypes import * # noqa: F403
|
from llama_stack.providers.datatypes import * # noqa: F403
|
||||||
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from llama_stack.providers.impls.meta_reference.agents.config import MetaReferenceAgentsImplConfig
|
from llama_stack.providers.utils.kvstore import kvstore_impl, SqliteKVStoreConfig
|
||||||
from llama_stack.providers.utils.kvstore import InmemoryKVStoreImpl, kvstore_impl
|
|
||||||
|
|
||||||
# How to run this test:
|
# How to run this test:
|
||||||
#
|
#
|
||||||
|
@ -42,9 +41,8 @@ async def agents_settings():
|
||||||
)
|
)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"impl": impls['impls'][Api.agents],
|
"impl": impls[Api.agents],
|
||||||
"memory_impl": impls['impls'][Api.memory],
|
"memory_impl": impls[Api.memory],
|
||||||
"persistence": impls['persistence'],
|
|
||||||
"common_params": {
|
"common_params": {
|
||||||
"model": "Llama3.1-8B-Instruct",
|
"model": "Llama3.1-8B-Instruct",
|
||||||
"instructions": "You are a helpful assistant.",
|
"instructions": "You are a helpful assistant.",
|
||||||
|
@ -130,7 +128,7 @@ async def test_get_agent_turns_and_steps(agents_settings, sample_messages):
|
||||||
|
|
||||||
final_event = turn_response[-1].event.payload
|
final_event = turn_response[-1].event.payload
|
||||||
turn_id = final_event.turn.turn_id
|
turn_id = final_event.turn.turn_id
|
||||||
persistence_store = await kvstore_impl(agents_settings['persistence'])
|
persistence_store = await kvstore_impl(SqliteKVStoreConfig())
|
||||||
turn = await persistence_store.get(f"session:{agent_id}:{session_id}:{turn_id}")
|
turn = await persistence_store.get(f"session:{agent_id}:{session_id}:{turn_id}")
|
||||||
response = await agents_impl.get_agents_turn(agent_id, session_id, turn_id)
|
response = await agents_impl.get_agents_turn(agent_id, session_id, turn_id)
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,8 @@ async def agents_settings():
|
||||||
)
|
)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"impl": impls['impls'][Api.agents],
|
"impl": impls[Api.agents],
|
||||||
"memory_impl": impls['impls'][Api.memory],
|
"memory_impl": impls[Api.memory],
|
||||||
"common_params": {
|
"common_params": {
|
||||||
"model": "Llama3.1-8B-Instruct",
|
"model": "Llama3.1-8B-Instruct",
|
||||||
"instructions": "You are a helpful assistant.",
|
"instructions": "You are a helpful assistant.",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue