mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-06 18:40:57 +00:00
feat: Add metadata field to request and response (#4237)
This changes adds Optional metadata field to OpenAI compatible request and response object. fixes: #3564 Signed-off-by: Abhishek Bongale <abhishekbongale@outlook.com> Co-authored-by: Ashwin Bharambe <ashwin.bharambe@gmail.com>
This commit is contained in:
parent
28ff6d8659
commit
618c03405c
10 changed files with 98 additions and 0 deletions
|
|
@ -597,6 +597,7 @@ class OpenAIResponseObject(BaseModel):
|
|||
:param usage: (Optional) Token usage information for the response
|
||||
:param instructions: (Optional) System message inserted into the model's context
|
||||
:param max_tool_calls: (Optional) Max number of total calls to built-in tools that can be processed in a response
|
||||
:param metadata: (Optional) Dictionary of metadata key-value pairs
|
||||
"""
|
||||
|
||||
created_at: int
|
||||
|
|
@ -619,6 +620,7 @@ class OpenAIResponseObject(BaseModel):
|
|||
usage: OpenAIResponseUsage | None = None
|
||||
instructions: str | None = None
|
||||
max_tool_calls: int | None = None
|
||||
metadata: dict[str, str] | None = None
|
||||
|
||||
|
||||
@json_schema_type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue