Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api调用报错 #438

Open
Readyou123 opened this issue Jan 10, 2025 · 1 comment
Open

api调用报错 #438

Readyou123 opened this issue Jan 10, 2025 · 1 comment

Comments

@Readyou123
Copy link

启动parallel_doc_qa的agent,想要通过api使用
from gradio_client import Client

client = Client("http://assistantrag.cn/")
result = client.predict(
_input={"files":[],"text":""},
_chatbot=[],
api_name="/add_text"
)
print(result)
但是输入的files的路径一直报错:docx.opc.exceptions.PackageNotFoundError: Package not found at
发现api只能接受在ui里上传的文件路径,如果换一个其他本地文件的路径会出现报错,想问下要怎么对本地文档处理,才能通过api使用

@tuhahaha
Copy link
Collaborator

‘其他本地文件的路径’指的是其他电脑上的路径吗?如果只是自己本地的文件,那用绝对路径是可以使用的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants