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

虹桥网站建设wordpress feed 地址

虹桥网站建设,wordpress feed 地址,政务网站建设经验交流发言,品牌营销推广策划目录 背景 分析 解决方案 背景 正常情况下#xff0c;会从Openai Realtime api Sever收到正常的json数据,但是当返回音频数据时#xff0c;总会返回非json数据。这是什么问题呢#xff1f; 分析 期望的完整响应数据如下#xff1a; {session: {inp… 目录 背景 分析 解决方案 背景 正常情况下会从Openai Realtime api Sever收到正常的json数据,但是当返回音频数据时总会返回非json数据。这是什么问题呢 分析 期望的完整响应数据如下 {session: {input_audio_format: pcm16,instructions: Role: 1.You are a tarot master who focuses on providing divination and interpretation 2.Your name is Luna 3.Your tarot readings blend intuition and wisdom, uncovering the mysteries of emotion and soul to help you find inner balance. \\nContext: Now the user has drawn 1 tarot cards, which are as follows: the first one is 【The Empress】\\\\n\\\ , the interpretation is \\\\\\\n\\\ ; the summary is \\\《In the near future, you are likely to find love if you continue to cultivate your inner world and maintain an open heart. Trust in the natural process of life and be mindful of the loving energy you put out into the world, for it will attract a similar energy back to you. Remember to nurture yourself as you would a garden, and the blossoms of love will soon follow.》.\\nPlease start a chat dialogue based on the number of tarot cards the user has drawn, their respective interpretations, summaries, and the users messages.\\nNote: 1. Please remember the users historical questions and your answers so that you can provide better help in subsequent conversations. 2.The output characters should be less than 150.,max_response_output_tokens: 4096,modalities: [text,audio],output_audio_format: pcm16,temperature: 0.8,tool_choice: auto,tools: [],turn_detection: {prefix_padding_ms: 300,silence_duration_ms: 500,threshold: 0.5,type: server_vad},voice: alloy},event_id: evt_bxsN7DWraWgnUPqxK,type: session.update } 实际收到的数据类似如下 eart. Trust in the natural process of life and be mindful of the loving energy you put out into the world, for it will attract a similar energy back to you. Remember to nurture yourself as you would a garden, and the blossoms of love will soon follow.》.\\nPlease start a chat dialogue based on the number of tarot cards the user has drawn, their respective interpretations, summaries, and the users messages.\\nNote: 1. Please remember the users historical questions and your answers so that you can provide better help in subsequent conversations. 2.The output characters should be less than 150.,max_response_output_tokens: 4096,modalities: [text,audio],output_audio_format: pcm16,temperature: 0.8,tool_choice: auto,tools: [],turn_detection: {prefix_padding_ms: 300,silence_duration_ms: 500,threshold: 0.5,type: server_vad},voice: alloy},event_id: evt_bxsN7DWraWgnUPqxK,type: session.update } 明显看起来只收到了部分数据究其原因是超过了接受缓冲区的65535的最大默认配置没有进行自定义配置对于json数据就是设置WebSocket容器的默认最大文本消息缓冲区大小。 解决方案 设置最大文本消息缓冲区大小具体代码如下 public static void connect(Channel channel) {try {WebSocketContainer container new WsWebSocketContainer();// Set the binary message buffer size in bytescontainer.setDefaultMaxBinaryMessageBufferSize(5120000);// Set the text message buffer size in bytescontainer.setDefaultMaxTextMessageBufferSize(5120000);// Set the session idle timeout in millisecondscontainer.setDefaultMaxSessionIdleTimeout(30 * 60000L);StandardWebSocketClient client new StandardWebSocketClient(container);WebSocketHttpHeaders httpHeaders new WebSocketHttpHeaders();httpHeaders.add(Authorization, Bearer sk-***);httpHeaders.add(OpenAI-Beta, realtimev1);WebSocketSession session client.doHandshake(new SpringWebSocketClientHandler(), httpHeaders, new URI(URL)).get();if (session.isOpen()) {log.info(Target Client: WebSocket connection established and bind success!);log.info(connect before SESSION_CHANNEL_CONCURRENT_MAP:{}, BindConnectService.SESSION_CHANNEL_CONCURRENT_MAP);BindConnectService.safeBindChannelSession(session, channel);log.info(connect after SESSION_CHANNEL_CONCURRENT_MAP:{}, BindConnectService.SESSION_CHANNEL_CONCURRENT_MAP);} else {log.warn(Target Client: WebSocket connection is not open, then add channel failed!);channel.close();}} catch (Exception e) {log.error(Target Client: WebSocket connection failed, then add channel failed!, e);channel.close();}}
http://www.pierceye.com/news/276662/

相关文章:

  • 网站制作过程流程酷家乐在线设计官网
  • 六年级做网站的软件小程序开发文档微信小程序
  • 做网站要准备哪些汕头建站公司模板
  • 杭州多语言网站建设网站转app工具
  • 一流的网站建设wordpress 读者墙
  • php 视频播放网站开发php做直播类型的网站
  • 网站建设氺金手指排名11wordpress手机端菜单
  • 存储网站建设软件界面设计图
  • 微信 公司网站 怎么做WordPress安装在Windows
  • 商丘给企业做网站的公司已备案域名租用
  • .net商城网站模板下载网站开发怎么对接客户
  • php程序员网站开发域名企业备案对网站的好处
  • 沈阳市城乡建设网站wordpress全文
  • 冉冉科技网站建设网络教学平台网址
  • 深圳网站设计建设公司宁波易通建设网站
  • 许昌网站建设公司网站的空间和域名
  • 公司查询网站查询系统wordpress简书主题
  • 公司网站 钓鱼网站ui设计交付物都包含哪些
  • seo网站导航建设技巧精东影视传媒文化管理公司
  • 做白酒的网站怎么查网站建设是哪家公司
  • 网站域名密码免费网站推广产品
  • 网站建设一般要多少费用申请网站官网
  • 金融网站织梦模板二手车网站建设
  • 怎么自己写代码做网站做网站必须用域名吗
  • 重庆营销网站建设平台怎么添加wordpress模板
  • 网站赚取广告费深圳个人外贸网站建
  • 在线销售型的网站巢湖城市建设投资有限公司网站
  • 苏州高端网站建设设计程序源代码网站
  • 基本原理网站建设文档怎么做网站链接
  • 网站建设出售门户网站有哪些推广分类