简体   繁体   English

IBM Cloud Functions Python API 打开本地文件浏览器上传文件

[英]IBM Cloud Functions Python API to open a local file browser to upload file

I'm working on a Watson Assistant chatbot that connects to IBM Cloud Functions through Python API.我正在开发一个 Watson Assistant 聊天机器人,它通过 Python API 连接到 IBM Cloud Functions。 I want to make the chatbot open a local browser window to upload a file from local machine to save it into a database.我想让聊天机器人打开本地浏览器 window 从本地机器上传文件以将其保存到数据库中。 I'm intending to do that through IBM Cloud Functions Python API.我打算通过 IBM Cloud Functions Python API 来做到这一点。

However, I'm a bit confused on how to make the python API open a local file browser window to make the user select a file from the local machine.但是,我对如何使 python API 打开本地文件浏览器 window 以使用户 Z999382482F041071825 本地文件从本地机器 Z99938Z482F041071825

Any help in that, please?请问这方面有什么帮助吗?

Thanks,谢谢,

IBM Cloud Functions run on servers in the IBM Cloud. IBM Cloud Functions 在 IBM Cloud 中的服务器上运行。 They are intended to run short(er) workloads without any user interaction.它们旨在在没有任何用户交互的情况下运行更短的(更)工作负载。

What you are looking for is a chatbot app which calls into the Watson Assistant service.您正在寻找的是一个调用 Watson Assistant 服务的聊天机器人应用程序。 The app is a wrapper around the dialog service.该应用程序是对话服务的包装器。 It gets the user input, sends it to Watson Assistant, receives the answer and prints it for the user.它获取用户输入,将其发送到 Watson Assistant,接收答案并将其打印给用户。

As add-on, the app could open a local file browser and send a file to Watson Assistant.作为附加组件,该应用程序可以打开本地文件浏览器并将文件发送到 Watson Assistant。 Note that Watson Assistant would not know what to do with that file.请注意,Watson Assistant 不知道如何处理该文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM