Add PHP code block type expectation to PromptCodeBlockExtractor class

Created on 19 January 2025, 3 months ago

Problem/Motivation

PromptCodeBlockExtractor.php class has hard-coded regex to extract code blocks from ai inference responses.
Current allowed types are: yaml, json, html, twig. This can be limiting if we expect php code as a code block response.

Steps to reproduce

Proposed resolution

Add a new array value for handling php code blocks.

Remaining tasks

Perhaps try to think of a more generic way to detect different code blocks outside of the php stack expectations.

User interface changes

None

API changes

None

Data model changes

None

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom spec0 London

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024