npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

aiformify

v2.2.8

Published

AI-powered form filling library with Vue and React support

Downloads

1,011

Readme

AIFormify

AIFormify es una librería de JavaScript que utiliza IA para rellenar formularios basados en descripciones de texto, con soporte para Vue, React y reconocimiento de voz.

Patrocinado por CooWeb

Este proyecto es orgullosamente patrocinado por CooWeb, una empresa de impacto social dedicada a transformar vidas a través de la tecnología.

Instalación

npm install aiformify

Configuración

Para usar AIFormify, necesitas una API key de Gemini. Configúrala al inicializar AIFormify:

const aiformify = new AIFormify({
  apiKey: 'TU_API_KEY_AQUI'
});

Uso Básico

import AIFormify from 'aiformify';

const aiformify = new AIFormify({ apiKey: 'TU_API_KEY_AQUI' });

const schema = {
  fields: [
    { name: 'nombre', type: 'text', label: 'Nombre' },
    { name: 'email', type: 'email', label: 'Correo electrónico' },
    { name: 'mensaje', type: 'textarea', label: 'Mensaje' }
  ]
};

const textDescription = 'Mi nombre es Juan Pérez. Mi correo es [email protected]. Quiero dejar un mensaje diciendo que estoy interesado en el producto.';

aiformify.fillForm(textDescription, schema)
  .then(result => {
    console.log('Formulario rellenado:', result.form);
    console.log('Errores de validación:', result.errors);
  })
  .catch(error => console.error('Error:', error));

Uso en React

import { ReactAdapter } from 'aiformify';

const { AIFormifyProvider, AIFormifyForm } = ReactAdapter;

const mySchema = {
  fields: [
    { name: 'nombre', type: 'text', label: 'Nombre' },
    { name: 'email', type: 'email', label: 'Correo electrónico' },
  ]
};

function App() {
  return (
    <AIFormifyProvider config={{ apiKey: 'TU_API_KEY_AQUI' }}>
      <AIFormifyForm schema={mySchema} />
    </AIFormifyProvider>
  );
}

Uso en Vue

<template>
  <AIFormifyForm :schema="mySchema" />
</template>

<script>
import { VueAdapter } from 'aiformify';

export default {
  components: {
    AIFormifyForm: VueAdapter.AIFormifyForm
  },
  data() {
    return {
      mySchema: {
        fields: [
          { name: 'nombre', type: 'text', label: 'Nombre' },
          { name: 'email', type: 'email', label: 'Correo electrónico' },
        ]
      }
    }
  },
  // Asegúrate de proporcionar la API key en la configuración de tu aplicación Vue
}
</script>

Reconocimiento de Voz

AIFormify incluye soporte para reconocimiento de voz en los componentes de React y Vue. Usa el botón "Start Listening" para activar esta función.

Ejemplos

Puedes encontrar más ejemplos en el directorio examples/ del repositorio.

Contribuir

Las contribuciones son bienvenidas. Por favor, abre un issue o un pull request para sugerir cambios o mejoras.

Soporte

Para soporte, contacta al equipo de CooWeb:

Licencia

MIT


Desarrollado con ❤️ por el equipo de CooWeb - Transformando vidas a través de la tecnología.