from pinecone import Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
# Get an assistant.
assistant = pc.assistant.Assistant(
assistant_name="example-assistant",
)
# Describe a file.
# To get a signed URL in the response, set `include_url` to `True`.
file = assistant.describe_file(file_id="3c90c3cc-0d44-4b50-8888-8dd25736052a", include_url=True)
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"created_on": "2023-11-07T05:31:56Z",
"updated_on": "2023-11-07T05:31:56Z",
"percent_done": 123,
"signed_url": "https://storage.googleapis.com/bucket/file.pdf?...",
"error_message": "<string>"
}Files
Describe a file upload
Get the status and metadata of a file uploaded to an assistant.
For guidance and examples, see Manage files.
GET
/
files
/
{assistant_name}
/
{assistant_file_id}
from pinecone import Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
# Get an assistant.
assistant = pc.assistant.Assistant(
assistant_name="example-assistant",
)
# Describe a file.
# To get a signed URL in the response, set `include_url` to `True`.
file = assistant.describe_file(file_id="3c90c3cc-0d44-4b50-8888-8dd25736052a", include_url=True)
{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"created_on": "2023-11-07T05:31:56Z",
"updated_on": "2023-11-07T05:31:56Z",
"percent_done": 123,
"signed_url": "https://storage.googleapis.com/bucket/file.pdf?...",
"error_message": "<string>"
}from pinecone import Pinecone
pc = Pinecone(api_key="YOUR_API_KEY")
# Get an assistant.
assistant = pc.assistant.Assistant(
assistant_name="example-assistant",
)
# Describe a file.
# To get a signed URL in the response, set `include_url` to `True`.
file = assistant.describe_file(file_id="3c90c3cc-0d44-4b50-8888-8dd25736052a", include_url=True)
Authorizations
Pinecone API Key
Path Parameters
The name of the assistant to upload files to.
The uuid of the file to be described.
Query Parameters
Include the signed URL of the file in the response.
Available options:
true, false Response
Poll request successful.
AssistantFileModel is the response format to a successful file upload request.
Available options:
Processing, Available, Deleting, ProcessingFailed The percentage of the file that has been processed
A signed URL that provides temporary, read-only access to the underlying file. Anyone with the link can access the file, so treat it as sensitive data. Expires after a short time.
Example:
"https://storage.googleapis.com/bucket/file.pdf?..."
A message describing any error during file processing, provided only if an error occurs.
Was this page helpful?
⌘I