@openai-oauth/openai-client 2.0.0-beta.2 → 2.0.0-beta.3
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/README.md +17 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -18,6 +18,23 @@ import OpenAI from "openai";
|
|
|
18
18
|
const client = new OpenAI(createOpenAIOptions(openaiCredentials()));
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
The standard OpenAI image APIs work with GPT Image 2:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import fs from "node:fs";
|
|
25
|
+
|
|
26
|
+
const result = await client.images.generate({
|
|
27
|
+
model: "gpt-image-2",
|
|
28
|
+
prompt: "A tiny house in a forest",
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const edited = await client.images.edit({
|
|
32
|
+
model: "gpt-image-2",
|
|
33
|
+
prompt: "Add a red hat",
|
|
34
|
+
image: fs.createReadStream("input.png"),
|
|
35
|
+
});
|
|
36
|
+
```
|
|
37
|
+
|
|
21
38
|
## Package Notes
|
|
22
39
|
|
|
23
40
|
`@openai-oauth/openai-client` turns an OpenAI OAuth credential source into options for `new OpenAI()`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openai-oauth/openai-client",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.3",
|
|
4
4
|
"description": "OpenAI JavaScript SDK adapter for openai-oauth auth handles.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"openai",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@openai-oauth/core": "2.0.0-beta.
|
|
39
|
+
"@openai-oauth/core": "2.0.0-beta.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"openai": "6.46.0",
|