openai-api-mock 0.1.17 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main.test.js +1 -1
- package/package.json +2 -1
- package/readme.md +8 -1
package/main.test.js
CHANGED
|
@@ -20,7 +20,7 @@ describe('Mock OpenAI Chat & Image generation API', () => {
|
|
|
20
20
|
{ role: 'user', content: "Suggest at least 5 recipes" },
|
|
21
21
|
]
|
|
22
22
|
});
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
expect(response).toHaveProperty('id');
|
|
25
25
|
expect(response).toHaveProperty('object', 'chat.completion');
|
|
26
26
|
expect(response).toHaveProperty('created');
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openai-api-mock",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "A Node.js module for mocking OpenAI API responses in a development environment",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/chihebnabil/openai-api-mock.git"
|
|
8
8
|
},
|
|
9
|
+
"type": "module",
|
|
9
10
|
"keywords": [
|
|
10
11
|
"openai",
|
|
11
12
|
"mock",
|
package/readme.md
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
# OpenAI API Mock
|
|
2
2
|
|
|
3
3
|
This is a Node.js module for mocking OpenAI API responses in a development environment.
|
|
4
|
+
|
|
4
5
|
It's useful for testing and development purposes when you don't want to make actual API calls.
|
|
5
|
-
The module also supports mocking function_calling
|
|
6
6
|
|
|
7
|
+
The module supports the following OpenAI API endpoints:
|
|
8
|
+
- chat completions
|
|
9
|
+
- chat completions with streaming
|
|
10
|
+
- chat completions with functions
|
|
11
|
+
- image generations
|
|
12
|
+
|
|
13
|
+
> This module is powering the sandbox mode for [Aipify](https://aipify.co).
|
|
7
14
|
|
|
8
15
|
## Installation
|
|
9
16
|
|