Overview
Frends 6.0 introduces AI-Assisted Code Shape, enabling users to generate C# code efficiently through natural language prompts. This enhancement simplifies writing code for complex integration tasks, making the development process faster and more intuitive.
Accessing AI-Assisted Code Shape
You can access this feature via the Code Statement shape by clicking the ‘Frends Assistant’ button in the Process Editor. When enabled, Frends seamlessly connects to the Azure OpenAI service to assist with code generation.
How to Use AI-Assisted Code Generation
Enter a Prompt
Provide a natural language description of the code you need.
Example: "Write a C# function that fetches data from an API and logs the response."
Review & Refine
The AI will generate C# code based on your input.
You can modify your prompt or ask follow-up questions to improve the code.
Context-Aware Assistance
The AI can reference Environment Variables, Process Variables, Trigger Variables, and Task Results to generate more relevant code.
Modify Context Data
You can select which Environment Variables are included by using the Environment Variable dropdown in the Assistant.
By default, the first 50 Environment Variables are sent.
Context Panel: Understanding Data Sent to the AI
The Context Panel (accessible via the top-right button in the Frends Assistant modal) displays all data being sent to the LLM. This includes:
✔ Environment Variable names
✔ Process Variable names
✔ Trigger Variable names
✔ Task Results
🔒 Security Note: Only metadata (names) are shared—actual values are never sent.
Security & Privacy
We prioritize security and transparency in AI-assisted code generation:
No Training on User Data: The AI does not use submitted data for future training.
Customizable Context: Users can review and modify what information is shared with the AI.
Audit Log for Transparency: Admins can track all LLM sessions and review data sent to the AI. Admins also have the option to delete log entries that may contain sensitive information.
Best Practices for Prompting the AI
To get the best results from Frends Assistant, follow these guidelines:
Be Specific: Instead of "Write a function," try "Write a C# method that converts a JSON string to an object."
Include Context: Mention any Frends-specific variables the code should use.
Iterate & Refine: Ask follow-up questions to improve the AI’s response.
Review & Test: AI-generated code should always be reviewed before use.