From 808fcd05c9e0e4dfd3336db44d84e4491960e33d Mon Sep 17 00:00:00 2001 From: andrew Date: Fri, 29 Nov 2024 17:57:35 +0300 Subject: [PATCH] update integration test --- tests/integration/test_base_flow.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/integration/test_base_flow.py b/tests/integration/test_base_flow.py index 969804d..66b659b 100644 --- a/tests/integration/test_base_flow.py +++ b/tests/integration/test_base_flow.py @@ -69,8 +69,8 @@ def test_minds(): mind_name = 'int_test_mind_' invalid_mind_name = 'mind-123' mind_name2 = 'int_test_mind2_' - prompt1 = 'answer in german' - prompt2 = 'answer in spanish' + prompt1 = 'answer in spanish' + prompt2 = 'you are data expert' # remove previous objects for name in (mind_name, mind_name2): @@ -124,6 +124,10 @@ def test_minds(): mind_list = client.minds.list() assert len(mind_list) > 0 + # completion with prompt 1 + answer = mind.completion('say hello') + assert 'hola' in answer.lower() + # rename & update mind.update( name=mind_name2, @@ -154,10 +158,6 @@ def test_minds(): mind.del_datasource(ds2_cfg.name) assert len(mind.datasources) == 1 - # completion - answer = mind.completion('say hello') - assert 'hola' in answer.lower() - # ask about data answer = mind.completion('what is max rental price in home rental?') assert '5602' in answer.replace(' ', '').replace(',', '') @@ -176,8 +176,8 @@ def test_minds(): # stream completion success = False - for chunk in mind.completion('say hello', stream=True): - if 'hola' in chunk.content.lower(): + for chunk in mind.completion('what is max rental price in home rental?', stream=True): + if '5602' in chunk.content.lower(): success = True assert success is True