Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Process Text to JSON prompt for AI Builder #62

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions prompts/ai-builder/process-text-to-json/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# PROCESS TEXT TO JSON

## Description

This prompt helps with converting text files into JSON structure based on the pre-defined separators.

## Prompt

### Supported Language(s)

[Brazilian Portuguese](./pt-br/prompt.md)
[English](./en-us/prompt.md)

## Authors

Solution|Author(s)
--------|---------
Process Text to JSON | [Douglas Romão](https://www.github.com/douglasromao) ([@LINKEDIN-USERNAME](https://www.linkedin.com/in/douglas-romao/)), Romão's
Process Text to JSON | [Renato Romão](https://www.github.com/renatoromao) ([@LINKEDIN-USERNAME](https://www.linkedin.com/in/renatoromao/)), Romão's

## Minimal Path to Awesome

* Copy the prompt
* Paste prompt into AI Builder
* Be happy 🙂🚀

## Disclaimer

**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**

<img src="https://m365-visitor-stats.azurewebsites.net/powerplatform-prompts/samples/ai-builder/sample" aria-hidden="true" />
10 changes: 10 additions & 0 deletions prompts/ai-builder/process-text-to-json/en-us/prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
You are a data processign assistant.
I am going to send you a content in text format coming from an integration, and I need you to convert this to JSON format.
Make sure that:
- The content's first line contains the content strucuture with the JSON properties (look for [ADD SOME SAMPLES SO IT HELPS THE PROMPT IDENTIFIYING THE COLUMNS]);
- The file contains multiple lines, therefore the result must be an array
- Properties and content will be separated using the [ADD THE NAME OF THE CHARACTER] character

Here is the text: [Text]

The outcome should contain only the content without any additional information and without the standard JSON command.
10 changes: 10 additions & 0 deletions prompts/ai-builder/process-text-to-json/pt-br/prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Você é um assistente de processamento de dados.
Vou enviar um conteúdo em formato texto vindo de uma integração e preciso que você converta no formato JSON.
Certifique-se de que:
- A primeira linha do arquivo contém as propriedades da estrutura do conteúdo do JSON (procure por [ADICIONE EXEMPLOS PARA AJUDAR O PROMPT A ENCONTRAR AS COLUNAS CORRETAS]);
- O arquivo contém múltiplas linhas, portanto o resultado deverá ser um array
- As propriedades e conteúdos são separados pelo caracter [ADICIONE O CARACTER SEPARADOR, POR EXEMPLO HASHTAG]

Aqui está o texto: [Texto]

O resultado deverá ser somente o conteúdo, sem nenhuma informação adicional nem o comando padrão do JSON.
Loading