update
Update
Update data in a dataset.
This endpoint updates existing documents in a specified dataset by providing the data_id of the existing document to update and the new document with the changes as the data. The document is updated, analyzed, and the changes are integrated into the knowledge graph.
Request Parameters
- data_id (UUID): UUID of the document to update in Cognee memory
- data (List[UploadFile]): List of files to upload.
- datasetId (Optional[UUID]): UUID of an already existing dataset
- node_set Optional[list[str]]: List of node identifiers for graph organization and access control. Used for grouping related data points in the knowledge graph.
Response
Returns information about the add operation containing:
- Status of the operation
- Details about the processed data
- Any relevant metadata from the ingestion process
Error Codes
- 400 Bad Request: Neither datasetId nor datasetName provided
- 409 Conflict: Error during add operation
- 403 Forbidden: User doesn’t have permission to add to dataset
Notes
- To add data to datasets not owned by the user, use dataset_id (when ENABLE_BACKEND_ACCESS_CONTROL is set to True)
- datasetId value can only be the UUID of an already existing dataset
PATCH
Update
Previous
Create ResponseOpenAI-compatible responses endpoint with function calling support.
This endpoint provides OpenAI-compatible API responses with integrated
function calling capabilities for Cognee operations.
## Request Parameters
- **input** (str): The input text to process
- **model** (str): The model to use for processing
- **tools** (Optional[List[Dict]]): Available tools for function calling
- **tool_choice** (Any): Tool selection strategy (default: "auto")
- **temperature** (float): Response randomness (default: 1.0)
## Response
Returns an OpenAI-compatible response body with function call results.
## Error Codes
- **400 Bad Request**: Invalid request parameters
- **500 Internal Server Error**: Error processing request
## Notes
- Compatible with OpenAI API format
- Supports function calling with Cognee tools
- Uses default tools if none provided
Next
Update