@@ -69,8 +69,8 @@ def test_minds():
6969 mind_name = 'int_test_mind_'
7070 invalid_mind_name = 'mind-123'
7171 mind_name2 = 'int_test_mind2_'
72- prompt1 = 'answer in german '
73- prompt2 = 'answer in spanish '
72+ prompt1 = 'answer in spanish '
73+ prompt2 = 'you are data expert '
7474
7575 # remove previous objects
7676 for name in (mind_name , mind_name2 ):
@@ -124,6 +124,10 @@ def test_minds():
124124 mind_list = client .minds .list ()
125125 assert len (mind_list ) > 0
126126
127+ # completion with prompt 1
128+ answer = mind .completion ('say hello' )
129+ assert 'hola' in answer .lower ()
130+
127131 # rename & update
128132 mind .update (
129133 name = mind_name2 ,
@@ -154,10 +158,6 @@ def test_minds():
154158 mind .del_datasource (ds2_cfg .name )
155159 assert len (mind .datasources ) == 1
156160
157- # completion
158- answer = mind .completion ('say hello' )
159- assert 'hola' in answer .lower ()
160-
161161 # ask about data
162162 answer = mind .completion ('what is max rental price in home rental?' )
163163 assert '5602' in answer .replace (' ' , '' ).replace (',' , '' )
@@ -176,8 +176,8 @@ def test_minds():
176176
177177 # stream completion
178178 success = False
179- for chunk in mind .completion ('say hello ' , stream = True ):
180- if 'hola ' in chunk .content .lower ():
179+ for chunk in mind .completion ('what is max rental price in home rental? ' , stream = True ):
180+ if '5602 ' in chunk .content .lower ():
181181 success = True
182182 assert success is True
183183
0 commit comments