[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"footer-description":3,"footer-secondary":5,"footer-primary":33,"header-nav":121,"header-nav-data":260,"github-stars":262,"dfd79d2b-7af5-4cdb-aa94-3f73de97ebd8":366,"74634853-196b-4ce3-b256-4534c054838f":373,"site-banners":402,"1b444c23-b593-4391-9410-4ca5d2c7a7cb":407,"8f849cd0-a47b-4e32-bb19-b478973c90f7":413,"9df3f40e-6272-4ec6-a0d7-cc29265e087c":419,"358b0659-1f05-4427-bd1c-4bc03a43c182":422,"directus-extension-ai-operation-bundle":427},{"description":4},"\u003Cp>A composable backend to build your Headless CMS, BaaS, and more.&nbsp;\u003C/p>",{"items":6},[7,14,21,27],{"id":8,"title":9,"url":10,"page":11,"children":13},"8a1b7bfa-429d-4ffc-a650-2a5fdcf356da","Cloud Policies",null,{"permalink":12},"/cloud-policies",[],{"id":15,"title":16,"url":17,"page":18,"children":20},"bea848ef-828f-4306-8017-6b00ec5d4a0c","License","#",{"permalink":19},"/bsl",[],{"id":22,"title":23,"url":17,"page":24,"children":26},"4e914f47-4bee-42b7-b445-3119ee4196ef","Terms",{"permalink":25},"/terms",[],{"id":28,"title":29,"url":17,"page":30,"children":32},"ea69eda6-d317-4981-8421-fcabb1826bfd","Privacy",{"permalink":31},"/privacy",[],{"items":34},[35,58,78,98],{"id":36,"title":37,"url":10,"page":10,"children":38},"522e608a-77b0-4333-820d-d4f44be2ade1","Solutions",[39,44,49,54],{"id":40,"title":41,"url":10,"page":42},"fcafe85a-a798-4710-9e7a-776fe413aae5","Headless CMS",{"permalink":43},"/solutions/headless-cms",{"id":45,"title":46,"url":10,"page":47},"79972923-93cf-4777-9e32-5c9b0315fc10","Backend-as-a-Service",{"permalink":48},"/solutions/backend-as-a-service",{"id":50,"title":51,"url":10,"page":52},"0fa8d0c1-7b64-4f6f-939d-d7fdb99fc407","Product Information",{"permalink":53},"/solutions/product-information-management",{"id":55,"title":56,"url":57,"page":10},"63946d54-6052-4780-8ff4-91f5a9931dcc","100+ Things to Build","https://directus.io/blog/100-tools-apps-and-platforms-you-can-build-with-directus",{"id":59,"title":60,"url":10,"page":10,"children":61},"8ab4f9b1-f3e2-44d6-919b-011d91fe072f","Resources",[62,66,70,74],{"id":63,"title":64,"url":65,"page":10},"f951fb84-8777-4b84-9e91-996fe9d25483","Documentation","https://docs.directus.io",{"id":67,"title":68,"url":69,"page":10},"366febc7-a538-4c08-a326-e6204957f1e3","Guides","https://docs.directus.io/guides/",{"id":71,"title":72,"url":73,"page":10},"aeb9128e-1c5f-417f-863c-2449416433cd","Community","https://directus.chat",{"id":75,"title":76,"url":77,"page":10},"da1c2ed8-0a77-49b0-a903-49c56cb07de5","Release Notes","https://github.com/directus/directus/releases",{"id":79,"title":80,"url":10,"page":10,"children":81},"d61fae8c-7502-494a-822f-19ecff3d0256","Support",[82,86,90,94],{"id":83,"title":84,"url":85,"page":10},"8c43c781-7ebd-475f-a931-747e293c0a88","Issue Tracker","https://github.com/directus/directus/issues",{"id":87,"title":88,"url":89,"page":10},"d77bb78e-cf7b-4e01-932a-514414ba49d3","Feature Requests","https://github.com/directus/directus/discussions?discussions_q=is:open+sort:top",{"id":91,"title":92,"url":93,"page":10},"4346be2b-2c53-476e-b53b-becacec626a6","Community Chat","https://discord.com/channels/725371605378924594/741317677397704757",{"id":95,"title":96,"url":97,"page":10},"26c115d2-49f7-4edc-935e-d37d427fb89d","Cloud Dashboard","https://directus.cloud",{"id":99,"title":100,"url":10,"page":10,"children":101},"49141403-4f20-44ac-8453-25ace1265812","Organization",[102,107,112,116],{"id":103,"title":104,"url":105,"page":106},"1f36ea92-8a5e-47c8-914c-9822a8b9538a","About","/about",{"permalink":105},{"id":108,"title":109,"url":17,"page":110},"b84bf525-5471-4b14-a93c-225f6c386005","Careers",{"permalink":111},"/careers",{"id":113,"title":114,"url":115,"page":10},"86aabc3a-433d-434b-9efa-ad1d34be0a34","Brand Assets","https://drive.google.com/drive/folders/1lBOTba4RaA5ikqOn8Ewo4RYzD0XcymG9?usp=sharing",{"id":117,"title":118,"url":10,"page":119},"8d2fa1e3-198e-4405-81e1-2ceb858bc237","Contact",{"permalink":120},"/contact",{"items":122},[123,185,241,246,253],{"id":124,"title":125,"url":10,"callout":126,"callout_title":127,"children_title":128,"page":10,"children":129},"62c04c6c-5793-4702-8ed1-73dd563fd605","Product","8f849cd0-a47b-4e32-bb19-b478973c90f7","Project Showcase","Use Cases and Features",[130,136,142,149,154,162,170,178],{"id":131,"title":41,"url":132,"description":133,"image":10,"icon":134,"page":135},"e7d7d5ed-89b1-4455-8b4a-8ae92c70e3a0","/solutions/headless-cms/","Manage and deliver content with ease","code_blocks",{"permalink":43},{"id":137,"title":46,"url":138,"description":139,"image":10,"icon":140,"page":141},"60bdefd9-95e6-45a3-9f81-4748d07c59d3","/solutions/backend-as-a-service/","Build and ship applications faster","speed",{"permalink":48},{"id":143,"title":144,"url":145,"description":146,"image":10,"icon":147,"page":148},"5f9aebeb-4f89-445e-9850-5b1261a2743c","Headless Commerce","/solutions/product-information-management/","A single source of truth for products","shopping_cart_checkout",{"permalink":53},{"id":150,"title":151,"url":57,"description":152,"image":10,"icon":153,"page":10},"49e46134-80be-470e-8c73-afb1417fa9b6","100+ More Use Cases","Build anything (or everything)","lightbulb",{"id":155,"title":156,"url":157,"description":158,"image":10,"icon":159,"page":160},"a589ac77-a5ce-45c5-a054-e43111e19158","Instant APIs","/products/connect/","Connect a database, get REST + GraphQL APIs","api",{"permalink":161},"/toolkit/connect",{"id":163,"title":164,"url":165,"description":166,"image":10,"icon":167,"page":168},"4a0f129a-c546-4493-b0a9-306e51692e90","Granular Policy-Based Auth","/products/auth/","Provide secure, autonomous data access","lock_person",{"permalink":169},"/toolkit/auth",{"id":171,"title":172,"url":173,"description":174,"image":10,"icon":175,"page":176},"f9250f2c-93a4-4108-80db-011bbe391ecf","Visual Automation Builder","/products/automate/","Automate content and data workflows with ease","build",{"permalink":177},"/toolkit/automate",{"id":179,"title":180,"url":10,"description":181,"image":10,"icon":182,"page":183},"f1ae4e40-5b05-42a4-9cd3-33dda35cc939","50+ More Features","Get everything you need out-of-the-box","auto_fix",{"permalink":184},"/features",{"id":186,"title":60,"url":10,"callout":187,"callout_title":188,"children_title":189,"page":10,"children":190},"2f6ad0d1-6dd3-4f17-b5c8-9f2abf71409a","dfd79d2b-7af5-4cdb-aa94-3f73de97ebd8","Watch Directus TV","Learn More",[191,198,205,211,218,224,230,235],{"id":192,"title":193,"url":194,"description":195,"image":10,"icon":196,"page":197},"0a3bf9f5-1ef2-43f4-bc09-7ff7488241c5","Blog","/blog","Read our latest articles and guides","library_books",{"permalink":194},{"id":199,"title":200,"url":17,"description":201,"image":10,"icon":202,"page":203},"165e3dc2-e51b-4456-8382-99c5775b0412","Case Studies","Case studies and success stories","magic_button",{"permalink":204},"/case-studies",{"id":206,"title":207,"url":208,"description":209,"image":10,"icon":210,"page":10},"5ae324b6-bf44-4c21-95ad-e6dc0c1c1f40","Community Forum","https://community.directus.io/","Questions and conversations","comment",{"id":212,"title":213,"url":17,"description":214,"image":10,"icon":215,"page":216},"b1db03f0-e537-490e-8c0f-c61c401d1024","Agency Directory","Browse our list of agency partners ","handshake",{"permalink":217},"/agency-directory",{"id":219,"title":220,"url":105,"description":221,"image":10,"icon":222,"page":223},"991731c8-eb40-4eec-85a5-6e977bcd7ec9","About Us","Learn more about Directus and the team","supervised_user_circle",{"permalink":105},{"id":225,"title":226,"url":227,"description":228,"image":10,"icon":229,"page":10},"52aebf38-b3ad-4a27-807d-ce52398cd509","Wall of Love","https://testimonial.to/directus/all","See what others are saying about us","heart_plus",{"id":231,"title":118,"url":17,"description":232,"image":10,"icon":233,"page":234},"a86eca65-d5ae-4263-b7d9-4f1a1c50a0b1","Have a general inquiry or question for us?","mark_email_unread",{"permalink":120},{"id":236,"title":80,"url":10,"description":237,"image":10,"icon":238,"page":239},"28225825-8d41-4809-9032-192fbf5c6e5d","Reach out to Directus support","support",{"permalink":240},"/support",{"id":242,"title":243,"url":244,"callout":10,"callout_title":10,"children_title":10,"page":10,"children":245},"a3f1275d-b088-4b11-99bf-143fcbf39104","Developers","/docs",[],{"id":247,"title":248,"url":249,"callout":10,"callout_title":10,"children_title":10,"page":250,"children":252},"fae8fded-d2e2-468e-a68b-82abec7a7225","Enterprise","/solutions/enterprise/",{"permalink":251},"/solutions/enterprise",[],{"id":254,"title":255,"url":256,"callout":10,"callout_title":10,"children_title":10,"page":257,"children":259},"5c5e2fbc-49fd-4e41-a71e-e4f8db2b00cf","Pricing","/pricing/",{"permalink":258},"/pricing/self-hosted",[],{"header_cta_buttons":261},"74634853-196b-4ce3-b256-4534c054838f",{"id":263,"node_id":264,"name":265,"full_name":266,"private":267,"owner":268,"html_url":285,"description":286,"fork":267,"url":287,"forks_url":288,"keys_url":289,"collaborators_url":290,"teams_url":291,"hooks_url":292,"issue_events_url":293,"events_url":294,"assignees_url":295,"branches_url":296,"tags_url":297,"blobs_url":298,"git_tags_url":299,"git_refs_url":300,"trees_url":301,"statuses_url":302,"languages_url":303,"stargazers_url":304,"contributors_url":305,"subscribers_url":306,"subscription_url":307,"commits_url":308,"git_commits_url":309,"comments_url":310,"issue_comment_url":311,"contents_url":312,"compare_url":313,"merges_url":314,"archive_url":315,"downloads_url":316,"issues_url":317,"pulls_url":318,"milestones_url":319,"notifications_url":320,"labels_url":321,"releases_url":322,"deployments_url":323,"created_at":324,"updated_at":325,"pushed_at":326,"git_url":327,"ssh_url":328,"clone_url":329,"svn_url":285,"homepage":330,"size":331,"stargazers_count":332,"watchers_count":332,"language":333,"has_issues":334,"has_projects":334,"has_downloads":334,"has_wiki":267,"has_pages":267,"has_discussions":334,"forks_count":335,"mirror_url":10,"archived":267,"disabled":267,"open_issues_count":336,"license":337,"allow_forking":334,"is_template":267,"web_commit_signoff_required":267,"has_pull_requests":334,"pull_request_creation_policy":342,"topics":343,"visibility":284,"forks":335,"open_issues":336,"watchers":332,"default_branch":362,"temp_clone_token":10,"custom_properties":363,"organization":364,"network_count":335,"subscribers_count":365},7122594,"MDEwOlJlcG9zaXRvcnk3MTIyNTk0","directus","directus/directus",false,{"login":265,"id":269,"node_id":270,"avatar_url":271,"gravatar_id":272,"url":273,"html_url":274,"followers_url":275,"following_url":276,"gists_url":277,"starred_url":278,"subscriptions_url":279,"organizations_url":280,"repos_url":281,"events_url":282,"received_events_url":283,"type":100,"user_view_type":284,"site_admin":267},15967950,"MDEyOk9yZ2FuaXphdGlvbjE1OTY3OTUw","https://avatars.githubusercontent.com/u/15967950?v=4","","https://api.github.com/users/directus","https://github.com/directus","https://api.github.com/users/directus/followers","https://api.github.com/users/directus/following{/other_user}","https://api.github.com/users/directus/gists{/gist_id}","https://api.github.com/users/directus/starred{/owner}{/repo}","https://api.github.com/users/directus/subscriptions","https://api.github.com/users/directus/orgs","https://api.github.com/users/directus/repos","https://api.github.com/users/directus/events{/privacy}","https://api.github.com/users/directus/received_events","public","https://github.com/directus/directus","The flexible backend for all your projects 🐰 Turn your DB into a headless CMS, admin panels, or apps with a custom UI, instant APIs, auth & more.","https://api.github.com/repos/directus/directus","https://api.github.com/repos/directus/directus/forks","https://api.github.com/repos/directus/directus/keys{/key_id}","https://api.github.com/repos/directus/directus/collaborators{/collaborator}","https://api.github.com/repos/directus/directus/teams","https://api.github.com/repos/directus/directus/hooks","https://api.github.com/repos/directus/directus/issues/events{/number}","https://api.github.com/repos/directus/directus/events","https://api.github.com/repos/directus/directus/assignees{/user}","https://api.github.com/repos/directus/directus/branches{/branch}","https://api.github.com/repos/directus/directus/tags","https://api.github.com/repos/directus/directus/git/blobs{/sha}","https://api.github.com/repos/directus/directus/git/tags{/sha}","https://api.github.com/repos/directus/directus/git/refs{/sha}","https://api.github.com/repos/directus/directus/git/trees{/sha}","https://api.github.com/repos/directus/directus/statuses/{sha}","https://api.github.com/repos/directus/directus/languages","https://api.github.com/repos/directus/directus/stargazers","https://api.github.com/repos/directus/directus/contributors","https://api.github.com/repos/directus/directus/subscribers","https://api.github.com/repos/directus/directus/subscription","https://api.github.com/repos/directus/directus/commits{/sha}","https://api.github.com/repos/directus/directus/git/commits{/sha}","https://api.github.com/repos/directus/directus/comments{/number}","https://api.github.com/repos/directus/directus/issues/comments{/number}","https://api.github.com/repos/directus/directus/contents/{+path}","https://api.github.com/repos/directus/directus/compare/{base}...{head}","https://api.github.com/repos/directus/directus/merges","https://api.github.com/repos/directus/directus/{archive_format}{/ref}","https://api.github.com/repos/directus/directus/downloads","https://api.github.com/repos/directus/directus/issues{/number}","https://api.github.com/repos/directus/directus/pulls{/number}","https://api.github.com/repos/directus/directus/milestones{/number}","https://api.github.com/repos/directus/directus/notifications{?since,all,participating}","https://api.github.com/repos/directus/directus/labels{/name}","https://api.github.com/repos/directus/directus/releases{/id}","https://api.github.com/repos/directus/directus/deployments","2012-12-12T01:35:36Z","2026-04-06T06:33:38Z","2026-04-03T20:25:26Z","git://github.com/directus/directus.git","git@github.com:directus/directus.git","https://github.com/directus/directus.git","https://directus.io",438817,34650,"TypeScript",true,4675,383,{"key":338,"name":339,"spdx_id":340,"url":10,"node_id":341},"other","Other","NOASSERTION","MDc6TGljZW5zZTA=","all",[159,344,345,346,347,348,265,349,350,351,352,353,354,355,356,357,358,359,360,361],"app","cms","composable","data-visualization","database","graphql","headless-cms","javascript","mariadb","mssql","mysql","no-code","node","postgresql","sql","sqlite","typescript","vue","main",{},{"login":265,"id":269,"node_id":270,"avatar_url":271,"gravatar_id":272,"url":273,"html_url":274,"followers_url":275,"following_url":276,"gists_url":277,"starred_url":278,"subscriptions_url":279,"organizations_url":280,"repos_url":281,"events_url":282,"received_events_url":283,"type":100,"user_view_type":284,"site_admin":267},327,{"id":187,"title":367,"description":368,"image":369,"external_url":370,"icon":371,"badge":372,"page":10,"resource":10},"Directus TV","Go down the rabbit hole with hours of original video content from our team. ","ab70faf5-fc28-4608-a7e7-74fd4f020a9d","/tv","connected_tv","Video",{"alignment":374,"style":375,"experiment_enabled":267,"experiment":10,"experiment_variant":376,"buttons":379,"variants":389},"center","default",{"id":377,"key":378,"experiment":10},"8c4951b4-a6f9-4c06-9f71-fd39a3bdad1e","control",[380,383,386],{"id":381,"block_button_id":382},15,"358b0659-1f05-4427-bd1c-4bc03a43c182",{"id":384,"block_button_id":385},16,"9df3f40e-6272-4ec6-a0d7-cc29265e087c",{"id":387,"block_button_id":388},232,"1b444c23-b593-4391-9410-4ca5d2c7a7cb",[390],{"id":391,"alignment":374,"style":375,"buttons":392,"experiment_variant":399},"e1885d45-3119-41a3-8294-3cd796ea6f02",[393,396],{"id":394,"block_button_id":395},203,"ade37731-147d-48c4-864a-cec007576362",{"id":397,"block_button_id":398},202,"1cb4e89f-f7de-4b46-bbb8-080191517a72",{"id":400,"key":401},"66d2be4f-2492-4944-8060-039c15515918","variant",[403],{"id":404,"icon":371,"content":405,"link":406,"include_paths":10,"exclude_paths":10},"812bf73d-ebfb-4246-9538-937a09a0c795","Learn more about our native MCP","https://directus.io/mcp",{"id":388,"external_url":97,"label":408,"color":409,"outline":334,"icon":410,"size":411,"target":412,"ph_event":10,"page":10,"resource":10},"Log In","secondary","arrow_forward","medium","_self",{"id":126,"title":414,"description":415,"image":416,"external_url":10,"icon":10,"badge":10,"page":417,"resource":10},"Built With Directus","See what everyone's been building with Directus","e658de72-fb08-4ed2-8029-215c712c789e",{"permalink":418},"/built-with-directus",{"id":385,"external_url":420,"label":421,"color":409,"outline":267,"icon":10,"size":411,"target":412,"ph_event":10,"page":10,"resource":10},"https://directus.cloud/account/register","Get Started",{"id":382,"external_url":10,"label":423,"color":424,"outline":267,"icon":10,"size":411,"target":412,"ph_event":10,"page":425,"resource":10},"Book a Demo","primary",{"permalink":426},"/demo",{"name":428,"description":429,"verified":267,"id":430,"readme":431,"type":432,"last_updated":433,"host_version":434,"downloads":435,"total_downloads":436,"sandbox":267,"license":437,"publisher":438,"versions":441,"formatted_name":589,"formatted_readme":590,"formatted_description":591,"featured_image":592,"images":593,"repository_url":461,"recent_downloads_7_days":436,"recent_downloads_30_days":436},"directus-extension-ai-operation-bundle","A small bundle of Flow Operations which enable interaction with the [OpenAI](https://beta.openai.com/overview) and [Stability](https://stability.ai/) API's.","cb4ffa8a-58e8-4052-9af4-83648bd1502b","# Directus AI Operations Bundle\n\nA small bundle of Flow Operations which enable interaction with the [OpenAI](https://beta.openai.com/overview) and [Stability](https://stability.ai/) API's.\n\n> Note: To use these you will need an API Key for the respective services.\n\n> Tested with Directus 11.2.2\n\n## Installation\n\nThe package is published to npm:\n`npm install directus-extension-ai-operation-bundle`\n\n**Manual Installation**\n- Download or fork the repository\n- Install the requirements\\\n  `npm install`\n- Build the extension\\\n  `npm run build`\n- Move the entire project to your extension folder (only the `package.json` and `dist` folder are strictly necessary)\\\n  `mv ./ extensions/directus-extension-ai-operation-bundle`\n- Restart your Directus instance\n\n## Bundle Content\n\n### Stable Diffusion Operation\n\nThis operation allow you generate images from text using the Stable Diffusion models with the [Stability.ai API](https://platform.stability.ai/) taking a `prompt` as input and saves the resulting image to the file library returning its ID as output.\n\n![Demo](examples/stable-diffusion-demo.gif)\n\n**Output**\\\nAn object containing the ID of the resulting image file.\n```json\n{ \"id\": \"[UUID]\" }\n```\n\n**Configuration Options**\\\nI am by no means an expert in what any of these model specific settings do so please check out the [stability docs](https://api.stability.ai/docs) for that.\n1. `Prompt` This is the main text input used for generating the image.\n2. `Width` Width of the image (note: height * width must be \u003C= 1 Megapixel)\n3. `Height` Height of the image (note: height * width must be \u003C= 1 Megapixel)\n4. `CFG Scale` How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt)\n5. `Steps` Number of diffusion steps to run\n6. `Engine` The model to be used (defined choices can be found in [src/lib/constants.js](src/lib/constants.js)\n7. `API Key Override` Used to set an API Key to be used specificly on this operation.\n\n![config](examples/stable-diffusion-config.png)\n\n### DALL-E Operation\n\nSimilar to the Stable Diffusion operation this allows you to generate images from text but using the OpenAI DALL-E models instead with the [OpenAI API](https://beta.openai.com/docs/guides/images) taking a `prompt` as input, optionally saves it to the local file library and returning both the original URL and local image file ID.\n![Demo](examples/dall-e-demo.gif)\n\n**Output**\\\nAn object containing the ID(s) and URL(s) of the resulting image file(s).\nFor a single result:\n```json\n{ \"url\": \"https://some.url\", \"id\": \"[UUID]\" }\n```\nFor multiple results:\n```json\n{ \"url\": [\"https://some.url\",\"https://some.other.url\"], \"id\": [\"[UUID]\",\"[UUID]\"] }\n```\n\n**Configuration Options**\n1. `Prompt` This is the main text input used for generating the image.\n2. `Save To File Library` Disable importing the image into the local storage allowing you to use the DALL-E result URL for other systems.\n3. `Number of pictures` DALL-E allows you to generate up to 10 images.\n4. `Image Size` Choices are `256x256`, `512x512` or `1024x1024`\n5. `API Key Override` Used to set an API Key to be used specificly on this operation.\n\n![config](examples/dall-e-config.png)\n\n### GPT-3 Davinci Operation\n\nThis operation allows text completion using the OpenAI Davinci models with the [OpenAI API](https://beta.openai.com/docs/guides/completion/introduction) taking a `prompt` as input and returns the generated text.\n\n![Demo](examples/davinci-demo.gif)\n\n**Output**\\\nAn object containing the generated text:\n```json\n{ \"response\": \"Generated TEXT\" }\n```\n\n**Configuration Options**\\\nI am by no means an expert in what any of these model specific settings do so please check out the [OpenAI docs](https://beta.openai.com/docs/guides/completion) for that.\n1. `Prompt` This is the main text input used for text completion.\n2. `Temperature` Controls randomness: Lowering results in less random completions.\n3. `Maximum Length` The maximum number of tokens to **generate**. Requests can use up to 2,048 or 4,000 tokens shared between prompt and completion.\n4. `Top P` Controls diversity via nucleus sampling: 0.5 means hald of all likelihood-weighted options are considered.\n5. `Frequency Penalty` How much to penalize new tokens based on their existing frequency in the text so far. Decreases the models likelihood to repeat the same line verbatim.\n6. `Presence Penalty` How much to penalize new tokens based on whether they appear in the text so far. Increases the models likelihood to talk about new topics.\n7. `API Key Override` Used to set an API Key to be used specificly on this operation.\n\n![config](examples/davinci-config.png)\n\n### ChatGPT Operation\n\nThis operation allows chat text completion using any of the available OpenAI models with the [OpenAI API](https://platform.openai.com/docs/guides/chat) taking a list of `messages` as input and returns the generated response text.\n![Demo](examples/chatgpt_demo.gif)\n\n**Output**\\\nAn object containing the generated text:\n```json\n{ \"response\": \"Generated chat message\" }\n```\n\n**Configuration Options**\\\nPlease check out the [OpenAI docs](https://platform.openai.com/docs/guides/chat) for details usage.\n\n1. `Messages` a *json string* list of messages as described in [OpenAI docs](https://platform.openai.com/docs/guides/chat/introduction)\n2. `Temperature` Controls randomness: Lowering results in less random completions.\n3. `Maximum Length` The maximum number of tokens to **generate**. Requests can use up to 2,048 or 4,000 tokens shared between prompt and completion.\n4. `Top P` Controls diversity via nucleus sampling: 0.5 means hald of all likelihood-weighted options are considered.\n5. `Frequency Penalty` How much to penalize new tokens based on their existing frequency in the text so far. Decreases the models likelihood to repeat the same line verbatim.\n6. `Presence Penalty` How much to penalize new tokens based on whether they appear in the text so far. Increases the models likelihood to talk about new topics.\n7. `API Key Override` Used to set an API Key to be used specificly on this operation.\n\n### Configuration Hook\n\nThis hook ensures the existence of API Key fields in the Directus Setting. These global settings will be used by the individual operations if not overridden in its local configuration. You can now also select your model of choice. If you want to manually choose one, simply click edit raw value.\n\n![Global Configuration](examples/global-configuration.png)\n","bundle","2024-11-28T18:58:21.498Z","^9.26.0",[],0,"MIT",{"username":439,"verified":334,"id":440,"github_username":10,"github_name":10,"github_blog":10,"github_bio":10,"github_location":10,"github_company":10,"github_avatar_url":10},"brainslug","ab487166-f95d-4454-9f6c-5f1a58d57f3c",[442,456,474,488,502,515,529,542,554,565,577],{"version":443,"package":430,"publisher":440,"type":432,"host_version":444,"publish_date":445,"verified":267,"id":446,"url_repository":10,"url_homepage":10,"url_bugs":10,"file_count":447,"unpacked_size":448,"sandbox":267,"sandbox_requested_scopes":10,"license":10,"bundled":449,"maintainers":454},"1.0.1","^9.22.1","2023-01-07T21:10:51.981Z","08ca659c-b701-485e-a583-6c7ecd7eba3d",23,5284652,[450,451,452,453],"65363ca0-581c-49aa-8033-e26975840735","664e2951-252e-4694-af4f-7a4040f3c1bd","aac6f774-3e8d-4471-9278-224f1af3a154","e9299a3f-26dd-47e7-8466-b740b82811a6",[455],9509,{"version":457,"package":430,"publisher":440,"type":432,"host_version":458,"publish_date":459,"verified":267,"id":460,"url_repository":461,"url_homepage":462,"url_bugs":463,"file_count":464,"unpacked_size":465,"sandbox":267,"sandbox_requested_scopes":10,"license":437,"bundled":466,"maintainers":472},"1.0.8","^9.23.4","2023-07-25T21:04:22.901Z","0c30a5c1-8112-4868-acd7-b370b57b8f9f","https://github.com/br41nslug/directus-extension-ai-pack.git","https://github.com/br41nslug/directus-extension-ai-pack#readme","https://github.com/br41nslug/directus-extension-ai-pack/issues",26,15619430,[467,468,469,470,471],"0f95ff28-05ff-4bb7-a6a1-bd5390f9c9b7","6ac21edc-9384-4d2f-8669-4d67fec4ee57","8fc83832-0c6c-4026-bf17-7f0f847aa802","d2241c59-0a17-4177-a5d5-7299a8cc03c7","fb4ac823-8197-498d-b8ab-5155b4bd149e",[473],9515,{"version":475,"package":430,"publisher":440,"type":432,"host_version":458,"publish_date":476,"verified":267,"id":477,"url_repository":461,"url_homepage":462,"url_bugs":463,"file_count":478,"unpacked_size":479,"sandbox":267,"sandbox_requested_scopes":10,"license":437,"bundled":480,"maintainers":486},"1.0.7","2023-06-28T10:48:31.010Z","1baf2ca2-81f1-4c08-a8c3-a160b2d79c01",27,15619516,[481,482,483,484,485],"1daa58be-c5f3-445d-970f-a00f30497958","294a0dd5-30eb-46e5-bc76-64512021c251","2df4b116-7fe2-4108-ac02-9a4f71b32f34","784883a9-35d4-4adc-9ba9-495dede2b5bd","f6dd31c5-4654-4888-a187-e7c317f2174a",[487],9514,{"version":489,"package":430,"publisher":440,"type":432,"host_version":434,"publish_date":490,"verified":267,"id":491,"url_repository":461,"url_homepage":462,"url_bugs":463,"file_count":492,"unpacked_size":493,"sandbox":267,"sandbox_requested_scopes":10,"license":437,"bundled":494,"maintainers":500},"1.0.10","2024-03-12T23:23:27.515Z","5931233a-3ac1-4d5a-a107-e2d785ff00b3",5,382771,[495,496,497,498,499],"0ec634c0-f46d-4b55-9494-f5ef7eef7f64","17c15a71-0916-4ce4-a78b-b7c6fb5eab7c","627a65ec-b329-4689-91fc-25a58c015c17","aa7fcfd0-0bba-45f3-a9f0-a6863b9cd7a0","d19656f7-f1ff-40e1-a5f5-acd95b13fb65",[501],10511,{"version":503,"package":430,"publisher":440,"type":432,"host_version":504,"publish_date":505,"verified":267,"id":506,"url_repository":461,"url_homepage":462,"url_bugs":463,"file_count":447,"unpacked_size":507,"sandbox":267,"sandbox_requested_scopes":10,"license":437,"bundled":508,"maintainers":513},"1.0.4","^9.22.4","2023-01-12T18:20:27.261Z","5b00eab2-ee6c-478e-a098-6f3862e6c19c",5284926,[509,510,511,512],"4927d5b4-4ebd-472e-b96b-e6854b51878b","876eed16-cc02-4aac-83d1-528224a75271","efcc8c3a-eae3-4cf4-9d71-9d0f6c7a10f1","f55dda96-84bc-43d8-a5a3-6f035d553db0",[514],9511,{"version":516,"package":430,"publisher":440,"type":432,"host_version":517,"publish_date":518,"verified":267,"id":519,"url_repository":461,"url_homepage":462,"url_bugs":463,"file_count":464,"unpacked_size":520,"sandbox":267,"sandbox_requested_scopes":10,"license":437,"bundled":521,"maintainers":527},"1.0.5","^9.23.1","2023-03-07T21:02:54.620Z","5faa7216-7ac2-4f34-9dd4-1fe4361b7bdb",15619007,[522,523,524,525,526],"06ae4900-7b92-4720-b999-b47c94543885","389f37ce-2c30-4ace-ab38-73f6f5d4b17b","55543bcc-ba9c-4867-850f-7146aa42721d","6050246f-eab6-4d10-8ce0-19e76e5bd1f3","b10bf0ad-b2b9-4965-b8cf-7015784aa127",[528],9512,{"version":530,"package":430,"publisher":440,"type":432,"host_version":434,"publish_date":531,"verified":267,"id":532,"url_repository":461,"url_homepage":462,"url_bugs":463,"file_count":464,"unpacked_size":533,"sandbox":267,"sandbox_requested_scopes":10,"license":437,"bundled":534,"maintainers":540},"1.0.9","2023-08-03T18:16:41.305Z","7e5f3898-b74f-4f74-90f5-23b4dee4412b",15612543,[535,536,537,538,539],"0cdf46cd-f2ce-4dd5-afc8-521c8ea28d57","51e58774-ce97-42c9-b9b1-0d564f669e67","57c25a3f-ab14-4372-93b7-2ff8f548ee6b","a2559563-cd49-4eb8-982b-96443ecc78e5","ab082cff-0277-41ae-a7ba-50fd5fe62e1b",[541],9516,{"version":543,"package":430,"publisher":440,"type":432,"host_version":444,"publish_date":544,"verified":267,"id":545,"url_repository":461,"url_homepage":462,"url_bugs":463,"file_count":447,"unpacked_size":546,"sandbox":267,"sandbox_requested_scopes":10,"license":437,"bundled":547,"maintainers":552},"1.0.2","2023-01-07T21:18:45.018Z","88f7d059-a547-40b9-ae38-ff5f8314f6c5",5284804,[548,549,550,551],"054a071e-d227-48db-aa29-aa019eb48fe6","90362e20-6ddf-4bfb-94d4-41f642ab2d2b","eb224ec1-f5be-49b0-a639-58b1d47c3ca3","f52826c5-ad1f-4804-8d57-d7afaeb6947e",[553],9510,{"version":555,"package":430,"publisher":440,"type":432,"host_version":444,"publish_date":556,"verified":267,"id":557,"url_repository":10,"url_homepage":10,"url_bugs":10,"file_count":447,"unpacked_size":448,"sandbox":267,"sandbox_requested_scopes":10,"license":10,"bundled":558,"maintainers":563},"1.0.0","2023-01-07T21:09:15.622Z","b1c712a4-a7d4-4d26-8f52-8ec8e49e4eae",[559,560,561,562],"49296474-014b-4d52-82a6-052cc0804b1b","4b0212ea-6eb4-4c4d-befb-68cc46b1de18","71d92cb9-4dcf-4284-b6ca-5bdf47e7b918","f854f375-59ed-4e5f-8679-f79f6d8b0d4b",[564],9508,{"version":566,"package":430,"publisher":440,"type":432,"host_version":434,"publish_date":433,"verified":267,"id":567,"url_repository":461,"url_homepage":462,"url_bugs":463,"file_count":492,"unpacked_size":568,"sandbox":267,"sandbox_requested_scopes":10,"license":437,"bundled":569,"maintainers":575},"2.0.0","ec76cf8f-4be6-4ccb-b01f-5bd66db9a96c",252317,[570,571,572,573,574],"38a05634-b44b-4140-a090-7af678f26f9a","527fa525-b4f8-4e36-b120-582be0fc8f36","8ecb00de-32f6-49ab-8196-0fe4faf4a947","90c6f466-58cf-498d-b3b0-4c985edf7f3f","e3e9d1c9-26f0-464d-b451-5b3d0ed4d18a",[576],11614,{"version":578,"package":430,"publisher":440,"type":432,"host_version":458,"publish_date":579,"verified":267,"id":580,"url_repository":461,"url_homepage":462,"url_bugs":463,"file_count":464,"unpacked_size":520,"sandbox":267,"sandbox_requested_scopes":10,"license":437,"bundled":581,"maintainers":587},"1.0.6","2023-03-28T20:53:16.813Z","f82c1aa9-17d0-45eb-a1eb-2ae54ed8edad",[582,583,584,585,586],"0968d437-037b-4f27-b90b-cd4a319be14c","642f21ba-82f6-401b-b53e-5a05d0b1507f","a6f07616-588f-4fcd-9690-55938617ba18","a944878d-aec5-4502-9642-ed8555460ea8","d0fb4207-dc22-4c00-90ed-6e51df27445f",[588],9513,"AI Operation Bundle","\u003Ch1>Directus AI Operations Bundle\u003C/h1>\n\u003Cp>A small bundle of Flow Operations which enable interaction with the \u003Ca href=\"https://beta.openai.com/overview\">OpenAI\u003C/a> and \u003Ca href=\"https://stability.ai/\">Stability\u003C/a> API's.\u003C/p>\n\u003Cblockquote>\n\u003Cp>Note: To use these you will need an API Key for the respective services.\u003C/p>\n\u003C/blockquote>\n\u003Cblockquote>\n\u003Cp>Tested with Directus 11.2.2\u003C/p>\n\u003C/blockquote>\n\u003Ch2>Installation\u003C/h2>\n\u003Cp>The package is published to npm:\n\u003Ccode>npm install directus-extension-ai-operation-bundle\u003C/code>\u003C/p>\n\u003Cp>\u003Cstrong>Manual Installation\u003C/strong>\u003C/p>\n\u003Cul>\n\u003Cli>Download or fork the repository\u003C/li>\n\u003Cli>Install the requirements\u003Cbr>\n\u003Ccode>npm install\u003C/code>\u003C/li>\n\u003Cli>Build the extension\u003Cbr>\n\u003Ccode>npm run build\u003C/code>\u003C/li>\n\u003Cli>Move the entire project to your extension folder (only the \u003Ccode>package.json\u003C/code> and \u003Ccode>dist\u003C/code> folder are strictly necessary)\u003Cbr>\n\u003Ccode>mv ./ extensions/directus-extension-ai-operation-bundle\u003C/code>\u003C/li>\n\u003Cli>Restart your Directus instance\u003C/li>\n\u003C/ul>\n\u003Ch2>Bundle Content\u003C/h2>\n\u003Ch3>Stable Diffusion Operation\u003C/h3>\n\u003Cp>This operation allow you generate images from text using the Stable Diffusion models with the \u003Ca href=\"https://platform.stability.ai/\">Stability.ai API\u003C/a> taking a \u003Ccode>prompt\u003C/code> as input and saves the resulting image to the file library returning its ID as output.\u003C/p>\n\u003Cp>\u003Cimg src=\"https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/stable-diffusion-demo.gif\" alt=\"Demo\">\u003C/p>\n\u003Cp>\u003Cstrong>Output\u003C/strong>\u003Cbr>\nAn object containing the ID of the resulting image file.\u003C/p>\n\u003Cpre>\u003Ccode class=\"language-json\">{ \"id\": \"[UUID]\" }\n\u003C/code>\u003C/pre>\n\u003Cp>\u003Cstrong>Configuration Options\u003C/strong>\u003Cbr>\nI am by no means an expert in what any of these model specific settings do so please check out the \u003Ca href=\"https://api.stability.ai/docs\">stability docs\u003C/a> for that.\u003C/p>\n\u003Col>\n\u003Cli>\u003Ccode>Prompt\u003C/code> This is the main text input used for generating the image.\u003C/li>\n\u003Cli>\u003Ccode>Width\u003C/code> Width of the image (note: height * width must be &lt;= 1 Megapixel)\u003C/li>\n\u003Cli>\u003Ccode>Height\u003C/code> Height of the image (note: height * width must be &lt;= 1 Megapixel)\u003C/li>\n\u003Cli>\u003Ccode>CFG Scale\u003C/code> How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt)\u003C/li>\n\u003Cli>\u003Ccode>Steps\u003C/code> Number of diffusion steps to run\u003C/li>\n\u003Cli>\u003Ccode>Engine\u003C/code> The model to be used (defined choices can be found in \u003Ca href=\"src/lib/constants.js\">src/lib/constants.js\u003C/a>\u003C/li>\n\u003Cli>\u003Ccode>API Key Override\u003C/code> Used to set an API Key to be used specificly on this operation.\u003C/li>\n\u003C/ol>\n\u003Cp>\u003Cimg src=\"https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/stable-diffusion-config.png\" alt=\"config\">\u003C/p>\n\u003Ch3>DALL-E Operation\u003C/h3>\n\u003Cp>Similar to the Stable Diffusion operation this allows you to generate images from text but using the OpenAI DALL-E models instead with the \u003Ca href=\"https://beta.openai.com/docs/guides/images\">OpenAI API\u003C/a> taking a \u003Ccode>prompt\u003C/code> as input, optionally saves it to the local file library and returning both the original URL and local image file ID.\n\u003Cimg src=\"https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/dall-e-demo.gif\" alt=\"Demo\">\u003C/p>\n\u003Cp>\u003Cstrong>Output\u003C/strong>\u003Cbr>\nAn object containing the ID(s) and URL(s) of the resulting image file(s).\nFor a single result:\u003C/p>\n\u003Cpre>\u003Ccode class=\"language-json\">{ \"url\": \"https://some.url\", \"id\": \"[UUID]\" }\n\u003C/code>\u003C/pre>\n\u003Cp>For multiple results:\u003C/p>\n\u003Cpre>\u003Ccode class=\"language-json\">{ \"url\": [\"https://some.url\",\"https://some.other.url\"], \"id\": [\"[UUID]\",\"[UUID]\"] }\n\u003C/code>\u003C/pre>\n\u003Cp>\u003Cstrong>Configuration Options\u003C/strong>\u003C/p>\n\u003Col>\n\u003Cli>\u003Ccode>Prompt\u003C/code> This is the main text input used for generating the image.\u003C/li>\n\u003Cli>\u003Ccode>Save To File Library\u003C/code> Disable importing the image into the local storage allowing you to use the DALL-E result URL for other systems.\u003C/li>\n\u003Cli>\u003Ccode>Number of pictures\u003C/code> DALL-E allows you to generate up to 10 images.\u003C/li>\n\u003Cli>\u003Ccode>Image Size\u003C/code> Choices are \u003Ccode>256x256\u003C/code>, \u003Ccode>512x512\u003C/code> or \u003Ccode>1024x1024\u003C/code>\u003C/li>\n\u003Cli>\u003Ccode>API Key Override\u003C/code> Used to set an API Key to be used specificly on this operation.\u003C/li>\n\u003C/ol>\n\u003Cp>\u003Cimg src=\"https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/dall-e-config.png\" alt=\"config\">\u003C/p>\n\u003Ch3>GPT-3 Davinci Operation\u003C/h3>\n\u003Cp>This operation allows text completion using the OpenAI Davinci models with the \u003Ca href=\"https://beta.openai.com/docs/guides/completion/introduction\">OpenAI API\u003C/a> taking a \u003Ccode>prompt\u003C/code> as input and returns the generated text.\u003C/p>\n\u003Cp>\u003Cimg src=\"https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/davinci-demo.gif\" alt=\"Demo\">\u003C/p>\n\u003Cp>\u003Cstrong>Output\u003C/strong>\u003Cbr>\nAn object containing the generated text:\u003C/p>\n\u003Cpre>\u003Ccode class=\"language-json\">{ \"response\": \"Generated TEXT\" }\n\u003C/code>\u003C/pre>\n\u003Cp>\u003Cstrong>Configuration Options\u003C/strong>\u003Cbr>\nI am by no means an expert in what any of these model specific settings do so please check out the \u003Ca href=\"https://beta.openai.com/docs/guides/completion\">OpenAI docs\u003C/a> for that.\u003C/p>\n\u003Col>\n\u003Cli>\u003Ccode>Prompt\u003C/code> This is the main text input used for text completion.\u003C/li>\n\u003Cli>\u003Ccode>Temperature\u003C/code> Controls randomness: Lowering results in less random completions.\u003C/li>\n\u003Cli>\u003Ccode>Maximum Length\u003C/code> The maximum number of tokens to \u003Cstrong>generate\u003C/strong>. Requests can use up to 2,048 or 4,000 tokens shared between prompt and completion.\u003C/li>\n\u003Cli>\u003Ccode>Top P\u003C/code> Controls diversity via nucleus sampling: 0.5 means hald of all likelihood-weighted options are considered.\u003C/li>\n\u003Cli>\u003Ccode>Frequency Penalty\u003C/code> How much to penalize new tokens based on their existing frequency in the text so far. Decreases the models likelihood to repeat the same line verbatim.\u003C/li>\n\u003Cli>\u003Ccode>Presence Penalty\u003C/code> How much to penalize new tokens based on whether they appear in the text so far. Increases the models likelihood to talk about new topics.\u003C/li>\n\u003Cli>\u003Ccode>API Key Override\u003C/code> Used to set an API Key to be used specificly on this operation.\u003C/li>\n\u003C/ol>\n\u003Cp>\u003Cimg src=\"https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/davinci-config.png\" alt=\"config\">\u003C/p>\n\u003Ch3>ChatGPT Operation\u003C/h3>\n\u003Cp>This operation allows chat text completion using any of the available OpenAI models with the \u003Ca href=\"https://platform.openai.com/docs/guides/chat\">OpenAI API\u003C/a> taking a list of \u003Ccode>messages\u003C/code> as input and returns the generated response text.\n\u003Cimg src=\"https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/chatgpt_demo.gif\" alt=\"Demo\">\u003C/p>\n\u003Cp>\u003Cstrong>Output\u003C/strong>\u003Cbr>\nAn object containing the generated text:\u003C/p>\n\u003Cpre>\u003Ccode class=\"language-json\">{ \"response\": \"Generated chat message\" }\n\u003C/code>\u003C/pre>\n\u003Cp>\u003Cstrong>Configuration Options\u003C/strong>\u003Cbr>\nPlease check out the \u003Ca href=\"https://platform.openai.com/docs/guides/chat\">OpenAI docs\u003C/a> for details usage.\u003C/p>\n\u003Col>\n\u003Cli>\u003Ccode>Messages\u003C/code> a \u003Cem>json string\u003C/em> list of messages as described in \u003Ca href=\"https://platform.openai.com/docs/guides/chat/introduction\">OpenAI docs\u003C/a>\u003C/li>\n\u003Cli>\u003Ccode>Temperature\u003C/code> Controls randomness: Lowering results in less random completions.\u003C/li>\n\u003Cli>\u003Ccode>Maximum Length\u003C/code> The maximum number of tokens to \u003Cstrong>generate\u003C/strong>. Requests can use up to 2,048 or 4,000 tokens shared between prompt and completion.\u003C/li>\n\u003Cli>\u003Ccode>Top P\u003C/code> Controls diversity via nucleus sampling: 0.5 means hald of all likelihood-weighted options are considered.\u003C/li>\n\u003Cli>\u003Ccode>Frequency Penalty\u003C/code> How much to penalize new tokens based on their existing frequency in the text so far. Decreases the models likelihood to repeat the same line verbatim.\u003C/li>\n\u003Cli>\u003Ccode>Presence Penalty\u003C/code> How much to penalize new tokens based on whether they appear in the text so far. Increases the models likelihood to talk about new topics.\u003C/li>\n\u003Cli>\u003Ccode>API Key Override\u003C/code> Used to set an API Key to be used specificly on this operation.\u003C/li>\n\u003C/ol>\n\u003Ch3>Configuration Hook\u003C/h3>\n\u003Cp>This hook ensures the existence of API Key fields in the Directus Setting. These global settings will be used by the individual operations if not overridden in its local configuration. You can now also select your model of choice. If you want to manually choose one, simply click edit raw value.\u003C/p>\n\u003Cp>\u003Cimg src=\"https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/global-configuration.png\" alt=\"Global Configuration\">\u003C/p>\n","A small bundle of Flow Operations which enable interaction with the OpenAI and Stability API's.","https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/stable-diffusion-demo.gif",[592,594,595,596,597,598,599,600],"https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/stable-diffusion-config.png","https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/dall-e-demo.gif","https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/dall-e-config.png","https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/davinci-demo.gif","https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/davinci-config.png","https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/chatgpt_demo.gif","https://raw.githubusercontent.com/br41nslug/directus-extension-ai-pack/main/examples/global-configuration.png"]