From 1a8f41bbb3d90642a7949803a6340391aa49952b Mon Sep 17 00:00:00 2001
From: zachey <63107653+zachey01@users.noreply.github.com>
Date: Tue, 30 Jul 2024 14:23:03 +0500
Subject: [PATCH] Update README.md
---
README.md | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 2945c9d..be4fcb4 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,8 @@ This package can be used in Node.js or Browser environments.
- [🔩 Configurable Options](#-configurable-options)
- [🚀 Chat Completion Providers](#-chat-completion-providers)
- [📚 Chat Completion Models](#-chat-completion-models)
-- [📷 Image Generation (BETA)](#-image-generation-beta)
+- [📷 Image Generation](#-image-generation)
+ - [📹 Example usage](#-example-usage)
- [🌐 Image Generation Provider Options](#-image-generation-provider-options)
- [🧮 Number Type Options](#-number-type-options)
- [🖼️ Image Generation Providers](#️-image-generation-providers)
@@ -239,7 +240,27 @@ const options = {
-# 📷 Image Generation (BETA)
+# 📷 Image Generation
+
+
+
+## 📹 Example usage
+
+```js
+const options = {
+ provider: "DALLE2",
+};
+
+(async () => {
+ const provider = GPT4js.createProvider(options.provider);
+ try {
+ const base64 = await provider.imageGeneration("wood", options);
+ console.log(base64);
+ } catch (error) {
+ console.error("Error:", error);
+ }
+})();
+```
With the `imageGeneration` function, you can generate images from textual input along with optional parameters to customize and stylize the images in various artistic styles.