llama-stack/llama_stack/apis
Ashwin Bharambe 1a7490470a
[memory refactor][3/n] Introduce RAGToolRuntime as a specialized sub-protocol (#832)
See https://github.com/meta-llama/llama-stack/issues/827 for the broader
design.

Third part:
- we need to make `tool_runtime.rag_tool.query_context()` and
`tool_runtime.rag_tool.insert_documents()` methods work smoothly with
complete type safety. To that end, we introduce a sub-resource path
`tool-runtime/rag-tool/` and make changes to the resolver to make things
work.
- the PR updates the agents implementation to directly call these typed
APIs for memory accesses rather than going through the complex, untyped
"invoke_tool" API. the code looks much nicer and simpler (expectedly.)
- there are a number of hacks in the server resolver implementation
still, we will live with some and fix some

Note that we must make sure the client SDKs are able to handle this
subresource complexity also. Stainless has support for subresources, so
this should be possible but beware.

## Test Plan

Our RAG test is sad (doesn't actually test for actual RAG output) but I
verified that the implementation works. I will work on fixing the RAG
test afterwards.

```bash
pytest -s -v tests/agents/test_agents.py -k "rag and together" --safety-shield=meta-llama/Llama-Guard-3-8B
```
2025-01-22 10:04:16 -08:00
..
agents [memory refactor][1/n] Rename Memory -> VectorIO, MemoryBanks -> VectorDBs (#828) 2025-01-22 09:59:30 -08:00
batch_inference More idiomatic REST API (#765) 2025-01-15 13:20:09 -08:00
common add json_schema_type to ParamType deps (#808) 2025-01-17 11:02:25 -08:00
datasetio More idiomatic REST API (#765) 2025-01-15 13:20:09 -08:00
datasets More idiomatic REST API (#765) 2025-01-15 13:20:09 -08:00
eval Idiomatic REST API: Evals (#782) 2025-01-16 11:02:42 -08:00
eval_tasks More idiomatic REST API (#765) 2025-01-15 13:20:09 -08:00
inference More idiomatic REST API (#765) 2025-01-15 13:20:09 -08:00
inspect REST API fixes (#789) 2025-01-16 13:47:08 -08:00
models More idiomatic REST API (#765) 2025-01-15 13:20:09 -08:00
post_training More idiomatic REST API (#765) 2025-01-15 13:20:09 -08:00
safety More idiomatic REST API (#765) 2025-01-15 13:20:09 -08:00
scoring More idiomatic REST API (#765) 2025-01-15 13:20:09 -08:00
scoring_functions More idiomatic REST API (#765) 2025-01-15 13:20:09 -08:00
shields More idiomatic REST API (#765) 2025-01-15 13:20:09 -08:00
synthetic_data_generation [remove import *] clean up import *'s (#689) 2024-12-27 15:45:44 -08:00
telemetry Idiomatic REST API: Telemetry (#786) 2025-01-16 12:08:46 -08:00
tools [memory refactor][3/n] Introduce RAGToolRuntime as a specialized sub-protocol (#832) 2025-01-22 10:04:16 -08:00
vector_dbs [memory refactor][1/n] Rename Memory -> VectorIO, MemoryBanks -> VectorDBs (#828) 2025-01-22 09:59:30 -08:00
vector_io [memory refactor][1/n] Rename Memory -> VectorIO, MemoryBanks -> VectorDBs (#828) 2025-01-22 09:59:30 -08:00
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
datatypes.py [memory refactor][1/n] Rename Memory -> VectorIO, MemoryBanks -> VectorDBs (#828) 2025-01-22 09:59:30 -08:00
resource.py [memory refactor][1/n] Rename Memory -> VectorIO, MemoryBanks -> VectorDBs (#828) 2025-01-22 09:59:30 -08:00
version.py llama-stack version alpha -> v1 2025-01-15 05:58:09 -08:00