diff --git a/docs/build/ai-assistant.md b/docs/build/ai-assistant.md new file mode 100644 index 00000000000..2214039d161 --- /dev/null +++ b/docs/build/ai-assistant.md @@ -0,0 +1,76 @@ +--- +title: Using the AI Assistant +sidebar_label: AI Assistant +--- + +The OpenFn AI Assistant provides a chat interface with an AI Model to help you +build workflows. + +You can use it to draft, proofread and debug job code, diagnose errors, and +understand the capabilities of the platform. + +![AI Assistant](/img/ai-assistant.png) + +:::caution Assistant Unavailable? Can't find it? + +For local deployments of OpenFn, the instance administrator needs to configure the AI +Assistant before it is available. See +[deployment docs](https://github.com/OpenFn/lightning/blob/main/DEPLOYMENT.md#ai-chat) +here for help or contact the super user of your instance. + +The Assistant is available on app.openfn.org, with usage credits subject your +project's plan. See [openfn.org/pricing](https://www.openfn.org/pricing) or contact [support@openfn.org](mailto:support@openfn.org) +for more information on paid plans for usage of OpenFn's cloud-hosted platform. + +::: + +## About the Assistant + +The AI Assistant is built on the Claude 3.5 Sonnet model from +[Anthropic](https://www.anthropic.com/) and is trained with OpenFn documentation +and example job code. + +At the moment, the Assistant is only configured to help with job writing. Later +versions of the assistant may be rolled out to other pages. + +All chat sessions are shared between all users of the project. You can start a +new chat session at any time, or open an old one. + +Input data and run-time job logs not sent to the model. But we do include +your step code so that the Assistant can provide a contextually relevant answer. + +## A Note on Responsible AI Usage + +The AI assistant is built on emerging Large Language Model (terminology). Like +other LLMS and chatbots, its capabilities are impressive, but imperfect. + +Remember that ultimately, all responses are generated by an algorithm and YOU, +the human in charge, are responsible for how its output is used. You should +consider all responses critically and verify the output where possible. + +You can read more about our approach to AI in our +[Responsible AI Policy](https://www.openfn.org/ai). + +## How to access the AI Assistant + +The AI Assistant is located in the Inspector, in the Input panel to the left of +the step code. You may need to open the inspector first - to do this, click on a +step in the workflow and hit the `` button. + +If there has been a prior chat session on this step, you'll be presented with a +list of them. Click on one to open up that chat history. + +To stat a new session, type a question in the text area at the bottom of the +Assistant. Click on the `Send` button to send your question. The Assistant will +return a respond in a few seconds in the chat interface. + +You can close a chat session by clicking the `(X)` button on the top right of +the chat interface, which will take you back to the list of sessions for this +step. + +:::caution Feedback or Questions about the Assistant? + +We welcome your questions or feedback on [community.openfn.org](https://community.openfn.org/), +or contact [support@openfn.org](mailto:support@openfn.org) with private queries. + +::: diff --git a/docs/build/steps/step-editor.md b/docs/build/steps/step-editor.md index ffb882249a1..02ffa8c0220 100644 --- a/docs/build/steps/step-editor.md +++ b/docs/build/steps/step-editor.md @@ -6,6 +6,12 @@ sidebar_label: Edit & Test Steps This page outlines how to edit and test Steps in your Workflow using the Inspector interface. +:::tip + +If you're writing jobs on the platform app (Lightning), you can use the [AI Assistant](/documentation/build/ai-assistant) to help you. You'll find it in the Inspector. + +::: + ## Edit & Test Steps via the Inspector Use the `Inspector` interface on the platform to create, edit, and test Steps. diff --git a/docs/jobs/job-writing-guide.md b/docs/jobs/job-writing-guide.md index 49e28ff74a4..7a8b1d3b42f 100644 --- a/docs/jobs/job-writing-guide.md +++ b/docs/jobs/job-writing-guide.md @@ -11,6 +11,12 @@ writing. It is suitable for new coders and experienced JavaScript programmers. In fact, even if you're an experienced JavaScript developer, there are a number of key patterns in the OpenFn ecosystem which it is important to learn. +:::tip + +If you're writing jobs on the platform app (Lightning), you can use the [AI Assistant](/documentation/build/ai-assistant) to help you. You'll find it in the Inspector. + +::: + A Job is a bunch of JavaScript code which performs a particular task, like fetching data from Salesforce or converting some JSON data to FHIR standard. diff --git a/sidebars-main.js b/sidebars-main.js index 5b77371f36a..8bf66379726 100644 --- a/sidebars-main.js +++ b/sidebars-main.js @@ -61,6 +61,7 @@ module.exports = { 'build/steps/steps', 'build/steps/step-editor', 'build/steps/step-design-intro', + 'build/ai-assistant', 'build/paths', 'build/credentials', 'build/limits', diff --git a/static/img/ai-assistant.png b/static/img/ai-assistant.png new file mode 100644 index 00000000000..ffb4fdce27e Binary files /dev/null and b/static/img/ai-assistant.png differ