Langchain-Chatchat icon indicating copy to clipboard operation
Langchain-Chatchat copied to clipboard

你好,问一下各位,后端api部署的时候,支持多用户同时问答吗???

Open cristianohello opened this issue 1 year ago • 6 comments

支持多用户的话,最多支持多少用户问答?根据硬件而定吧?

cristianohello avatar May 29 '23 03:05 cristianohello

是的 可以看下这个demo Parameters: inline: whether to display in the interface inline in an iframe. Defaults to True in python notebooks; False otherwise. inbrowser: whether to automatically launch the interface in a new tab on the default browser. share: whether to create a publicly shareable link for the interface. Creates an SSH tunnel to make your UI accessible from anywhere. If not provided, it is set to False by default every time, except when running in Google Colab. When localhost is not accessible (e.g. Google Colab), setting share=False is not supported. debug: if True, blocks the main thread from running. If running in Google Colab, this is needed to print the errors in the cell output. auth: If provided, username and password (or list of username-password tuples) required to access interface. Can also provide function that takes username and password and returns True if valid login. auth_message: If provided, HTML message provided on login page. prevent_thread_lock: If True, the interface will block the main thread while the server is running. show_error: If True, any errors in the interface will be displayed in an alert modal and printed in the browser console log server_port: will start gradio app on this port (if available). Can be set by environment variable GRADIO_SERVER_PORT. If None, will search for an available port starting at 7860. server_name: to make app accessible on local network, set this to "0.0.0.0". Can be set by environment variable GRADIO_SERVER_NAME. If None, will use "127.0.0.1". show_tips: if True, will occasionally show tips about new Gradio features enable_queue: DEPRECATED (use .queue() method instead.) if True, inference requests will be served through a queue instead of with parallel threads. Required for longer inference times (> 1min) to prevent timeout. The default option in HuggingFace Spaces is True. The default option elsewhere is False. max_threads: the maximum number of total threads that the Gradio app can generate in parallel. The default is inherited from the starlette library (currently 40). Applies whether the queue is enabled or not. But if queuing is enabled, this parameter is increaseed to be at least the concurrency_count of the queue. width: The width in pixels of the iframe element containing the interface (used if inline=True) height: The height in pixels of the iframe element containing the interface (used if inline=True) encrypt: DEPRECATED. Has no effect. favicon_path: If a path to a file (.png, .gif, or .ico) is provided, it will be used as the favicon for the web page. ssl_keyfile: If a path to a file is provided, will use this as the private key file to create a local server running on https. ssl_certfile: If a path to a file is provided, will use this as the signed certificate for https. Needs to be provided if ssl_keyfile is provided. ssl_keyfile_password: If a password is provided, will use this with the ssl certificate for https. ssl_verify: If False, skips certificate validation which allows self-signed certificates to be used. quiet: If True, suppresses most print statements. show_api: If True, shows the api docs in the footer of the app. Default True. If the queue is enabled, then api_open parameter of .queue() will determine if the api docs are shown, independent of the value of show_api. file_directories: This parameter has been renamed to allowed_paths. It will be removed in a future version. allowed_paths: List of complete filepaths or parent directories that gradio is allowed to serve (in addition to the directory containing the gradio python file). Must be absolute paths. Warning: if you provide directories, any files in these directories or their subdirectories are accessible to all users of your app. blocked_paths: List of complete filepaths or parent directories that gradio is not allowed to serve (i.e. users of your app are not allowed to access). Must be absolute paths. Warning: takes precedence over allowed_paths and all other directories exposed by Gradio by default. root_path: The root path (or "mount point") of the application, if it's not served from the root ("/") of the domain. Often used when the application is behind a reverse proxy that forwards requests to the application. For example, if the application is served at "https://example.com/myapp", the root_path should be set to "/myapp". app_kwargs: Additional keyword arguments to pass to the underlying FastAPI app as a dictionary of parameter keys and argument values. For example, {"docs_url": "/docs"} Returns: app: FastAPI app object that is running the demo local_url: Locally accessible link to the demo share_url: Publicly accessible link to the demo (if share=True, otherwise None) Example: (Blocks) import gradio as gr def reverse(text): return text[::-1] with gr.Blocks() as demo: button = gr.Button(value="Reverse") button.click(reverse, gr.Textbox(), gr.Textbox()) demo.launch(share=True, auth=("username", "password")) Example: (Interface) import gradio as gr def reverse(text): return text[::-1] demo = gr.Interface(reverse, "text", "text") demo.launch(share=True, auth=("username", "password"))

LiZhangMing avatar May 29 '23 03:05 LiZhangMing

请问下 你运行了 $ python webui.py吗 能在本地打开网页吗

LiZhangMing avatar May 29 '23 03:05 LiZhangMing

@LiZhangMing 没看懂?我是运行api.py脚本

cristianohello avatar May 29 '23 03:05 cristianohello

同问

18591789167 avatar May 29 '23 08:05 18591789167

你部署成功了吗?api.py,我上传文件后/local_doc_qa/local_doc_chat不能对话啊, https://github.com/imClumsyPanda/langchain-ChatGLM/issues/465 https://github.com/imClumsyPanda/langchain-ChatGLM/issues/465#issuecomment-1567662274

ucas010 avatar May 30 '23 02:05 ucas010

请问api部署后怎么通过curl上传文件啊

Leawnn avatar Jun 12 '23 11:06 Leawnn