XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

feat(docs/client.md): add base64 response format for image generation

72e81528
kqlio67 <kqlio67@users.noreply.github.com>
提交于

代码差异

1 个文件 +18 -1
Modified docs/client.md +18 -1
@@ -154,7 +154,7 @@ from g4f.client import Client
154 154 client = Client()
155 155
156 156 response = client.images.generate(
157 model="dall-e-3",
157 model="flux",
158 158 prompt="a white siamese cat"
159 159 # Add any other necessary parameters
160 160 )
@@ -164,6 +164,23 @@ image_url = response.data[0].url
164 164 print(f"Generated image URL: {image_url}")
165 165 ```
166 166
167
168 #### Base64 Response Format
169 ```python
170 from g4f.client import Client
171
172 client = Client()
173
174 response = client.images.generate(
175 model="flux",
176 prompt="a white siamese cat",
177 response_format="b64_json"
178 )
179
180 base64_text = response.data[0].b64_json
181 print(base64_text)
182 ```
183
167 184
168 185
169 186 ### Creating Image Variations