google-chat 相关问题


form_for 凤凰城问题

我是 Phoenix/Elixir 的新手,正在尝试制作一个小聊天应用程序。我遇到了一些困难,希望你能提供帮助。 这是我的代码 <%= f = form_for :chat, "#", id: "chat-form...


标识符“ChatFeed”已被声明

从 'react-chat-engine' 导入 { ChatEngine, ChatFeed }; 从 './components/chatFeed' 导入 ChatFeed; 导入'./App.css'; 常量应用程序 = () => { 返回( import { ChatEngine, ChatFeed } from 'react-chat-engine'; import ChatFeed from './components/chatFeed'; import './App.css'; const App = () => { return( <ChatEngine height="100vh" projectID="" userName="" userSecret="" renderChatFeed={(chatAppProps) => <ChatFeed {...chatAppProps} />} /> ); } export default App; 服务器运行时显示错误 SyntaxError: D:\PROJECTS\APPLICATION\chat_app\src\App.js: Identifier 'ChatFeed' has already been declared. (3:7) 1 | import { ChatEngine, ChatFeed } from 'react-chat-engine'; 2 | > 3 | import ChatFeed from './components/chatFeed'; | ^ 好吧,错误消息说明了一切,您声明了 ChatFeed 两次。 您可以通过以下方式修复它: 重命名您的组件,例如 import ChatFeedComponent from './components/chatFeed'; 将命名导入从 react-chat-engine 重命名为 import { ChatEngine, ChatFeed as ChatFeedComp } from 'react-chat-engine'; 当然,随意使用你喜欢的任何名称 错误消息显示您导入 ChatFeed 两次。 您可以修复它,从第一行删除 chatFeed 用这个 从“react-chat-engine”导入{ChatEngine}; 从 './components/ChatFeed' 导入 ChatFeed;


颤动|如何监听导航事件?

在Flutter中,有没有办法监听导航的变化? 示例:在小部件 A 中触发导航: Navigator.of(context).pushNamed('/chat'); 当上面的代码执行时,我想要一个ev...


无法在android上的react-native-gifted-chat中重新打开键盘

我在世博会的 React Native 中使用了一个非常简单的 GiftedChat 组件,这里的问题是当我第一次打开键盘时效果很好,但第二次我按下 textInput 但


MS Azure - 无法在 AI 搜索服务中创建索引

我位于 Azure Open AI Studio > Chat Playground。我的目标是添加我自己的数据源以使用聊天机器人进行分析。我在同一个中创建了一个特定的 Blob 存储和容器


来自 llama-index 的 PandasQueryEngine 无法执行代码,并出现以下错误:语法无效(第 0 行)

我有以下代码。我正在尝试使用本地 llama2-chat-13B 模型。说明看起来不错,但最终输出出现错误。 导入日志记录 导入系统 来自 IPython.display


我如何在乳胶中表达这个符号(它看起来类似于Sigma)

看这张图1 看到这个图片2 在数学符号中,乳胶中的它是什么?它意味着协方差矩阵。 我在 Detexify 中画了这个符号,但我找不到它。 我问 Chat GPT,但它总是说 \Sigma, 和


如何在 Google Cloud Console 中添加 Google Keep API 范围?

我尝试使用 OAuth 2.0 连接到 Google Keep API,但无法在 Google Cloud Console 中添加所需的范围。我已在“库”部分启用了 Google Keep API,但是当...


10000次请求后会打诚信付费吗?

我将使用“使用 Google Cloud Console”方法在我的 Android 应用程序中实现 Google Play Integrity。我想知道在我从 Google C 启用“Google Play Integrity API”后...


如何将 Google Play Console 和 Google Cloud 项目关联到不同的帐户

标题说明了一切:如果两者不在同一登录名下运行,我可以/如何将我的 Google Play Console 帐户与我的 Google Cloud 帐户关联起来,即: 使用 [email protected] 和 google c 玩控制台...


NodeJS 我当前的 Google Cloud 函数名称是什么?

我想使用当前Google Cloud Function的名称来驱动一些逻辑。如何确定我的 Google Cloud Function 名称是什么?


如何使用javascript forloop在点击时获取html中data-id的值并返回值

这是我的html {% if t_ques %} 今天 {% 表示 t_... 中的项目 这是我的html <ul class="conversations"> {% if t_ques %} <li class="grouping">Today</li> {% for item in t_ques %} <li class="active"> <a id="convers" class="conversation-button text-[#E8F5FC] my-2" href="{% url 'assistant:continuechat' item.pk %}" data-pk="{{item.pk}}"> <i class="fa fa-message fa-regular"></i> {{item.title| truncatewords:04 }} </a> <div class="fade"></div> <div class="edit-buttons"> <button><i class="fa fa-edit"></i></button> <button class="trash" data-id = "{{item.pk}}"><i class="fa fa-trash"></i></button> </div> </li> {% endfor %} {% endif %} {% if y_ques %} <li class="grouping">Yesterday</li> {% for item in y_ques %} <li> <a id="convers" class="conversation-button text-[#E8F5FC] my-2" href="{% url 'assistant:continuechat' item.pk %}" data-pk="{{item.pk}}"> <i class="fa fa-message fa-regular"></i> {{item.title| truncatewords:04 }} </a> <div class="fade"></div> <div class="edit-buttons"> <button><i class="fa fa-edit"></i></button> <button class="trash" data-id = "{{item.pk}}"><i class="fa fa-trash"></i></button> </div> </li> {% endfor %} {% endif %} {% if s_ques %} <li class="grouping">Previous 7 days</li> {% for item in s_ques %} <li> <a id="convers" class="conversation-button text-[#E8F5FC] my-2" href="{% url 'assistant:continuechat' item.pk %}" data-pk="{{item.pk}}"> <i class="fa fa-message fa-regular"></i> {{item.title| truncatewords:04 }} </a> <div class="fade"></div> <div class="edit-buttons"> <button><i class="fa fa-edit"></i></button> <button class="trash" data-id = "{{item.pk}}"><i class="fa fa-trash"></i></button> </div> </li> {% endfor %} {% endif %} {% if more_s_ques %} <li class="grouping">Previous 30 days</li> {% for item in more_s_ques %} <li> <a id="convers" class="conversation-button text-[#E8F5FC] my-2" href="{% url 'assistant:continuechat' item.pk %}" data-pk="{{item.pk}}"> <i class="fa fa-message fa-regular"></i> {{item.title| truncatewords:04 }} </a> <div class="fade"></div> <div class="edit-buttons"> <button><i class="fa fa-edit"></i></button> <button class="trash" data-id = "{{item.pk}}"><i class="fa fa-trash"></i></button> </div> </li> {% endfor %} {% endif %} </ul> </div> 我一直在尝试使用 JavaScript 单击时获取任何 data-pk 的值,但似乎无法实现。这一直说 currentTarget 未定义,当我用 target 替换它时,它说同样的事情。然后,如果我将其替换为 document.querySelector("#convers"),它只会给出第一个值,无论单击哪个 这是我的 JavaScript const conversationButtons = document.querySelectorAll("#convers"); conversationButtons.forEach(button => { button.addEventListener("click", getId); }); function getId(e){ var idValue = e.currentTarget.getAttribute('data-pk'); console.log(idValue); //output corresponding target-id if(!chat_id){ url = `/chat-previous/${idValue}/` }else{ url = 'initiate-chat/' } return url; } $.ajax({ type: 'POST', url: getId(), data: { message: usermsg, chatId: chat_id, // itemId: item_id, csrfmiddlewaretoken: $('input[name=csrfmiddlewaretoken]').val(), action: 'post' }, success: function(json){ const res = json['chats'] setTimeout(() => { hideTyping(); body.appendChild(mgses(res, "assistant")); scrollToBottomOfResults(); }, 1000); console.log(json) }, error: function(rs, e){ setTimeout(() => { hideTyping(); body.appendChild(setBotResponse("bot")); scrollToBottomOfResults(); }, 600); console.log(rs.error); }, }); 我使用了其他方法,例如 const getId = () => { console.log(document.querySelector(".conversation-button").getAttribute('data-pk')) if(!chat_id){ url = `/chat-previous/${document.querySelector(".conversation-button").getAttribute('data-pk')}/` }else{ url = 'initiate-chat/' } return url; } conversationButtons.forEach(button => { button.addEventListener("click", getId); console.log(button.getAttribute('data-pk')); }); 仍然无法得到我真正想要的。有什么方法可以实现这个目标吗? 委托并使用按钮的类 document.querySelector('.conversations').addEventListener('click', (e) => { let tgt = e.target.closest('.conversation-button'); if (!tgt) return; const idValue = tgt.dataset.pk; console.log(idValue); //output corresponding target-id return chat_id ? 'initiate-chat/' : `/chat-previous/${idValue}/` }) 您做出了多个错误的假设,第一个是您不能有多个具有相同 id 的元素,这将导致您描述的确切行为“它需要第一次出现的 id” 第二件事是你可能想在点击时发出ajax请求,但你构建代码的方式并不能做到这一点。 要解决这些问题,请生成如下 html button.conversation-button button.conversation-button button.conversation-button 然后向所有具有 .conversation-button 类的元素添加一个事件侦听器,并将您的 ajax 调用包装到一个函数中,主要是您已经拥有的函数。 const conversationButtons = document.querySelectorAll(".conversation-button"); conversationButtons.forEach(button => { button.addEventListener("click", doStuff); }); ... function doStuff(e) { $.ajax( ... url: getId(e) ... } function getId(e) { let idValue = e.currentTarget.getAttribute('data-pk'); let url = ...; ... return url; // } 只是一些伪代码让你得到一个想法,祝你好运:)


Google App 脚本无法获取 Google Drive 上托管的 CSS 文件(403 未经授权)

我在 Google App 脚本访问 Google 云端硬盘托管资产时遇到问题。奇怪的是,它一直在工作,几天前才停止工作。 发生了什么:在


谷歌财经股票符号识别

Google 财经不再识别过去的许多股票代码。今天举两个例子,BXSL 和 RC 等。 Google 财经网站以及 Google 表格中的报告要么...


如何在iPhone中集成Google+ API?

iPhone 的 Google API 已经推出了吗? 如果是,我如何集成到我的应用程序中。


使用节点和护照未经谷歌oauth登录身份验证500

我正在使用passport-google-oauth 运行node.js。从我的 package.json 中: "passport-google-oauth": "~1.0.0", 我遵循了本教程:https://scotch.io/tutorials/easy-node-authentication-google 在...


更新 Google Pay 集成

我已在 google pay Business 控制台上成功设置了 android google pay 集成并已获得批准,但是现在我已经对用户界面(付款流程)进行了更改,我该如何


如何访问Google新闻标题链接

我正在对 Google 新闻文章网址进行 axios 调用,例如: 谷歌新闻链接: “https://news.google.com./articles/


需要帮助设置 Google App 脚本的 CI/CD?

我们正在使用 Google App Script 构建一个插件,并希望将其发布到 Google Workspace MarketPlace。我们设法使用 App Sc 的管理部署功能发布版本化部署...


Softr Google 地图集成不起作用

在过去的一个月里,我一直在尝试将 Google Maps API 集成到 Softr 应用程序中。根据文档,我只需在 Google Cloud 上设置一个项目,链接一个计费帐户,


根据给定的 client_id + client_secret 识别 Google API 密钥

我在一个拥有一百万个 Google 项目、服务和帐户的生态系统中工作。我有 Google Calendar API client_id 和 client_secret,并且我想升级该 API 帐户的结算信息。 是...


Google Picker API 自动

我计划有一个网络应用程序供用户将文件上传到我的驱动器。我创建一个服务帐户并获取 Google Picker 的 OAuth 令牌。我确认访问令牌有效。但是,Google Picker API


Google Earth Engine Python API - 笔记本身份验证器错误“无效请求”

我想在google colab中使用google Earth引擎python API。当我运行 ee.Authenticate() 命令时,会给出一个链接,并要求我提供验证码。 当我打开链接并单击 Gen...


Google 地图 API 通过 API 发出的路线请求返回 ZERO_RESULTS,但适用于 Google 地图

有问题的呼叫是: https://maps.googleapis.com/maps/api/directions/json?origin=35.73455050,-95.31531510&destination=29.67404860,-95.54087240&waypoints=29.92853940,-95.29782860...


是否可以在 Google Cloud Shell 中使用 Jupyter Notebook?

我尝试过的: 启动 Google Cloud shell 须藤 pip 安装 jupyter jupyter 笔记本 --generate-config 将以下内容添加到 ~/.jupyter/jupyter_notebook_config.py c.NotebookApp.ip = 'localhost' c.


尽管 google 帐户是所有者,但来自 Google 身份验证 Web api 的“错误 403:access_denied”

我在这里使用谷歌提供的默认代码,我不太明白为什么它不起作用。代码输出提示请访问此 URL 以授权此应用程序:[google logi...


将图像从 Google 表单插入 Google 幻灯片

我正在尝试制作一份根据谷歌表单答案生成的报告。我找到了一些方法来填充文本,但问题是我需要在 go 的报告中添加来自 google 表单答案的图像...


带有 Cloud Run CORS 的 Google Api 网关

有没有办法在 Cloud Run 服务的 Google Api 网关配置中启用 Cors? 我在服务中启用了 Cors,但我总是得到 从源“http://


Google Gemini api 使用交易数据、公司员工数据等敏感数据是否安全?

Google Gemini API 对于交易数据、公司员工数据等敏感数据是否安全?这意味着 Google Gemini API 可能会将这些数据用于个人用途或培训目的...


OpenAI 未在 google colab 中导入

我在Google colab中成功安装了open AI;但是,我无法导入它...我安装了最新版本的 OpenAI(和打字扩展)... 这是错误: 导入错误...


在Python中无需API密钥以编程方式搜索google

有没有一种方法可以在没有 API 密钥的情况下向 Google 发出请求? 我已经尝试了几个 Python 包,它们工作得很好,除了当 Google 说未找到结果时它们也会提供链接......


如何在 Google Workspace Marketplace 中部署 google 应用脚本插件

我是 Google App 脚本的新手。我已经在谷歌脚本应用程序中完成了编码。我已经通过谷歌应用程序脚本中提供的部署选项部署了该应用程序。部署后,我无法...


如何使用 Google Earth API 进行彩色屏幕截图?

我正在 Excel VBA 中使用 Google Earth API。屏幕截图是黑白的,而不是彩色的。请建议我哪里做错了? Dim ge As Earthlib.ApplicationGE 设置 ge = 新


Google plus API 还是只读的吗?

我到处都看到 Google Plus API 是只读的,但我看到了这个应用程序屏幕截图: 他们当时表现如何?甚至文档也说它是只读的。


Google Cloud Speech-To-Text API 响应不返回单词

我正在尝试使用 Google Cloud Speech-To-Text API 和 Python 在我的应用程序中实现 Speech-To-Text。我正确地得到了转录,但是响应仅包含转录和


如何增加 Google Sheets v4 API 配额限制

新的 Google Sheets API v4 目前每天拥有无限的读/写配额(这太棒了),但限制为每个帐户每 100 秒 500 次读/写,每个密钥 100 次读/写...


安装 Google Cloud Platform for Eclipse 时出错:缺少 javax.annotation 依赖项

我在尝试安装适用于 Eclipse 的 Google Cloud Platform 插件时遇到问题。安装过程失败并显示以下错误消息: 无法完成安装,因为...


从 Postgres 读取数据并写入 Google BigQuery 时架构不匹配

我创建了一个 pyspark 脚本来通过 Dataproc 将数据从 PG DB 迁移到 Google Bigquery,但是在 dataproc 上运行日志时遇到错误 引起的:java.lang.NullPointerExcepti...


如何将数据从 Google Big Query 导出到 PostgreSQL

我有一个表存储在 BigQuery 中,我想在 PostgreSQL 数据库中创建该表+数据的副本。这个 PostgreSQL 位于 Google Cloud SQL 中。 此导出每天都会发生,即


错误:您不拥有此网站,Google Search Console API

我不断收到错误:“错误:您不拥有此网站,或者检查的 URL 不属于此属性。”当尝试使用 Google Search Console API 检查网址时,尽管我是


npm 我的react-google-login 无法安装

我正在尝试在我的项目中安装包“react-google-login”以进行用户身份验证。 这是错误代码: npm 错误!代码 ERESOLVE npm 错误! ERESOLVE 无法解决依赖性


如何为新电子表格自动生成 Google Apps 脚本代码

我想知道是否有办法自动生成属于新电子表格的 Google Apps 脚本代码? 我每周自动生成新的电子表格,我想...


高灯塔总阻塞时间,尽管没有很长的任务

根据 Google 文档,Google Chrome Lighthouse 工具计算总阻塞时间 (TBT) 的主要标准是一项长期任务。 根据我的理解,长任务是任何 JavaScript


Google 地图如何查看本机 iPhone 应用程序:服务器应用程序还是浏览器应用程序?

我有一个 Google API 控制台高级帐户,我正在为一个应用程序使用地方服务,该应用程序有两个部分:网络应用程序和移动应用程序。 看来 Google API 区分了服务器和


使用 Apple 登录而不使用 Firebase/Flutter

我有一个 firebase 项目,我在其中启用了通过 Google、Microsoft 的身份验证,最近我添加了 Apple。 Google 和 Microsoft 都可以正常工作,但 Apple 登录会抛出错误。我有


Google+按钮背后的逆向工程Javascript

我正在尝试模拟google+按钮。在LINK的部分代码中,它将会话ID转换为某种哈希值。我发现会话ID名称是SAPISID,转换后的哈希名称是SAPISIDH...


将 google-sites 网页连接到 cPanel 域

我想在自定义域中发布我的 google-sites 网页。该域托管在 cPanel 上。我阅读了一些教程和参考文献,下面是我尝试过的总结: 创建新的子主题...


如何有效地输出到 Google Apps 脚本 (GAS) 中的非连续范围

我是 Google 脚本新手,非常感谢您的帮助! 我的数据如下所示(3 个不连续的记录,4 个不连续的字段): https://docs.google.com/spreadsheets/d/


在 Google Cloud Build 期间在 Google Cloud SQL 上运行 node.js 数据库迁移

我想在 Cloud Build 过程中运行用 node.js 编写的数据库迁移。 目前,正在执行数据库迁移命令,但 Cloud Build 进程似乎正在执行...


电影类型数据已提取到 Google 表格中

我想要与 Google 表格中的电影列表关联的类型。我尝试使用 OMDB API 通过 importxml 公式提取此信息。但是我不断收到错误。 这是一个示例...


© www.soinside.com 2019 - 2024. All rights reserved.