diff --git a/tests/test_qa.py b/tests/test_qa.py index 3b71ded..e09cb64 100644 --- a/tests/test_qa.py +++ b/tests/test_qa.py @@ -27,11 +27,11 @@ async def test_can_qa_with_async_client(async_client: AsyncClient): # Client -def test_qa(sync_client: Client): +def test_qa_from_text(sync_client: Client): # when posting a QA request with a QaRequest object request = QaRequest( query="Who likes pizza?", - documents=[Document.from_prompt(["Andreas likes pizza."])], + documents=[Document.from_text("Andreas likes pizza.")], ) response = sync_client.qa(request) diff --git a/tests/test_summarize.py b/tests/test_summarize.py index f1cbb65..eda9317 100644 --- a/tests/test_summarize.py +++ b/tests/test_summarize.py @@ -1,6 +1,7 @@ import pytest from aleph_alpha_client import Document, SummarizationRequest from aleph_alpha_client.aleph_alpha_client import AsyncClient, Client +from aleph_alpha_client.prompt import Prompt from tests.common import ( sync_client, @@ -28,7 +29,7 @@ async def test_can_summarize_with_async_client(async_client: AsyncClient): def test_summarize(sync_client: Client): # when posting a Summarization request request = SummarizationRequest( - document=Document.from_prompt(["Andreas likes pizza."]), + document=Document.from_prompt(Prompt.from_text("Andreas likes pizza.")), ) response = sync_client.summarize(request)