mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 09:19:48 +00:00
commenting out compat client test because we shouldn't use that yet
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
parent
7cc8621640
commit
2e93ba1f11
1 changed files with 28 additions and 26 deletions
|
|
@ -107,17 +107,18 @@ class TestConversationResponses:
|
||||||
)
|
)
|
||||||
assert any(word in str(exc_info.value).lower() for word in ["not found", "404"])
|
assert any(word in str(exc_info.value).lower() for word in ["not found", "404"])
|
||||||
|
|
||||||
response = openai_client.responses.create(
|
#
|
||||||
model=text_model_id, input=[{"role": "user", "content": "First response"}]
|
# response = openai_client.responses.create(
|
||||||
)
|
# model=text_model_id, input=[{"role": "user", "content": "First response"}]
|
||||||
with pytest.raises(Exception) as exc_info:
|
# )
|
||||||
openai_client.responses.create(
|
# with pytest.raises(Exception) as exc_info:
|
||||||
model=text_model_id,
|
# openai_client.responses.create(
|
||||||
input=[{"role": "user", "content": "Hello"}],
|
# model=text_model_id,
|
||||||
conversation="conv_test123",
|
# input=[{"role": "user", "content": "Hello"}],
|
||||||
previous_response_id=response.id,
|
# conversation="conv_test123",
|
||||||
)
|
# previous_response_id=response.id,
|
||||||
assert "mutually exclusive" in str(exc_info.value).lower()
|
# )
|
||||||
|
# assert "mutually exclusive" in str(exc_info.value).lower()
|
||||||
|
|
||||||
def test_conversation_backward_compatibility(self, openai_client, text_model_id):
|
def test_conversation_backward_compatibility(self, openai_client, text_model_id):
|
||||||
"""Test that responses work without conversation parameter (backward compatibility)."""
|
"""Test that responses work without conversation parameter (backward compatibility)."""
|
||||||
|
|
@ -128,18 +129,19 @@ class TestConversationResponses:
|
||||||
assert response.id.startswith("resp_")
|
assert response.id.startswith("resp_")
|
||||||
assert len(response.output_text.strip()) > 0
|
assert len(response.output_text.strip()) > 0
|
||||||
|
|
||||||
def test_conversation_compat_client(self, compat_client, text_model_id):
|
# this is not ready yet
|
||||||
"""Test conversation parameter works with compatibility client."""
|
# def test_conversation_compat_client(self, compat_client, text_model_id):
|
||||||
if not hasattr(compat_client, "conversations"):
|
# """Test conversation parameter works with compatibility client."""
|
||||||
pytest.skip("compat_client does not support conversations API")
|
# if not hasattr(compat_client, "conversations"):
|
||||||
|
# pytest.skip("compat_client does not support conversations API")
|
||||||
conversation = compat_client.conversations.create()
|
#
|
||||||
response = compat_client.responses.create(
|
# conversation = compat_client.conversations.create()
|
||||||
model=text_model_id, input="Tell me a joke", conversation=conversation.id
|
# response = compat_client.responses.create(
|
||||||
)
|
# model=text_model_id, input="Tell me a joke", conversation=conversation.id
|
||||||
|
# )
|
||||||
assert response is not None
|
#
|
||||||
assert len(response.output_text.strip()) > 0
|
# assert response is not None
|
||||||
|
# assert len(response.output_text.strip()) > 0
|
||||||
conversation_items = compat_client.conversations.items.list(conversation.id)
|
#
|
||||||
assert len(conversation_items.data) >= 2
|
# conversation_items = compat_client.conversations.items.list(conversation.id)
|
||||||
|
# assert len(conversation_items.data) >= 2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue