hellocomputer/test/test_query.py

14 lines
443 B
Python
Raw Normal View History

2024-05-23 23:31:00 +02:00
import pytest
from hellocomputer.config import settings
from hellocomputer.models import Chat
@pytest.mark.asyncio
@pytest.mark.skipif(
settings.anyscale_api_key == "Awesome API", reason="API Key not set"
)
async def test_chat_simple():
chat = Chat(api_key=settings.anyscale_api_key, temperature=0)
chat = await chat.eval("Your're a helpful assistant", "Say literlly 'Hello'")
assert chat.last_response_content() == "Hello!"