meta-llama / llama-stack

Composable building blocks to build Llama Apps
MIT License
4.67k stars 599 forks source link

documentation or cookbook for meta-reference api usage #394

Open maswadkar opened 2 weeks ago

maswadkar commented 2 weeks ago

πŸš€ The feature, motivation and pitch

Hi, I have

I was successfully was able to POST http://localhost:5000/inference/chat_completion and get the response. because there is very nicely documented sample code on https://llama-stack.readthedocs.io/en/latest/getting_started/index.html

But unfortunately I was not able to do any of

Serving API agents
 POST /agents/create
 POST /agents/session/create
 POST /agents/turn/create
 POST /agents/delete
 POST /agents/session/delete
 POST /agents/session/get
 POST /agents/step/get
 POST /agents/turn/get
Serving API memory
 POST /memory/insert
 POST /memory/query
Serving API scoring
 POST /scoring/score
 POST /scoring/score_batch
Serving API scoring_functions
 GET /scoring_functions/get
 GET /scoring_functions/list
 POST /scoring_functions/register
Serving API shields
 GET /shields/get
 GET /shields/list
 POST /shields/register
Serving API telemetry
 GET /telemetry/get_trace
 POST /telemetry/log_event
Serving API inference
 POST /inference/chat_completion
 POST /inference/completion
 POST /inference/embeddings
Serving API inspect
 GET /health
 GET /providers/list
 GET /routes/list
Serving API memory_banks
 GET /memory_banks/get
 GET /memory_banks/list
 POST /memory_banks/register
Serving API datasets
 GET /datasets/get
 GET /datasets/list
 POST /datasets/register
Serving API models
 GET /models/get
 GET /models/list
 POST /models/register
Serving API datasetio
 GET /datasetio/get_rows_paginated
Serving API eval
 POST /eval/evaluate
 POST /eval/evaluate_batch
 POST /eval/job/cancel
 GET /eval/job/result
 GET /eval/job/status
Serving API safety
 POST /safety/run_shield

because there is no documentation of even a sample code or even cookbook.

Could you please guide us. this i believe would help many enthusiasts like me.

I am ready to contribute, if even information provided.

Alternatives

No response

Additional context

No response

cheesecake100201 commented 2 weeks ago

Try going into llama-stack-client-python code repo and looking into API.md documentation, you might find what you are looking for there.

JoseGuilherme1904 commented 2 weeks ago

Hi maswadkar , see: https://github.com/meta-llama/llama-stack/blob/main/docs/zero_to_hero_guide/

and

https://github.com/meta-llama/llama-stack/blob/main/docs/resources/llama-stack-spec.html

llama-stack-spec.html should be opened using a browser; here, you will find the function definitions. I'm not part of the project, but I've had the same questions, and these two links helped me a lot.

Guilherme