mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-27 18:50:41 +00:00
fix: signature change to match OpenAI SDK (#2237)
This commit is contained in:
parent
b054023800
commit
558d109ab7
5 changed files with 11 additions and 11 deletions
4
docs/_static/llama-stack-spec.html
vendored
4
docs/_static/llama-stack-spec.html
vendored
|
@ -1395,7 +1395,7 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/v1/openai/v1/responses/{id}": {
|
"/v1/openai/v1/responses/{response_id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
|
@ -1427,7 +1427,7 @@
|
||||||
"description": "Retrieve an OpenAI response by its ID.",
|
"description": "Retrieve an OpenAI response by its ID.",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"name": "id",
|
"name": "response_id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"description": "The ID of the OpenAI response to retrieve.",
|
"description": "The ID of the OpenAI response to retrieve.",
|
||||||
"required": true,
|
"required": true,
|
||||||
|
|
4
docs/_static/llama-stack-spec.yaml
vendored
4
docs/_static/llama-stack-spec.yaml
vendored
|
@ -963,7 +963,7 @@ paths:
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
/v1/openai/v1/responses/{id}:
|
/v1/openai/v1/responses/{response_id}:
|
||||||
get:
|
get:
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
|
@ -986,7 +986,7 @@ paths:
|
||||||
- Agents
|
- Agents
|
||||||
description: Retrieve an OpenAI response by its ID.
|
description: Retrieve an OpenAI response by its ID.
|
||||||
parameters:
|
parameters:
|
||||||
- name: id
|
- name: response_id
|
||||||
in: path
|
in: path
|
||||||
description: >-
|
description: >-
|
||||||
The ID of the OpenAI response to retrieve.
|
The ID of the OpenAI response to retrieve.
|
||||||
|
|
|
@ -579,14 +579,14 @@ class Agents(Protocol):
|
||||||
#
|
#
|
||||||
# Both of these APIs are inherently stateful.
|
# Both of these APIs are inherently stateful.
|
||||||
|
|
||||||
@webmethod(route="/openai/v1/responses/{id}", method="GET")
|
@webmethod(route="/openai/v1/responses/{response_id}", method="GET")
|
||||||
async def get_openai_response(
|
async def get_openai_response(
|
||||||
self,
|
self,
|
||||||
id: str,
|
response_id: str,
|
||||||
) -> OpenAIResponseObject:
|
) -> OpenAIResponseObject:
|
||||||
"""Retrieve an OpenAI response by its ID.
|
"""Retrieve an OpenAI response by its ID.
|
||||||
|
|
||||||
:param id: The ID of the OpenAI response to retrieve.
|
:param response_id: The ID of the OpenAI response to retrieve.
|
||||||
:returns: An OpenAIResponseObject.
|
:returns: An OpenAIResponseObject.
|
||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
|
@ -305,9 +305,9 @@ class MetaReferenceAgentsImpl(Agents):
|
||||||
# OpenAI responses
|
# OpenAI responses
|
||||||
async def get_openai_response(
|
async def get_openai_response(
|
||||||
self,
|
self,
|
||||||
id: str,
|
response_id: str,
|
||||||
) -> OpenAIResponseObject:
|
) -> OpenAIResponseObject:
|
||||||
return await self.openai_responses_impl.get_openai_response(id)
|
return await self.openai_responses_impl.get_openai_response(response_id)
|
||||||
|
|
||||||
async def create_openai_response(
|
async def create_openai_response(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -214,9 +214,9 @@ class OpenAIResponsesImpl:
|
||||||
|
|
||||||
async def get_openai_response(
|
async def get_openai_response(
|
||||||
self,
|
self,
|
||||||
id: str,
|
response_id: str,
|
||||||
) -> OpenAIResponseObject:
|
) -> OpenAIResponseObject:
|
||||||
response_with_input = await self._get_previous_response_with_input(id)
|
response_with_input = await self._get_previous_response_with_input(response_id)
|
||||||
return response_with_input.response
|
return response_with_input.response
|
||||||
|
|
||||||
async def create_openai_response(
|
async def create_openai_response(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue