Skip to content

Upload - Public

Upload documents or specify a ticker for data retrieval and Q&A. This method supports various tasks, such as uploading documents or querying the government's EDGAR database.

Parameters:

Name Type Description Default
task_type str

Specifies the type of task to perform. This can be document-based interaction (e.g., 'documents') or financial data analysis ('edgar').

required
model_type str

Determines the AI model to use for processing the request. Different model types available are 'gpt' for GPT-4 and 'claude' for Claude.

required
ticker str

The ticker symbol for financial data analysis tasks. Required if the task_type is 'edgar'. Example: 'AAPL' for Apple Inc.

None
file_paths list[str]

A list of file paths to documents for document-based tasks. Required if task_type is 'documents'. Example: ['path/to/file1.pdf', 'path/to/file2.pdf'].

None

Returns:

Name Type Description
response dict

A JSON response from the API, including the chat_id for interactions based on the uploaded content or specified ticker.

Sample usage for uploading documents:

from anoteai import Anote

api_key = 'INSERT_API_KEY_HERE'
Anote = Anote(api_key, isPrivate=False)

file_paths = ['doc1.pdf', 'doc2.pdf']

response = Anote.upload(task_type="documents", model_type="gpt", file_paths=file_paths)

Response is given as a JSON in this format:

{
  "id": 5
}

Sample usage for using Edgar:

from anoteai import Anote

api_key = 'INSERT_API_KEY_HERE'
Anote = Anote(api_key, isPrivate=False)

response = Anote.upload(task_type="edgar", model_type="claude", ticker="aapl")
Response is given as a JSON in this format:
{
  "id": 5
}