File Processing Guide
Upload Files with an Agent Run
from glaip_sdk import Client
client = Client()
agent = client.agents.get_agent_by_id("analysis-agent")
response = client.agents.run_agent(
agent.id,
"Summarise the document and extract key metrics",
files=["./reports/q1.pdf", "./reports/q2.pdf"],
)
print(response)aip agents run analysis-agent \
--input "Summarise these reports" \
--file reports/q1.pdf \
--file reports/q2.pdf \
--view json > summary.jsoncurl -X POST "$AIP_API_URL/agents/$AGENT_ID/run" \
-H "X-API-Key: $AIP_API_KEY" \
-F "input=Summarise these reports" \
-F "files=@reports/q1.pdf" \
-F "files=@reports/q2.pdf"Common upload errors
Symptom
Likely cause
Fix
Reuse Uploaded Chunks
Retrieve Artifacts and Output
Best Practices
Related Documentation
最后更新于