Skip to content

Commit

Permalink
test: create embeddings api
Browse files Browse the repository at this point in the history
  • Loading branch information
Azzeccagarbugli committed Dec 11, 2022
1 parent b3f2f7e commit 0267163
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/embeddings_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import 'package:openai_client/openai_client.dart';
import 'package:test/test.dart';

import 'test_utils.dart';

void main() {
final client = OpenAIClient(
configuration: const OpenAIConfiguration(
apiKey: '',
organizationId: '',
),
);

group('Embeddings', () {
test('Create an embedding', () async {
final req = client.embeddings.create(
model: '',
input: [''],
);

expect(
req.httpRequest,
matchHttpRequest(
method: 'POST',
path: client.embeddings.baseUrl.path,
),
);
});
});
}

0 comments on commit 0267163

Please sign in to comment.