mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-12 12:06:04 +00:00
Fix formatting issues
This commit is contained in:
parent
41c55fac06
commit
70bfe622cd
2 changed files with 6 additions and 4 deletions
|
|
@ -127,9 +127,11 @@ class OpenAIResponsesImpl:
|
|||
# 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"):
|
||||
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:
|
||||
|
|
|
|||
|
|
@ -844,7 +844,7 @@ async def test_create_openai_response_with_previous_response_instructions(
|
|||
OpenAIUserMessageParam(content="Name some towns in Ireland"),
|
||||
OpenAIAssistantMessageParam(content="Galway, Longford, Sligo"),
|
||||
],
|
||||
instructions="You are a helpful assistant."
|
||||
instructions="You are a helpful assistant.",
|
||||
)
|
||||
mock_responses_store.get_response_object.return_value = response
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue