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

XFEstudio/gpt4free

Update README.md

3a903538
H Lohaus <hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +18 -0
Modified README.md +18 -0
@@ -200,6 +200,24 @@ print(f"Generated image URL: {response.data[0].url}")
200 200 ```
201 201 [![Image with cat](https://g4f.dev/docs/images/cat.jpeg)](https://github.com/gpt4free/g4f.dev/blob/main/docs/client.md)
202 202
203 ### 🧙‍♂️ Using GPT4Free.js
204
205 Use the **official JS client** right in the browser—no backend needed.
206
207 For text generation:
208 ```html
209 <script type="module">
210 import Client from 'https://g4f.dev/dist/js/client.js';
211
212 const client = new Client();
213 const result = await client.chat.completions.create({
214 model: 'gpt-4.1', // Or "gpt-4o", "deepseek-v3"
215 messages: [{ role: 'user', content: 'Explain quantum computing' }]
216 });
217 console.log(result.choices[0].message.content);
218 </script>
219 ```
220
203 221 ### 🌐 Web Interface
204 222 **Run the GUI using Python:**
205 223 ```python