Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix parsing role in prompt issue (#781)
# Description Issue: ![image](https://github.com/microsoft/promptflow/assets/49483542/a710552f-b624-4719-8670-1a3916c5cf7b) Root cause: Caused by inappropriate regrex expr to match role in prompt. It is unexpected to match role word if it is in content string. For example, should not identify `function` as a role for input `"system:\nthis is my function:\ndef hello"` Solution: Fixed by modifying the regrex expr and added more tests of parsing logic. # All Promptflow Contribution checklist: - [X] **The pull request does not introduce [breaking changes].** - [X] **CHANGELOG is updated for new features, bug fixes or other significant changes.** - [X] **I have read the [contribution guidelines](../CONTRIBUTING.md).** - [ ] **Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: [suggested workflow](../CONTRIBUTING.md#suggested-workflow).** ## General Guidelines and Best Practices - [X] Title of the pull request is clear and informative. - [X] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, [see this page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md). ### Testing Guidelines - [X] Pull request includes test coverage for the included changes.
- Loading branch information