Skip to content

Repository files navigation

🌍 Select a Language / Selecione uma Linguagem

👉 🇧🇷 🇵🇹 Português
👉 🇺🇸 🇬🇧 English


🤖 Nalo API - PrompTry: O Sistema que você precisa e não sabia

A Nalo PrompTry é uma aplicação RESTful projetada para analisar, refinar, classificar e comparar prompts com Inteligência Artificial e Banco de Dados.

A API utiliza o poder do Gemini para processar linguagem natural e fornecer feedback inteligente sobre os prompts recebidos que o usuário deve enviar através do swagger.

Visualização da API

Ela foi desenvolvida para uso em pipelines de geração de conteúdo, design de sistemas de IA conversacional e ferramentas de avaliação de prompts.


🚀 Recursos Principais

  • Refinamento automático de Prompts — Quando o usuário enviar um prompt o sistema irá torna-lo mais claro e objetivo.
  • Classificação a partir do Contexto do Prompt — identifica o tipo e a intenção do prompt.
  • Pontuação do Prompt — avalia a clareza e a efetividade do prompt.
  • Comparação inteligente de Prompts enviados — compara dois prompts e identifica o mais adequado e específico.

🧩 Endpoints RESTful

Método Endpoint Descrição Exemplo de Uso
POST /refine Refina um prompt de IA, tornando-o mais claro e objetivo. “Refine o seguinte prompt para maior clareza: [prompt]”
POST /classify Classifica o prompt em uma categoria (ex: Criativo, Técnico, Descritivo). “Classifique o prompt de acordo com seu tipo: [prompt]”
POST /score Avalia o prompt e retorna uma nota de qualidade (1 a 10). “Dê uma nota de clareza e coerência para: [prompt]”
POST /compare Compara dois prompts e indica qual é mais eficiente. “Compare os dois prompts e diga qual comunica melhor a ideia.”
GET /history Entrega o histórico de requisições de prompts. Apenas use o Try It Out no swagger e será capaz vizualizar o histórico presente no banco de dados MongoDB
DELETE /delete/{:id} Apaga uma conversa baseado no seu ID, este pode ser consultado no endpoint /history. Ponha o ID que deseja deletar e caso exista será apagado do histórico

📘 Swagger para Vizualização e Teste de Endpoints

A API é documentada com Swagger UI, permitindo testes diretos de forma intuitiva.

Aqui abaixo segue um exemplo de código testando o endpoint /refine e conseguindo um retorno proveniente de Inteligência Artificial Exemplo de Interface Swagger em Endpoint


📤 Exemplos de Requisição

Nesta API os exemplos você mesmo pode criar contanto que respeite o quesito de ser uma requisição JSON

🔧 1. Refinar um Prompt

Endpoint: /refine

{
  "prompt": "quero que a IA crie uma arte digital futurista"
}

Detalhes sobre o Projeto

Autor: Natan Leal

Projeto: Nalo API - PrompTry

Versão: 1.0.1

Descrição: Uma API inteligente para refinamento, classificação, nota e comparação de Prompts


🤖 Nalo API - PrompTry: The System You Need but Didn't Know It

The Nalo PrompTry is a RESTful application designed to analyze, refine, classify, and compare AI prompts.

This API shows the power of Gemini to process natural language and deliver intelligent feedback about the prompts sent by the user through the Swagger interface.

API Visualization

It was developed for use in content generation pipelines, conversational AI systems, and prompt evaluation tools.


🚀 Key Features

  • Automatic Prompt Refinement — When a user sends a prompt, the system makes it clearer and more objective.
  • Context-Based Prompt Classification — Identifies the type and intent of the prompt.
  • Prompt Scoring — Evaluates the clarity and effectiveness of the prompt.
  • Intelligent Prompt Comparison — Compares two prompts and identifies which is more suitable and specific.

🧩 RESTful Endpoints

Method Endpoint Description Example Usage
POST /refine Refines an AI prompt, making it clearer and more concise. “Refine the following prompt for better clarity: [prompt]”
POST /classify Classifies a prompt into a category (e.g., Creative, Technical, Descriptive). “Classify the following prompt according to its type: [prompt]”
POST /score Evaluates a prompt and returns a quality score (1 to 10). “Rate the following prompt for clarity and coherence: [prompt]”
POST /compare Compares two prompts and determines which one is more effective. “Compare both prompts and indicate which communicates the idea better.”
GET /history Gives the user the history of requests. Just get and it'll give you all history from the MongoDB Database
DELETE /delete/{:id} Deletes a specific prompt conversation based on the Id of the conversation. Put in the params the ID and it'll delete the one selected

📘 Swagger for Endpoint Visualization and Testing

The API is documented with Swagger UI, allowing you to test endpoints directly in an intuitive interface.

Below is an example of testing the /refine endpoint and receiving an AI-generated response:

Swagger Endpoint Interface Example


📤 Request Examples

In this API, you can create your own examples as long as you follow the rule of sending requests in valid JSON format.

🔧 1. Refine a Prompt

Endpoint: /refine

{
  "prompt": "I want the AI to create a futuristic digital artwork"
}

Details about the project

Author: Natan Leal

Project: Nalo API - PrompTry

Version: 1.0.1

Description: An intelligent API for refining, classifying, scoring, and comparing AI prompts.

About

A microservice that offers a Prompt that you can use to give better instructions to any AI tool you prefer. PrompTry is a invitation to write better prompts based on your thoughts. Write your ideas and we turn it into a Prompt, give it a Try. Author: Natan Leal(Nalo)

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages