v1.0.2 open AI support

This commit is contained in:
Tibor Bossanyi
2023-02-12 11:43:55 +01:00
parent 9782a1ca46
commit 837eda2997
5 changed files with 50 additions and 38 deletions
+19
View File
@@ -0,0 +1,19 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:workouttest_util/model/cache.dart';
import 'package:workouttest_util/service/openai_service.dart';
void main() {
setUp(() {
Cache().setLocalBaseUrl();
});
test('openai response succesful', () async {
var api = OpenAIApi();
String response = await api.getOpenAICompletion("Who wrote the song 'yellow submarine'?");
print(response);
expect(response, matches(RegExp(r'Beatles')));
});
}