mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 18:49:49 +00:00
tracing for APIs
This commit is contained in:
parent
c2a4850a79
commit
af8a1fe5b3
8 changed files with 126 additions and 63 deletions
|
|
@ -16,7 +16,7 @@ from pydantic import BaseModel, Field
|
|||
|
||||
from llama_models.llama3.api.datatypes import * # noqa: F403
|
||||
from llama_stack.apis.memory_banks import * # noqa: F403
|
||||
from llama_stack.distribution.tracing import trace_protocol
|
||||
from llama_stack.distribution.tracing import trace_protocol, traced
|
||||
|
||||
|
||||
@json_schema_type
|
||||
|
|
@ -50,6 +50,7 @@ class Memory(Protocol):
|
|||
|
||||
# this will just block now until documents are inserted, but it should
|
||||
# probably return a Job instance which can be polled for completion
|
||||
@traced(input="documents")
|
||||
@webmethod(route="/memory/insert")
|
||||
async def insert_documents(
|
||||
self,
|
||||
|
|
@ -59,6 +60,7 @@ class Memory(Protocol):
|
|||
) -> None: ...
|
||||
|
||||
@webmethod(route="/memory/query")
|
||||
@traced(input="query")
|
||||
async def query_documents(
|
||||
self,
|
||||
bank_id: str,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue