mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-09 11:20:58 +00:00
Make Safety test work, other cleanup
This commit is contained in:
parent
ba1f294cc6
commit
fcd22b6baa
16 changed files with 229 additions and 123 deletions
|
|
@ -85,7 +85,6 @@ class MemoryClient(Memory):
|
|||
|
||||
|
||||
async def run_main(host: str, port: int, stream: bool):
|
||||
client = MemoryClient(f"http://{host}:{port}")
|
||||
banks_client = MemoryBanksClient(f"http://{host}:{port}")
|
||||
|
||||
bank = VectorMemoryBankDef(
|
||||
|
|
@ -95,7 +94,7 @@ async def run_main(host: str, port: int, stream: bool):
|
|||
chunk_size_in_tokens=512,
|
||||
overlap_size_in_tokens=64,
|
||||
)
|
||||
await client.register_memory_bank(bank)
|
||||
await banks_client.register_memory_bank(bank)
|
||||
|
||||
retrieved_bank = await banks_client.get_memory_bank(bank.identifier)
|
||||
assert retrieved_bank is not None
|
||||
|
|
@ -130,6 +129,8 @@ async def run_main(host: str, port: int, stream: bool):
|
|||
for i, path in enumerate(files)
|
||||
]
|
||||
|
||||
client = MemoryClient(f"http://{host}:{port}")
|
||||
|
||||
# insert some documents
|
||||
await client.insert_documents(
|
||||
bank_id=bank.identifier,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue