openai-api-mock 0.1.3 → 0.1.4
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/package.json +2 -2
- package/src/responce.js +4 -1
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openai-api-mock",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "A Node.js module for mocking OpenAI API responses in a development environment",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/chihebnabil/openai-api-mock"
|
|
7
|
+
"url": "git+https://github.com/chihebnabil/openai-api-mock.git"
|
|
8
8
|
},
|
|
9
9
|
"keywords": [
|
|
10
10
|
"openai",
|
package/src/responce.js
CHANGED
|
@@ -76,10 +76,13 @@ function generateFakeData(type, properties) {
|
|
|
76
76
|
itemObject[itemName] = generateFakeData(itemDetails.type, itemDetails);
|
|
77
77
|
});
|
|
78
78
|
return itemObject;
|
|
79
|
-
}
|
|
79
|
+
}else if (type === 'boolean') {
|
|
80
|
+
return faker.datatype.boolean();
|
|
81
|
+
}else {
|
|
80
82
|
return faker.lorem.words(1);
|
|
81
83
|
}
|
|
82
84
|
}
|
|
85
|
+
|
|
83
86
|
/*
|
|
84
87
|
* Generate function call arguments
|
|
85
88
|
*/
|