@@ -69,8 +69,8 @@ def test_minds():
69
69
mind_name = 'int_test_mind_'
70
70
invalid_mind_name = 'mind-123'
71
71
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 '
74
74
75
75
# remove previous objects
76
76
for name in (mind_name , mind_name2 ):
@@ -124,6 +124,10 @@ def test_minds():
124
124
mind_list = client .minds .list ()
125
125
assert len (mind_list ) > 0
126
126
127
+ # completion with prompt 1
128
+ answer = mind .completion ('say hello' )
129
+ assert 'hola' in answer .lower ()
130
+
127
131
# rename & update
128
132
mind .update (
129
133
name = mind_name2 ,
@@ -154,10 +158,6 @@ def test_minds():
154
158
mind .del_datasource (ds2_cfg .name )
155
159
assert len (mind .datasources ) == 1
156
160
157
- # completion
158
- answer = mind .completion ('say hello' )
159
- assert 'hola' in answer .lower ()
160
-
161
161
# ask about data
162
162
answer = mind .completion ('what is max rental price in home rental?' )
163
163
assert '5602' in answer .replace (' ' , '' ).replace (',' , '' )
@@ -176,8 +176,8 @@ def test_minds():
176
176
177
177
# stream completion
178
178
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 ():
181
181
success = True
182
182
assert success is True
183
183
0 commit comments