Resolve merge conflicts

This commit is contained in:
Shabana Baig 2025-10-15 17:57:07 -04:00
parent 70bfe622cd
commit f4556f14c7
2 changed files with 0 additions and 15 deletions

View file

@ -123,19 +123,6 @@ class OpenAIResponsesImpl:
# Use stored messages directly and convert only new input
message_adapter = TypeAdapter(list[OpenAIMessageParam])
messages = message_adapter.validate_python(previous_response.messages)
# When managing conversation state with the previous_response_id parameter,
# the instructions used on previous turns will not be carried over in the context
previous_instructions = previous_response.instructions
if previous_instructions:
if (
isinstance(previous_instructions, str)
and previous_instructions == messages[0].content
and messages[0].role == "system"
):
# Omit instructions from previous response
del messages[0]
else:
raise ValueError("Instructions from the previous response could not be validated")
new_messages = await convert_response_input_to_chat_messages(input, previous_messages=messages)
messages.extend(new_messages)
else:

View file

@ -38,7 +38,6 @@ from llama_stack.apis.inference import (
OpenAIJSONSchema,
OpenAIResponseFormatJSONObject,
OpenAIResponseFormatJSONSchema,
OpenAISystemMessageParam,
OpenAIUserMessageParam,
)
from llama_stack.apis.tools.tools import ListToolDefsResponse, ToolDef, ToolGroups, ToolInvocationResult, ToolRuntime
@ -840,7 +839,6 @@ async def test_create_openai_response_with_previous_response_instructions(
text=OpenAIResponseText(format=OpenAIResponseTextFormat(type="text")),
input=[input_item_message],
messages=[
OpenAISystemMessageParam(content="You are a helpful assistant."),
OpenAIUserMessageParam(content="Name some towns in Ireland"),
OpenAIAssistantMessageParam(content="Galway, Longford, Sligo"),
],