Download the PHP package assistant-engine/open-functions-notion without Composer
On this page you can find all versions of the php package assistant-engine/open-functions-notion. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download assistant-engine/open-functions-notion
More information about assistant-engine/open-functions-notion
Files in assistant-engine/open-functions-notion
Package open-functions-notion
Short Description The Notion Open Function package integrates Notion with large language models (LLMs) using the Open Functions architecture, enabling streamlined repository management and file operations.
License MIT
Homepage https://github.com/AssistantEngine/open-functions-notion
Informations about the package open-functions-notion
Notion Open Function
The Notion Open Function is an implementation of the Open Functions architecture designed to seamlessly connect to Notion. It enables language models (LLMs) to interact with Notion—listing databases and pages, retrieving database details, creating and updating pages, managing content blocks, and more—through a simple and structured interface.
Installation
To install the Notion Open Function, simply use Composer:
Usage
Using the OpenAI PHP SDK
Below is a basic example of how to use the Notion Open Function directly with the OpenAI PHP SDK:
Using the Filament Assistant Plugin
The Notion Open Function can also be integrated as a tool within the Filament Assistant Plugin. To add it, include the following configuration in your config/filament-assistant.php
file:
With this configuration in place, your assistant can directly utilize the Notion tool to manage databases, pages, and content blocks.
Methods
Method | Description | Parameters |
---|---|---|
listDatabases | List all databases in the specified Notion workspace. | None (the workspace is defined by the API key configuration) |
listPages | List all pages in the specified Notion workspace. | None (the workspace is defined by the API key configuration) |
getDatabase | Retrieve details of the specified database in the Notion workspace. | databaseId: string (required) – The ID of the database to retrieve. |
createPage | Create a new page in Notion. | parentId: string (required) – The ID of the parent page or database where the new page will be created. data: object (required) – Must include: • title: string • content: array – Each item is an object with: • type: string (enum of supported block types) • text: string |
updatePageTitle | Update the title of an existing page in Notion. | pageId: string (required) – The ID of the page to update. newTitle: string (required) – The new title for the page. |
searchPages | Search pages in Notion with a query. | query: string (required) – The search query. |
retrieveBlockContent | Retrieve the content of a block in Notion. | blockId: string (required) – The ID of the block to retrieve. |
updateBlockContent | Update multiple block contents in Notion. | blockUpdates: array (required) – An array of block updates. Each update should include: • id: string (required) – The ID of the block to update. • type: string (required, enum of supported block types) • text: string (required) – New text content for the block. |
addBlockContent | Add new content blocks to a parent block or page in Notion. | parentId: string (required) – The ID of the parent block or page. blocks: array (required) – An array of new content blocks. Each block should include: • type: string (required, enum of supported block types) • text: string (required) – The text content of the block. |
deleteBlockContent | Delete a block in Notion by its ID. | blockId: string (required) – The ID of the block to delete. |
More Projects
We’ve created more repositories to simplify AI integration and enhance tool calling with large language models:
- Open Functions Core: Provides a standardized way to implement and invoke functions for tool calling with LLMs.
We are a young startup aiming to make it easy for developers to add AI to their applications. We welcome feedback, questions, comments, and contributions. Feel free to contact us at [email protected].
Consultancy & Support
Do you need assistance integrating Open Functions into your application or help setting it up?
We offer consultancy services to help you get the most out of our package, whether you’re just getting started or optimizing an existing setup.
Reach out to us at [email protected].
Contributing
We welcome contributions from the community! Feel free to submit pull requests, open issues, and help us improve the package.
License
This project is licensed under the MIT License. Please see License File for more information.
All versions of open-functions-notion with dependencies
vlucas/phpdotenv Version ^5.6
mariosimao/notion-sdk-php Version ^1.14
assistant-engine/open-functions-core Version ^1.0