mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-29 07:14:20 +00:00
fix memory router naming
This commit is contained in:
parent
28065ca53a
commit
e0ad4fb99c
3 changed files with 52 additions and 41 deletions
|
@ -81,16 +81,18 @@ def configure_api_providers(
|
|||
except Exception:
|
||||
existing = None
|
||||
cfg = prompt_for_config(config_type, existing)
|
||||
config.api_providers[api_str] = GenericProviderConfig(
|
||||
provider_id=p,
|
||||
config=cfg.dict(),
|
||||
)
|
||||
|
||||
if api_str in router_api2builtin_api:
|
||||
# a routing api, we need to assign it a routing_key and put it in the routing_table
|
||||
# a routing api, we need to infer and assign it a routing_key and put it in the routing_table
|
||||
routing_key = prompt(
|
||||
"> Enter routing key for the {} provider: ".format(api_str),
|
||||
)
|
||||
config.routing_table[]
|
||||
else:
|
||||
config.api_providers[api_str] = GenericProviderConfig(
|
||||
provider_id=p,
|
||||
config=cfg.dict(),
|
||||
)
|
||||
|
||||
print("")
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ class MemoryRouter(Memory):
|
|||
url: Optional[URL] = None,
|
||||
) -> MemoryBank:
|
||||
bank_type = config.type
|
||||
provider = await self.routing_table.get_provider_impl(
|
||||
bank_type
|
||||
).create_memory_bank(name, config, url)
|
||||
bank = await self.routing_table.get_provider_impl(bank_type).create_memory_bank(
|
||||
name, config, url
|
||||
)
|
||||
self.bank_id_to_type[bank.bank_id] = bank_type
|
||||
return bank
|
||||
|
||||
|
|
|
@ -13,38 +13,47 @@ api_providers:
|
|||
telemetry:
|
||||
provider_id: meta-reference
|
||||
config: {}
|
||||
safety:
|
||||
provider_id: meta-reference
|
||||
config:
|
||||
llama_guard_shield:
|
||||
model: Llama-Guard-3-8B
|
||||
excluded_categories: []
|
||||
disable_input_check: false
|
||||
disable_output_check: false
|
||||
prompt_guard_shield:
|
||||
model: Prompt-Guard-86M
|
||||
agents:
|
||||
provider_id: meta-reference
|
||||
config: {}
|
||||
provider_routing_table:
|
||||
inference:
|
||||
- routing_key: Meta-Llama3.1-8B-Instruct
|
||||
provider_id: meta-reference
|
||||
config:
|
||||
model: Meta-Llama3.1-8B-Instruct
|
||||
quantization: null
|
||||
torch_seed: null
|
||||
max_seq_len: 4096
|
||||
max_batch_size: 1
|
||||
- routing_key: Meta-Llama3.1-8B
|
||||
provider_id: meta-reference
|
||||
config:
|
||||
model: Meta-Llama3.1-8B
|
||||
quantization: null
|
||||
torch_seed: null
|
||||
max_seq_len: 4096
|
||||
max_batch_size: 1
|
||||
memory:
|
||||
- routing_key: vector
|
||||
provider_id: meta-reference
|
||||
config: {}
|
||||
config:
|
||||
persistence_store:
|
||||
namespace: null
|
||||
type: sqlite
|
||||
db_path: /home/xiyan/.llama/runtime/kvstore.db
|
||||
routing_tables:
|
||||
models:
|
||||
entries:
|
||||
- routing_key: Meta-Llama3.1-8B-Instruct
|
||||
provider_id: meta-reference
|
||||
config:
|
||||
model: Meta-Llama3.1-8B-Instruct
|
||||
quantization: null
|
||||
torch_seed: null
|
||||
max_seq_len: 4096
|
||||
max_batch_size: 1
|
||||
- routing_key: Meta-Llama3.1-8B
|
||||
provider_id: meta-reference
|
||||
config:
|
||||
model: Meta-Llama3.1-8B
|
||||
quantization: null
|
||||
torch_seed: null
|
||||
max_seq_len: 4096
|
||||
max_batch_size: 1
|
||||
memory_banks:
|
||||
entries:
|
||||
- routing_key: vector
|
||||
provider_id: meta-reference
|
||||
config: {}
|
||||
shields:
|
||||
entries:
|
||||
- routing_key: llama_guard_shield
|
||||
provider_id: meta-reference
|
||||
config:
|
||||
model: Llama-Guard-3-8B
|
||||
excluded_categories: []
|
||||
disable_input_check: false
|
||||
disable_output_check: false
|
||||
- routing_key: prompt_guard_shield
|
||||
provider_id: meta-reference
|
||||
config:
|
||||
model: Prompt-Guard-86M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue