Skip to content

Commit

Permalink
adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ahartel committed Sep 27, 2023
1 parent 853dcfd commit e37027f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/test_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_summarize.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e37027f

Please sign in to comment.