当前位置: 首页 > wzjs >正文

惠州开发做商城网站建设哪家好建设网站需要注意事项

惠州开发做商城网站建设哪家好,建设网站需要注意事项,wordpress别人主题插件,苏州优化网站公司本文翻译整理自:https://github.com/acheong08/EdgeGPT 文章目录 一、关于 EdgeGPT相关链接资源关键功能特性 二、安装系统要求安装命令 三、认证配置获取Cookie步骤代码中使用Cookie 四、使用方法1、命令行方式2、Python API方式使用Chatbot类使用Query辅助类 3、…

在这里插入图片描述

本文翻译整理自:https://github.com/acheong08/EdgeGPT

文章目录

    • 一、关于 EdgeGPT
      • 相关链接资源
      • 关键功能特性
    • 二、安装
      • 系统要求
      • 安装命令
    • 三、认证配置
      • 获取Cookie步骤
      • 代码中使用Cookie
    • 四、使用方法
      • 1、命令行方式
      • 2、Python API方式
        • 使用`Chatbot`类
        • 使用`Query`辅助类
      • 3、Docker方式运行
    • 五、图像生成功能
      • 命令行方式
      • Python API方式
    • 六、高级控制
      • 使用`ImageGen`类


项目已归档 :由于个人原因,作者无法继续维护此代码库。


一、关于 EdgeGPT

逆向工程实现新版Bing的聊天功能


相关链接资源

  • github : https://github.com/acheong08/EdgeGPT
  • 官方文档:https://github.com/acheong08/EdgeGPT#readme

关键功能特性

  • 通过逆向工程实现Bing聊天功能
  • 支持命令行和Python API两种调用方式
  • 提供图像生成功能
  • 支持多种对话风格(creative/balanced/precise)
  • 支持cookie认证

二、安装


系统要求

  • Python 3.8+
  • 可访问https://bing.com/chat的微软账户(视地区而定)
  • 位于支持New Bing的国家/地区(中国大陆需VPN)
  • Selenium(用于自动设置cookie)

安装命令

python3 -m pip install EdgeGPT --upgrade

三、认证配置

某些地区可能无需认证即可使用聊天功能。您可以通过浏览器(用户代理设置为Edge)尝试在不登录的情况下发起聊天来验证。

如果收到以下错误,可以尝试提供cookie:
Exception: Authentication failed. You have not been accepted into the beta.


获取Cookie步骤

1、使用类似Microsoft Edge的浏览器:

  • a) 安装最新版Microsoft Edge
  • b) 或设置用户代理为Edge样式

2、访问bing.com/chat
3、安装Cookie编辑器扩展(Chrome版或Firefox版)
4、访问bing.com
5、打开扩展程序
6、点击"Export"→"Export as JSON"
7、将cookie保存为bing_cookies_*.json文件


代码中使用Cookie

cookies = json.loads(open("./path/to/cookies.json", encoding="utf-8").read())
bot = await Chatbot.create(cookies=cookies)

四、使用方法


1、命令行方式

 $ python3 -m EdgeGPT.EdgeGPT -hEdgeGPT - A demo of reverse engineering the Bing GPT chatbotRepo: github.com/acheong08/EdgeGPTBy: Antonio Cheong!help for helpType !exit to exitusage: EdgeGPT.py [-h] [--enter-once] [--search-result] [--no-stream] [--rich] [--proxy PROXY] [--wss-link WSS_LINK][--style {creative,balanced,precise}] [--prompt PROMPT] [--cookie-file COOKIE_FILE][--history-file HISTORY_FILE] [--locale LOCALE]options:-h, --help            show this help message and exit--enter-once--search-result--no-stream--rich--proxy PROXY         Proxy URL (e.g. socks5://127.0.0.1:1080)--wss-link WSS_LINK   WSS URL(e.g. wss://sydney.bing.com/sydney/ChatHub)--style {creative,balanced,precise}--prompt PROMPT       prompt to start with--cookie-file COOKIE_FILEpath to cookie file--history-file HISTORY_FILEpath to history file--locale LOCALE       your locale (e.g. en-US, zh-CN, en-IE, en-GB)

支持参数:

  • --style:设置对话风格(creative/balanced/precise)
  • --cookie-file:指定cookie文件路径
  • --locale:设置地区(如en-US/zh-CN)

2、Python API方式


使用Chatbot
import asyncio, json
from EdgeGPT.EdgeGPT import Chatbot, ConversationStyleasync def main():bot = await Chatbot.create()response = await bot.ask(prompt="Hello world", conversation_style=ConversationStyle.creative)print(json.dumps(response, indent=2))await bot.close()asyncio.run(main())

使用Query辅助类
from EdgeGPT.EdgeUtils import Queryq = Query("What are you? Give your answer as Python code")
print(q.output)  # 获取文本输出
print(q.sources)  # 获取来源
print(q.suggestions)  # 获取建议

3、Docker方式运行

docker run --rm -it -v $(pwd)/cookies.json:/cookies.json:ro -e COOKIE_FILE='/cookies.json' ghcr.io/acheong08/edgegpt

五、图像生成功能


命令行方式

$ python3 -m ImageGen.ImageGen -h

Python API方式

from EdgeGPT.EdgeUtils import ImageQueryq = ImageQuery("Meerkats at a garden party in Devon")

六、高级控制


使用ImageGen

from EdgeGPT.ImageGen import ImageGen
import jsonwith open("cookies.json", encoding="utf-8") as file:cookies = json.load(file)_U = next(cookie["value"] for cookie in cookies if cookie["name"] == "_U")image_generator = ImageGen(_U)
images = image_generator.get_images("Astronaut riding a horse")
image_generator.save_images(images)

伊织 xAI 2025-04-19(六)


文章转载自:

http://4q11OA67.fhcwm.cn
http://i7Okeb0C.fhcwm.cn
http://Trmdk2V3.fhcwm.cn
http://zDkWPsUd.fhcwm.cn
http://IypSPQmp.fhcwm.cn
http://fteBqZGl.fhcwm.cn
http://0H1TyxBi.fhcwm.cn
http://3eGQI0ms.fhcwm.cn
http://bS639mIr.fhcwm.cn
http://po37nnr9.fhcwm.cn
http://q3dRkj9Q.fhcwm.cn
http://DEb97QNx.fhcwm.cn
http://BAFvstPF.fhcwm.cn
http://EFqyb5nZ.fhcwm.cn
http://jrKPvSwT.fhcwm.cn
http://Mvx5sAXG.fhcwm.cn
http://WqpYVf1w.fhcwm.cn
http://9kbZUUNj.fhcwm.cn
http://bw88SSur.fhcwm.cn
http://5XDdKfNB.fhcwm.cn
http://IwoyTwZr.fhcwm.cn
http://hyKzqvC6.fhcwm.cn
http://cDNNnruI.fhcwm.cn
http://hCuxkt2W.fhcwm.cn
http://oY0pnVY0.fhcwm.cn
http://p2pLsRhs.fhcwm.cn
http://2RvkDn7L.fhcwm.cn
http://vlqZhSoX.fhcwm.cn
http://MGczzWkC.fhcwm.cn
http://lTJ0saNk.fhcwm.cn
http://www.dtcms.com/wzjs/693038.html

相关文章:

  • 动漫网站建设的目的wordpress文章竖线
  • 做网站广告多少钱互联网创业怎么起步
  • 网站页面优化公告app营销的特点与优势
  • 设计师做帆布包网站唐山的谁会建网站
  • 新余企业网站建设免费发外链
  • 酒店预订网站模板泰安房产网数据中心
  • 手机网站一定要与pc网站一样玉林网站设计
  • 常见的简单的网站制作怎么使用模板建设网站
  • se 网站优化wordpress 更改服务器
  • 扬州市住房建设局网站现在注册公司流程和费用
  • 深圳网站设计排名网站第一关键词怎么做
  • ie建设企业网站进去无法显示自媒体平台
  • 网站托管西安华为wordpress
  • 网站群发推广软件建设网站的企业哪家好
  • 智能营销型网站移动端是手机端吗
  • 长春哪里做网站wordpress手机认证登录页面
  • 德宏网站制作做类似淘宝的网站
  • 网站打开空白页微商城网站建设行情
  • 湖南平台网站建设制作dedecms 百度网站地图
  • 音乐网站是否可以做浅度链接平面设计网站排行榜前十名有哪些
  • 电商网站开发面试题网站开发也需要源码吗
  • 如何创新网站建设模式微企点做的网站百度搜得到吗
  • 淄博市住房和城乡建设局网站网站建设 010
  • c 如何做网站wordpress使用
  • 宁波网站推广排名山东省住房和城乡建设厅投诉电话
  • 爱站工具seo综合查询wordpress侧边栏
  • 婚纱网站模板素材网站建设中外链与内链的技巧
  • 网站建设税收编码跟公司产品做网站
  • 网站优化千牛帮分析可口可乐网站建设的目的
  • 网站制作全过程山东营销网站建设设计