Skip to main content
POST
/
action
/
get_data_from_user_uploaded_files
Get Data from User's Uploaded Files
curl --request POST \
  --url https://api-lr.agent.ai/v1/action/get_data_from_user_uploaded_files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "{{user_input}}",
  "assistant_files": "{{assistant_files}}",
  "max_documents_count": "10",
  "score_cutoff": "0.2",
  "output_variable_name": "knowledge_base_results"
}
'
{
  "status": 123,
  "response": {}
}

Authorizations

Authorization
string
header
required

Bearer token from your account (https://agent.ai/user/integrations#api)

Body

application/json
query
string
default:{{user_input}}
required

Enter the search query to find relevant information from uploaded files, such as 'project summary' or 'budget report'.

assistant_files
string
default:{{assistant_files}}
required

Specify which uploaded files to search in, such as 'recent_uploads' or 'project_documents'.

max_documents_count
string
default:10
required

Set the maximum number of document chunks to retrieve, like '5' or '10'.

score_cutoff
string
default:0.2
required

Adjust the score threshold for search relevance, like '0.2' for more general results or '0.5' for more specific results.

output_variable_name
string
default:knowledge_base_results
required

Provide a variable name to store the results, such as 'file_search_results' or 'upload_data'.

Pattern: ^[a-zA-Z][a-zA-Z0-9_]*$

Response

Successful response

status
integer<int32>

HTTP status code of the action response

response
object

Response data from the action